Skip to content

Commit

Permalink
Merge branch 'emilk:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
KeKsBoTer authored Apr 29, 2024
2 parents 531df78 + af39bd2 commit c271de5
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 18 deletions.
2 changes: 1 addition & 1 deletion crates/egui/src/callstack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub fn capture() -> String {

// Remove stuff that isn't user calls:
let skip_prefixes = [
// "backtrace::", // not needed, since we cut at at egui::callstack::capture
// "backtrace::", // not needed, since we cut at egui::callstack::capture
"egui::",
"<egui::",
"<F as egui::widgets::Widget>",
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/containers/frame.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl Prepared {
self.content_ui.min_rect() + self.frame.inner_margin + self.frame.outer_margin
}

/// Allocate the the space that was used by [`Self::content_ui`].
/// Allocate the space that was used by [`Self::content_ui`].
///
/// This MUST be called, or the parent ui will not know how much space this widget used.
///
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ pub struct RepaintCause {
/// What file had the call that requested the repaint?
pub file: &'static str,

/// What line number of the the call that requested the repaint?
/// What line number of the call that requested the repaint?
pub line: u32,
}

Expand Down Expand Up @@ -924,7 +924,7 @@ impl Context {
self.write(move |ctx| writer(&mut ctx.memory.options.tessellation_options))
}

/// If the given [`Id`] has been used previously the same frame at at different position,
/// If the given [`Id`] has been used previously the same frame at different position,
/// then an error will be printed on screen.
///
/// This function is already called for all widgets that do any interaction,
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ enum FocusDirection {
/// Select the widget below the current focused widget.
Down,

/// Select the widget to the left of the the current focused widget.
/// Select the widget to the left of the current focused widget.
Left,

/// Select the previous widget that had focus.
Expand Down Expand Up @@ -812,7 +812,7 @@ impl Memory {

/// ## Popups
/// Popups are things like combo-boxes, color pickers, menus etc.
/// Only one can be be open at a time.
/// Only one can be open at a time.
impl Memory {
/// Is the given popup open?
pub fn is_popup_open(&self, popup_id: Id) -> bool {
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/text_selection/cursor_range.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl CursorRange {
self.primary.ccursor == self.secondary.ccursor
}

/// Is `self` a super-set of the the other range?
/// Is `self` a super-set of the other range?
pub fn contains(&self, other: &Self) -> bool {
let [self_min, self_max] = self.sorted_cursors();
let [other_min, other_max] = other.sorted_cursors();
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/text_selection/text_cursor_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ impl TextCursorState {
self.cursor_range.is_none() && self.ccursor_range.is_none()
}

/// The the currently selected range of characters.
/// The currently selected range of characters.
pub fn char_range(&self) -> Option<CCursorRange> {
self.ccursor_range.or_else(|| {
self.cursor_range
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1886,7 +1886,7 @@ impl Ui {
/// adjusted up and down to lie in the center of the horizontal layout.
/// The initial height is `style.spacing.interact_size.y`.
/// Centering is almost always what you want if you are
/// planning to to mix widgets or use different types of text.
/// planning to mix widgets or use different types of text.
///
/// If you don't want the contents to be centered, use [`Self::horizontal_top`] instead.
///
Expand Down Expand Up @@ -1947,7 +1947,7 @@ impl Ui {
/// adjusted up and down to lie in the center of the horizontal layout.
/// The initial height is `style.spacing.interact_size.y`.
/// Centering is almost always what you want if you are
/// planning to to mix widgets or use different types of text.
/// planning to mix widgets or use different types of text.
///
/// The returned [`Response`] will only have checked for mouse hover
/// but can be used for tooltips (`on_hover_text`).
Expand Down
4 changes: 2 additions & 2 deletions crates/egui/src/viewport.rs
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ pub enum X11WindowType {
/// This property is typically used on override-redirect windows.
Combo,

/// This indicates the the window is being dragged.
/// This indicates the window is being dragged.
/// This property is typically used on override-redirect windows.
Dnd,
}
Expand Down Expand Up @@ -1015,7 +1015,7 @@ pub enum ViewportCommand {
/// Set window to be always-on-top, always-on-bottom, or neither.
WindowLevel(WindowLevel),

/// The the window icon.
/// The window icon.
Icon(Option<Arc<IconData>>),

/// Set the IME cursor editing area.
Expand Down
2 changes: 1 addition & 1 deletion crates/egui/src/widgets/text_edit/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl TextEditState {
ctx.data_mut(|d| d.insert_persisted(id, self));
}

/// The the currently selected range of characters.
/// The currently selected range of characters.
#[deprecated = "Use `self.cursor.char_range` instead"]
pub fn ccursor_range(&self) -> Option<CCursorRange> {
self.cursor.char_range()
Expand Down
4 changes: 3 additions & 1 deletion crates/egui_demo_lib/src/demo/table_demo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ impl TableDemo {
.size
.max(ui.spacing().interact_size.y);

let available_height = ui.available_height();
let mut table = TableBuilder::new(ui)
.striped(self.striped)
.resizable(self.resizable)
Expand All @@ -145,7 +146,8 @@ impl TableDemo {
.column(Column::initial(100.0).range(40.0..=300.0))
.column(Column::initial(100.0).at_least(40.0).clip(true))
.column(Column::remainder())
.min_scrolled_height(0.0);
.min_scrolled_height(0.0)
.max_scroll_height(available_height);

if self.clickable {
table = table.sense(egui::Sense::click());
Expand Down
2 changes: 1 addition & 1 deletion crates/egui_glow/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ x11 = ["winit?/x11"]

[dependencies]
egui = { workspace = true, default-features = false, features = ["bytemuck"] }
egui-winit = { workspace = true, optional = true, default-features = false }

bytemuck = "1.7"
glow.workspace = true
Expand All @@ -66,7 +67,6 @@ document-features = { workspace = true, optional = true }

# Native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
egui-winit = { workspace = true, optional = true, default-features = false }
puffin = { workspace = true, optional = true }
winit = { workspace = true, optional = true, default-features = false, features = [
"rwh_06", # for compatibility with egui-winit
Expand Down
4 changes: 2 additions & 2 deletions crates/egui_glow/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ mod vao;

pub use shader_version::ShaderVersion;

#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
#[cfg(feature = "winit")]
pub mod winit;
#[cfg(all(not(target_arch = "wasm32"), feature = "winit"))]
#[cfg(feature = "winit")]
pub use winit::*;

/// Check for OpenGL error and report it using `log::error`.
Expand Down
2 changes: 1 addition & 1 deletion crates/epaint/src/tessellator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ pub struct TessellationOptions {
/// Default: `true`.
pub feathering: bool,

/// The size of the the feathering, in physical pixels.
/// The size of the feathering, in physical pixels.
///
/// The default, and suggested, value for this is `1.0`.
/// If you use a larger value, edges will appear blurry.
Expand Down

0 comments on commit c271de5

Please sign in to comment.