From 835db5cba6b7d62f3af3bcc17c08aaf29a96e655 Mon Sep 17 00:00:00 2001 From: adrien <221212@umons.ac.be> Date: Mon, 13 Oct 2025 00:01:34 +0200 Subject: [PATCH 1/9] style by widget --- crates/egui/src/lib.rs | 1 + crates/egui/src/style_trait.rs | 188 ++++++++++++++++++++++++++ crates/egui/src/widgets/button.rs | 55 ++++---- crates/egui/src/widgets/drag_value.rs | 13 +- 4 files changed, 224 insertions(+), 33 deletions(-) create mode 100644 crates/egui/src/style_trait.rs diff --git a/crates/egui/src/lib.rs b/crates/egui/src/lib.rs index 960480b23..c0c68884a 100644 --- a/crates/egui/src/lib.rs +++ b/crates/egui/src/lib.rs @@ -434,6 +434,7 @@ mod plugin; pub mod response; mod sense; pub mod style; +pub mod style_trait; pub mod text_selection; mod ui; mod ui_builder; diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs new file mode 100644 index 000000000..079013649 --- /dev/null +++ b/crates/egui/src/style_trait.rs @@ -0,0 +1,188 @@ +use emath::Vec2; +use epaint::{Color32, FontId, Stroke}; + +use crate::{ + Frame, Response, Style, + style::{WidgetVisuals, Widgets}, +}; + +/// General text style +pub struct TextVisuals { + /// Font used + pub font_id: FontId, + /// Font color + pub color: Color32, +} + +/// General widget style +pub struct WidgetStyle { + pub frame: Frame, + + pub text: TextVisuals, + + pub stroke: Stroke, +} + +pub struct ButtonStyle { + pub frame: Frame, + pub text: TextVisuals, +} + +pub struct CheckboxStyle { + /// Frame around + pub frame: Frame, + /// Text next to it + pub text: TextVisuals, + /// Size + pub size: Vec2, + /// Frame of the checkbox itself + pub checkbox_frame: Frame, + /// Checkmark stroke + pub stroke: Stroke, +} + +pub struct DragValueStyle { + /// Frame around + pub frame: Frame, + /// Text of the value + pub text: TextVisuals, + pub min_size: Vec2, +} + +pub struct HyperlinkStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +pub struct ImageStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +pub struct LabelStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +pub struct RadioButtonStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +pub struct SeparatorStyle { + pub size: f32, + pub stroke: Stroke, +} + +pub struct SliderStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +pub struct SpinnerStyle { + pub frame: Frame, + pub text: TextVisuals, + pub size: Vec2, + pub checkbox_frame: Frame, + pub stroke: Stroke, +} + +#[derive(Default, Clone, Copy, Debug, PartialEq, Eq)] +pub enum WidgetState { + Noninteractive, + #[default] + Inactive, + Hovered, + Active, +} + +impl Widgets { + pub fn state(&self, state: WidgetState) -> &WidgetVisuals { + match state { + WidgetState::Noninteractive => &self.noninteractive, + WidgetState::Inactive => &self.inactive, + WidgetState::Hovered => &self.hovered, + WidgetState::Active => &self.active, + } + } +} + +impl Response { + pub fn widget_state(&self) -> WidgetState { + if !self.sense.interactive() { + WidgetState::Noninteractive + } else if self.is_pointer_button_down_on() || self.has_focus() || self.clicked() { + WidgetState::Active + } else if self.hovered() || self.highlighted() { + WidgetState::Hovered + } else { + WidgetState::Inactive + } + } +} + +impl Style { + pub fn widget_style(&self, state: WidgetState) -> WidgetStyle { + let visuals = self.visuals.widgets.state(state); + let font_id = self.override_font_id.clone(); + WidgetStyle { + frame: Frame { + fill: visuals.bg_fill, + stroke: visuals.bg_stroke, + corner_radius: visuals.corner_radius, + ..Default::default() + }, + stroke: visuals.fg_stroke, + text: TextVisuals { + color: visuals.fg_stroke.color, + font_id: font_id.unwrap_or(FontId::new(13.0, epaint::FontFamily::Proportional)), + }, + } + } + + pub fn button_style(&self, state: WidgetState) -> ButtonStyle { + let ws = self.widget_style(state); + ButtonStyle { + frame: ws.frame.inner_margin(self.spacing.button_padding), + text: ws.text, + } + } + + // pub fn checkbox_style(&self, state: WidgetState) -> CheckboxStylee {} + + // pub fn label_style(&self, state: WidgetState) -> LabelStyle {} + + pub fn drag_value_style(&self, state: WidgetState) -> DragValueStyle { + let ws = self.widget_style(state); + DragValueStyle { + frame: ws.frame.inner_margin(self.spacing.button_padding), + min_size: self.spacing.interact_size, + text: ws.text, + } + } + + // pub fn hyperlink_style(&self, state: WidgetState) -> HyperlinkStyle {} + + // pub fn image_style(&self, state: WidgetState) -> ImageStyle {} + + // pub fn slider_style(&self, state: WidgetState) -> SliderStyle {} + + // pub fn separator_style(&self, state: WidgetState) -> SeparatorStyle {} + + // pub fn spinner_style(&self, state: WidgetState) -> SpinnerStyle {} +} diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index af31b40af..00d438959 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -1,7 +1,9 @@ +use std::{mem, sync::Arc}; + use crate::{ Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Frame, - Image, IntoAtoms, NumExt as _, Response, Sense, Stroke, TextStyle, TextWrapMode, Ui, Vec2, - Widget, WidgetInfo, WidgetText, WidgetType, + Image, IntoAtoms, NumExt as _, Response, RichText, Sense, Stroke, TextStyle, TextWrapMode, Ui, + Vec2, Widget, WidgetInfo, WidgetText, WidgetType, }; /// Clickable button with text. @@ -281,25 +283,30 @@ impl<'a> Button<'a> { let text = layout.text().map(String::from); + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + + let style = ui.style().button_style(state); + let has_frame_margin = frame.unwrap_or_else(|| ui.visuals().button_frame); - let mut button_padding = if has_frame_margin { - ui.spacing().button_padding - } else { - Vec2::ZERO - }; - if small { - button_padding.y = 0.0; - } + layout.map_texts(|t| match t { + WidgetText::RichText(mut text) => { + let text_mut = Arc::make_mut(&mut text); + *text_mut = mem::take(text_mut).font(style.text.font_id.clone()); + WidgetText::RichText(text) + } + WidgetText::Text(text) => { + let rich_text = RichText::new(text.clone()).font(style.text.font_id.clone()); + WidgetText::RichText(Arc::new(rich_text)) + } + w => w, + }); - let mut prepared = layout - .frame(Frame::new().inner_margin(button_padding)) - .min_size(min_size) - .allocate(ui); + let mut prepared = layout.frame(style.frame).min_size(min_size).allocate(ui); let response = if ui.is_rect_visible(prepared.response.rect) { - let visuals = ui.style().interact_selectable(&prepared.response, selected); - let visible_frame = if frame_when_inactive { has_frame_margin } else { @@ -310,23 +317,13 @@ impl<'a> Button<'a> { }; if image_tint_follows_text_color { - prepared.map_images(|image| image.tint(visuals.text_color())); + prepared.map_images(|image| image.tint(style.text.color)); } - prepared.fallback_text_color = visuals.text_color(); + prepared.fallback_text_color = style.text.color; if visible_frame { - let stroke = stroke.unwrap_or(visuals.bg_stroke); - let fill = fill.unwrap_or(visuals.weak_bg_fill); - prepared.frame = prepared - .frame - .inner_margin( - button_padding + Vec2::splat(visuals.expansion) - Vec2::splat(stroke.width), - ) - .outer_margin(-Vec2::splat(visuals.expansion)) - .fill(fill) - .stroke(stroke) - .corner_radius(corner_radius.unwrap_or(visuals.corner_radius)); + prepared.frame = style.frame; } prepared.paint(ui) diff --git a/crates/egui/src/widgets/drag_value.rs b/crates/egui/src/widgets/drag_value.rs index 9515726c2..1c4caf995 100644 --- a/crates/egui/src/widgets/drag_value.rs +++ b/crates/egui/src/widgets/drag_value.rs @@ -4,7 +4,7 @@ use std::{cmp::Ordering, ops::RangeInclusive}; use crate::{ Button, CursorIcon, Id, Key, MINUS_CHAR_STR, Modifiers, NumExt as _, Response, RichText, Sense, - TextEdit, TextWrapMode, Ui, Widget, WidgetInfo, emath, text, + TextEdit, TextWrapMode, Ui, Widget, WidgetInfo, emath, grid::State, text, }; // ---------------------------------------------------------------------------- @@ -447,6 +447,10 @@ impl Widget for DragValue<'_> { let id = ui.next_auto_id(); let is_slow_speed = shift && ui.ctx().is_being_dragged(id); + let response = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let style = ui.style().drag_value_style(state); + // The following ensures that when a `DragValue` receives focus, // it is immediately rendered in edit mode, rather than being rendered // in button mode for just one frame. This is important for @@ -560,13 +564,14 @@ impl Widget for DragValue<'_> { .clip_text(false) .horizontal_align(ui.layout().horizontal_align()) .vertical_align(ui.layout().vertical_align()) - .margin(ui.spacing().button_padding) - .min_size(ui.spacing().interact_size) + .margin(style.frame.inner_margin) + .min_size(style.min_size) .id(id) .desired_width( ui.spacing().interact_size.x - 2.0 * ui.spacing().button_padding.x, ) - .font(text_style), + .text_color(style.text.color) + .font(style.text.font_id), ); // Select all text when the edit gains focus. From a99adc6c9388ab9b2fb0b2678cf1304a15e866a6 Mon Sep 17 00:00:00 2001 From: adrien <221212@umons.ac.be> Date: Mon, 13 Oct 2025 21:46:50 +0200 Subject: [PATCH 2/9] Finish button : retrocompatibility + comments --- crates/egui/src/widgets/button.rs | 38 +++++++++++-------------- examples/hello_world_simple/src/main.rs | 10 ++++++- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 00d438959..7a6f03e8a 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -1,9 +1,9 @@ use std::{mem, sync::Arc}; use crate::{ - Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Frame, - Image, IntoAtoms, NumExt as _, Response, RichText, Sense, Stroke, TextStyle, TextWrapMode, Ui, - Vec2, Widget, WidgetInfo, WidgetText, WidgetType, + Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Image, + IntoAtoms, NumExt as _, Response, RichText, Sense, Stroke, TextStyle, TextWrapMode, Ui, Vec2, + Widget, WidgetInfo, WidgetText, WidgetType, style_trait::WidgetState, }; /// Clickable button with text. @@ -255,18 +255,19 @@ impl<'a> Button<'a> { pub fn atom_ui(self, ui: &mut Ui) -> AtomLayoutResponse { let Button { mut layout, - fill, - stroke, + fill: _, + stroke: _, small, frame, frame_when_inactive, mut min_size, - corner_radius, - selected, + corner_radius: _, + selected: _, image_tint_follows_text_color, limit_image_size, } = self; + // Min size height always equal or greater than interact size if not small if !small { min_size.y = min_size.y.at_least(ui.spacing().interact_size.y); } @@ -283,14 +284,15 @@ impl<'a> Button<'a> { let text = layout.text().map(String::from); + // Get the widget style let id = ui.next_auto_id(); let response: Option = ui.ctx().read_response(id); let state = response.map(|r| r.widget_state()).unwrap_or_default(); - let style = ui.style().button_style(state); let has_frame_margin = frame.unwrap_or_else(|| ui.visuals().button_frame); + // Apply the correct font on RichText and Text layout.map_texts(|t| match t { WidgetText::RichText(mut text) => { let text_mut = Arc::make_mut(&mut text); @@ -304,28 +306,22 @@ impl<'a> Button<'a> { w => w, }); - let mut prepared = layout.frame(style.frame).min_size(min_size).allocate(ui); - - let response = if ui.is_rect_visible(prepared.response.rect) { - let visible_frame = if frame_when_inactive { - has_frame_margin + // Retrocompatibility with button settings + let mut prepared = + if has_frame_margin && (frame_when_inactive || state != WidgetState::Inactive) { + layout.frame(style.frame).min_size(min_size).allocate(ui) } else { - has_frame_margin - && (prepared.response.hovered() - || prepared.response.is_pointer_button_down_on() - || prepared.response.has_focus()) + layout.min_size(min_size).allocate(ui) }; + // Get AtomLayoutResponse, empty if not visible + let response = if ui.is_rect_visible(prepared.response.rect) { if image_tint_follows_text_color { prepared.map_images(|image| image.tint(style.text.color)); } prepared.fallback_text_color = style.text.color; - if visible_frame { - prepared.frame = style.frame; - } - prepared.paint(ui) } else { AtomLayoutResponse::empty(prepared.response) diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 4fe49a89d..0514db692 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -1,7 +1,7 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release #![allow(rustdoc::missing_crate_level_docs)] // it's an example -use eframe::egui; +use eframe::egui::{self, Button}; fn main() -> eframe::Result { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -27,6 +27,14 @@ fn main() -> eframe::Result { if ui.button("Increment").clicked() { age += 1; } + + ui.add(Button::new("no frame").frame(false)); + ui.add(Button::new("small").small()); + ui.add_enabled( + false, + Button::new("no frame inactive").frame_when_inactive(false), + ); + ui.label(format!("Hello '{name}', age {age}")); }); }) From ad4b0de2b371be6937a391e19ecada61a8f07f81 Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Wed, 15 Oct 2025 15:35:03 +0200 Subject: [PATCH 3/9] fix some logic --- crates/egui/src/widgets/button.rs | 17 ++++++++--------- examples/hello_world_simple/src/main.rs | 7 +++---- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 7a6f03e8a..70505a999 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -284,23 +284,22 @@ impl<'a> Button<'a> { let text = layout.text().map(String::from); - // Get the widget style + // Get the widget style by reading the rect from the previous pass let id = ui.next_auto_id(); let response: Option = ui.ctx().read_response(id); let state = response.map(|r| r.widget_state()).unwrap_or_default(); let style = ui.style().button_style(state); + // let has_frame_margin = frame.unwrap_or_else(|| ui.visuals().button_frame); - // Apply the correct font on RichText and Text + // Apply the correct font and color if Text + // We assume that the other WidgetText have already a Fontid and color layout.map_texts(|t| match t { - WidgetText::RichText(mut text) => { - let text_mut = Arc::make_mut(&mut text); - *text_mut = mem::take(text_mut).font(style.text.font_id.clone()); - WidgetText::RichText(text) - } WidgetText::Text(text) => { - let rich_text = RichText::new(text.clone()).font(style.text.font_id.clone()); + let rich_text = RichText::new(text.clone()) + .font(style.text.font_id.clone()) + .color(style.text.color); WidgetText::RichText(Arc::new(rich_text)) } w => w, @@ -308,7 +307,7 @@ impl<'a> Button<'a> { // Retrocompatibility with button settings let mut prepared = - if has_frame_margin && (frame_when_inactive || state != WidgetState::Inactive) { + if has_frame_margin && (state != WidgetState::Inactive || frame_when_inactive) { layout.frame(style.frame).min_size(min_size).allocate(ui) } else { layout.min_size(min_size).allocate(ui) diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 0514db692..9a0d98d16 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -28,12 +28,11 @@ fn main() -> eframe::Result { age += 1; } + // Button test ui.add(Button::new("no frame").frame(false)); ui.add(Button::new("small").small()); - ui.add_enabled( - false, - Button::new("no frame inactive").frame_when_inactive(false), - ); + ui.add_enabled(false, Button::new("disabled")); + ui.add(Button::new("no frame inactive").frame_when_inactive(false)); ui.label(format!("Hello '{name}', age {age}")); }); From f66b5b599b0012890512f308a23d1c8c7e3f5aaa Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Wed, 15 Oct 2025 17:44:29 +0200 Subject: [PATCH 4/9] apply style to label --- crates/egui/src/style_trait.rs | 31 +++++++++---- crates/egui/src/widgets/button.rs | 1 - crates/egui/src/widgets/label.rs | 30 ++++++++++--- examples/hello_world_simple/src/main.rs | 59 ++++++++++++++++++------- 4 files changed, 92 insertions(+), 29 deletions(-) diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs index 079013649..375bb0480 100644 --- a/crates/egui/src/style_trait.rs +++ b/crates/egui/src/style_trait.rs @@ -1,8 +1,8 @@ use emath::Vec2; -use epaint::{Color32, FontId, Stroke}; +use epaint::{Color32, FontId, Shadow, Stroke, text::TextWrapMode}; use crate::{ - Frame, Response, Style, + Frame, Response, Style, TextStyle, style::{WidgetVisuals, Widgets}, }; @@ -66,11 +66,12 @@ pub struct ImageStyle { } pub struct LabelStyle { + /// Frame around pub frame: Frame, + /// Text style pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, - pub stroke: Stroke, + /// Wrap mode used + pub wrap_mode: TextWrapMode, } pub struct RadioButtonStyle { @@ -149,8 +150,8 @@ impl Style { }, stroke: visuals.fg_stroke, text: TextVisuals { - color: visuals.fg_stroke.color, - font_id: font_id.unwrap_or(FontId::new(13.0, epaint::FontFamily::Proportional)), + color: visuals.text_color(), + font_id: font_id.unwrap_or(TextStyle::Body.resolve(self)), }, } } @@ -165,7 +166,21 @@ impl Style { // pub fn checkbox_style(&self, state: WidgetState) -> CheckboxStylee {} - // pub fn label_style(&self, state: WidgetState) -> LabelStyle {} + pub fn label_style(&self, state: WidgetState) -> LabelStyle { + let ws = self.widget_style(state); + LabelStyle { + frame: Frame { + fill: ws.frame.fill, + inner_margin: 0.0.into(), + outer_margin: 0.0.into(), + stroke: Stroke::NONE, + shadow: Shadow::NONE, + corner_radius: 0.into(), + }, + text: ws.text, + wrap_mode: TextWrapMode::Wrap, + } + } pub fn drag_value_style(&self, state: WidgetState) -> DragValueStyle { let ws = self.widget_style(state); diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 70505a999..128429b00 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -290,7 +290,6 @@ impl<'a> Button<'a> { let state = response.map(|r| r.widget_state()).unwrap_or_default(); let style = ui.style().button_style(state); - // let has_frame_margin = frame.unwrap_or_else(|| ui.visuals().button_frame); // Apply the correct font and color if Text diff --git a/crates/egui/src/widgets/label.rs b/crates/egui/src/widgets/label.rs index 86259ab2a..8c4d77dd8 100644 --- a/crates/egui/src/widgets/label.rs +++ b/crates/egui/src/widgets/label.rs @@ -1,8 +1,9 @@ use std::sync::Arc; use crate::{ - Align, Direction, FontSelection, Galley, Pos2, Response, Sense, Stroke, TextWrapMode, Ui, - Widget, WidgetInfo, WidgetText, WidgetType, epaint, pos2, text_selection::LabelSelectionState, + Align, Direction, FontSelection, Frame, Galley, Pos2, Response, RichText, Sense, Stroke, + TextWrapMode, Ui, Widget, WidgetInfo, WidgetText, WidgetType, epaint, pos2, + text_selection::LabelSelectionState, }; /// Static text. @@ -179,10 +180,16 @@ impl Label { return (pos, galley, response); } + // Get the widget style by reading the rect from the previous pass + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let style = ui.style().label_style(state); + let valign = ui.text_valign(); let mut layout_job = Arc::unwrap_or_clone(self.text.into_layout_job( ui.style(), - FontSelection::Default, + style.text.font_id.into(), // Use the style font valign, )); @@ -266,7 +273,7 @@ impl Label { } impl Widget for Label { - fn ui(self, ui: &mut Ui) -> Response { + fn ui(mut self, ui: &mut Ui) -> Response { // Interactive = the uses asked to sense interaction. // We DON'T want to have the color respond just because the text is selectable; // the cursor is enough to communicate that. @@ -275,6 +282,19 @@ impl Widget for Label { let selectable = self.selectable; let show_tooltip_when_elided = self.show_tooltip_when_elided; + // Get the widget style by reading the rect from the previous pass + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let style = ui.style().label_style(state); + + // if let WidgetText::Text(text) = self.text { + // let rich_text = RichText::new(text) + // .font(style.text.font_id) + // .color(style.text.color); + // self.text = WidgetText::RichText(Arc::new(rich_text)); + // } + let (galley_pos, galley, mut response) = self.layout_in_ui(ui); response .widget_info(|| WidgetInfo::labeled(WidgetType::Label, ui.is_enabled(), galley.text())); @@ -292,7 +312,7 @@ impl Widget for Label { } let response_color = if interactive { - ui.style().interact(&response).text_color() + style.text.color } else { ui.style().visuals.text_color() }; diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 9a0d98d16..78bab8d98 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -1,7 +1,9 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release #![allow(rustdoc::missing_crate_level_docs)] // it's an example -use eframe::egui::{self, Button}; +use std::process::exit; + +use eframe::egui::{self, Color32, FontId, Label, RichText, Sense, Stroke, style::WidgetVisuals}; fn main() -> eframe::Result { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -17,24 +19,51 @@ fn main() -> eframe::Result { eframe::run_simple_native("My egui App", options, move |ctx, _frame| { egui::CentralPanel::default().show(ctx, |ui| { - ui.heading("My egui Application"); - ui.horizontal(|ui| { - let name_label = ui.label("Your name: "); - ui.text_edit_singleline(&mut name) - .labelled_by(name_label.id); + ui.ctx().style_mut(|s| { + s.visuals.widgets.inactive = WidgetVisuals { + fg_stroke: Stroke::new(1.0, Color32::LIGHT_GRAY), + ..s.visuals.widgets.inactive + }; + s.visuals.widgets.active = WidgetVisuals { + fg_stroke: Stroke::new(1.0, Color32::BLUE), + ..s.visuals.widgets.inactive + }; + s.visuals.widgets.hovered = WidgetVisuals { + fg_stroke: Stroke::new(1.0, Color32::YELLOW), + ..s.visuals.widgets.inactive + }; + s.visuals.widgets.noninteractive = WidgetVisuals { + fg_stroke: Stroke::new(1.0, Color32::RED), + ..s.visuals.widgets.inactive + }; }); - ui.add(egui::Slider::new(&mut age, 0..=120).text("age")); - if ui.button("Increment").clicked() { - age += 1; - } + + // ui.heading("My egui Application"); + // ui.horizontal(|ui| { + // let name_label = ui.label("Your name: "); + // ui.text_edit_singleline(&mut name) + // .labelled_by(name_label.id); + // }); + // ui.add(egui::Slider::new(&mut age, 0..=120).text("age")); + // if ui.button("Increment").clicked() { + // age += 1; + // } // Button test - ui.add(Button::new("no frame").frame(false)); - ui.add(Button::new("small").small()); - ui.add_enabled(false, Button::new("disabled")); - ui.add(Button::new("no frame inactive").frame_when_inactive(false)); + // ui.add(Button::new("no frame").frame(false)); + // ui.add(Button::new("small").small()); + // ui.add_enabled(false, Button::new("disabled")); + // ui.add(Button::new("no frame inactive").frame_when_inactive(false)); - ui.label(format!("Hello '{name}', age {age}")); + ui.label("Normal text"); + // Should not be affected by WidgetStyle + ui.label( + RichText::new("Unaffected by style") + .font(FontId::monospace(15.0)) + .color(Color32::KHAKI), + ); + + ui.add(Label::new("test").sense(Sense::click())) }); }) } From e39d8c43452dada8ee7bbe19a3170943e78f3e65 Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Thu, 16 Oct 2025 13:22:09 +0200 Subject: [PATCH 5/9] Finish label --- crates/egui/src/style_trait.rs | 5 +++ crates/egui/src/widgets/button.rs | 2 +- crates/egui/src/widgets/label.rs | 39 ++++++++++-------------- examples/hello_world_simple/questions.md | 9 ++++++ examples/hello_world_simple/src/main.rs | 6 ++-- 5 files changed, 35 insertions(+), 26 deletions(-) create mode 100644 examples/hello_world_simple/questions.md diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs index 375bb0480..0dfa3d020 100644 --- a/crates/egui/src/style_trait.rs +++ b/crates/egui/src/style_trait.rs @@ -12,6 +12,9 @@ pub struct TextVisuals { pub font_id: FontId, /// Font color pub color: Color32, + /// Text decoration + pub underline: Stroke, + pub strikethrough: Stroke, } /// General widget style @@ -152,6 +155,8 @@ impl Style { text: TextVisuals { color: visuals.text_color(), font_id: font_id.unwrap_or(TextStyle::Body.resolve(self)), + strikethrough: Stroke::NONE, + underline: Stroke::NONE, }, } } diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 128429b00..24ea33ab3 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -1,4 +1,4 @@ -use std::{mem, sync::Arc}; +use std::sync::Arc; use crate::{ Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Image, diff --git a/crates/egui/src/widgets/label.rs b/crates/egui/src/widgets/label.rs index 8c4d77dd8..a0805b7de 100644 --- a/crates/egui/src/widgets/label.rs +++ b/crates/egui/src/widgets/label.rs @@ -1,9 +1,8 @@ use std::sync::Arc; use crate::{ - Align, Direction, FontSelection, Frame, Galley, Pos2, Response, RichText, Sense, Stroke, - TextWrapMode, Ui, Widget, WidgetInfo, WidgetText, WidgetType, epaint, pos2, - text_selection::LabelSelectionState, + Align, Direction, Galley, Pos2, Response, Sense, TextWrapMode, Ui, Widget, WidgetInfo, + WidgetText, WidgetType, epaint, pos2, text_selection::LabelSelectionState, }; /// Static text. @@ -169,8 +168,8 @@ impl Label { sense |= select_sense; } + // If the user said "use this specific galley", then just use it: if let WidgetText::Galley(galley) = self.text { - // If the user said "use this specific galley", then just use it: let (rect, response) = ui.allocate_exact_size(galley.size(), sense); let pos = match galley.job.halign { Align::LEFT => rect.left_top(), @@ -189,7 +188,7 @@ impl Label { let valign = ui.text_valign(); let mut layout_job = Arc::unwrap_or_clone(self.text.into_layout_job( ui.style(), - style.text.font_id.into(), // Use the style font + style.text.font_id.into(), // Use the label style font valign, )); @@ -203,7 +202,6 @@ impl Label { { // On a wrapping horizontal layout we want text to start after the previous widget, // then continue on the line below! This will take some extra work: - let cursor = ui.cursor(); let first_row_indentation = available_width - ui.available_size_before_wrap().x; debug_assert!( @@ -273,7 +271,7 @@ impl Label { } impl Widget for Label { - fn ui(mut self, ui: &mut Ui) -> Response { + fn ui(self, ui: &mut Ui) -> Response { // Interactive = the uses asked to sense interaction. // We DON'T want to have the color respond just because the text is selectable; // the cursor is enough to communicate that. @@ -283,22 +281,16 @@ impl Widget for Label { let show_tooltip_when_elided = self.show_tooltip_when_elided; // Get the widget style by reading the rect from the previous pass - let id = ui.next_auto_id(); - let response: Option = ui.ctx().read_response(id); - let state = response.map(|r| r.widget_state()).unwrap_or_default(); - let style = ui.style().label_style(state); - - // if let WidgetText::Text(text) = self.text { - // let rich_text = RichText::new(text) - // .font(style.text.font_id) - // .color(style.text.color); - // self.text = WidgetText::RichText(Arc::new(rich_text)); - // } + // let id = ui.next_auto_id(); + // let response: Option = ui.ctx().read_response(id); let (galley_pos, galley, mut response) = self.layout_in_ui(ui); response .widget_info(|| WidgetInfo::labeled(WidgetType::Label, ui.is_enabled(), galley.text())); + let state = response.widget_state(); + let style = ui.style().label_style(state); + if ui.is_rect_visible(response.rect) { if show_tooltip_when_elided && galley.elided { // Keep the sections and text, but reset everything else (especially wrapping): @@ -317,11 +309,12 @@ impl Widget for Label { ui.style().visuals.text_color() }; - let underline = if response.has_focus() || response.highlighted() { - Stroke::new(1.0, response_color) - } else { - Stroke::NONE - }; + // let underline = if response.has_focus() || response.highlighted() { + // Stroke::new(1.0, response_color) + // } else { + // Stroke::NONE + // }; + let underline = style.text.underline; let selectable = selectable.unwrap_or_else(|| ui.style().interaction.selectable_labels); if selectable { diff --git a/examples/hello_world_simple/questions.md b/examples/hello_world_simple/questions.md new file mode 100644 index 000000000..a2afff1cf --- /dev/null +++ b/examples/hello_world_simple/questions.md @@ -0,0 +1,9 @@ +## Button + +- If hovering a button add a stroke, the ui shift. Maybe add the option to avoid this resize by making the frame smaller ? + +## Label + +- I understand checking if a sense has been set by the user, but why check if it's different than hover ? Is it for technical purpose or purely to avoid confusion with a link ? + +- Selecting the text while being underlined move the underline diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 78bab8d98..6798fada6 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -25,7 +25,7 @@ fn main() -> eframe::Result { ..s.visuals.widgets.inactive }; s.visuals.widgets.active = WidgetVisuals { - fg_stroke: Stroke::new(1.0, Color32::BLUE), + fg_stroke: Stroke::new(1.0, Color32::LIGHT_BLUE), ..s.visuals.widgets.inactive }; s.visuals.widgets.hovered = WidgetVisuals { @@ -63,7 +63,9 @@ fn main() -> eframe::Result { .color(Color32::KHAKI), ); - ui.add(Label::new("test").sense(Sense::click())) + ui.add(Label::new("interaction click").sense(Sense::click())); + ui.add(Label::new("focusable").sense(Sense::focusable_noninteractive())) + .request_focus(); }); }) } From 1e346da8749a35ace4d6a70a5a3e0d0bae6332a4 Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Thu, 16 Oct 2025 17:11:51 +0200 Subject: [PATCH 6/9] CheckboxStyle --- crates/egui/src/style_trait.rs | 25 +++++++++++++-- crates/egui/src/widgets/checkbox.rs | 29 ++++++++++------- examples/hello_world_simple/questions.md | 10 ++++++ examples/hello_world_simple/src/main.rs | 40 +++++++++++++++--------- 4 files changed, 76 insertions(+), 28 deletions(-) diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs index 0dfa3d020..cacf5ebe3 100644 --- a/crates/egui/src/style_trait.rs +++ b/crates/egui/src/style_trait.rs @@ -36,8 +36,10 @@ pub struct CheckboxStyle { pub frame: Frame, /// Text next to it pub text: TextVisuals, - /// Size - pub size: Vec2, + /// Box size + pub size: f32, + /// Check size + pub check_size: f32, /// Frame of the checkbox itself pub checkbox_frame: Frame, /// Checkmark stroke @@ -149,6 +151,7 @@ impl Style { fill: visuals.bg_fill, stroke: visuals.bg_stroke, corner_radius: visuals.corner_radius, + inner_margin: self.spacing.button_padding.into(), ..Default::default() }, stroke: visuals.fg_stroke, @@ -169,7 +172,23 @@ impl Style { } } - // pub fn checkbox_style(&self, state: WidgetState) -> CheckboxStylee {} + pub fn checkbox_style(&self, state: WidgetState) -> CheckboxStyle { + let visuals = self.visuals.widgets.state(state); + let ws = self.widget_style(state); + CheckboxStyle { + frame: ws.frame.fill(Color32::TRANSPARENT), + size: self.spacing.icon_width, + check_size: self.spacing.icon_width_inner, + checkbox_frame: Frame { + fill: visuals.weak_bg_fill, + corner_radius: visuals.corner_radius, + stroke: visuals.bg_stroke, + ..Default::default() + }, + text: ws.text, + stroke: ws.stroke, + } + } pub fn label_style(&self, state: WidgetState) -> LabelStyle { let ws = self.widget_style(state); diff --git a/crates/egui/src/widgets/checkbox.rs b/crates/egui/src/widgets/checkbox.rs index c90cca292..598fc15e0 100644 --- a/crates/egui/src/widgets/checkbox.rs +++ b/crates/egui/src/widgets/checkbox.rs @@ -55,10 +55,17 @@ impl Widget for Checkbox<'_> { indeterminate, } = self; - let spacing = &ui.spacing(); - let icon_width = spacing.icon_width; + // Get the widget style by reading the rect from the previous pass + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let style = ui.style().checkbox_style(state); - let mut min_size = Vec2::splat(spacing.interact_size.y); + let icon_width = style.size; + + // interact_size or size ? + // let mut min_size = Vec2::splat(ui.spacing().interact_size.y); + let mut min_size = Vec2::splat(style.size); min_size.y = min_size.y.at_least(icon_width); // In order to center the checkbox based on min_size we set the icon height to at least min_size.y @@ -72,6 +79,7 @@ impl Widget for Checkbox<'_> { let mut prepared = AtomLayout::new(atoms) .sense(Sense::click()) .min_size(min_size) + .frame(style.frame) .allocate(ui); if prepared.response.clicked() { @@ -97,17 +105,16 @@ impl Widget for Checkbox<'_> { if ui.is_rect_visible(prepared.response.rect) { // let visuals = ui.style().interact_selectable(&response, *checked); // too colorful - let visuals = *ui.style().interact(&prepared.response); - prepared.fallback_text_color = visuals.text_color(); + prepared.fallback_text_color = style.text.color; let response = prepared.paint(ui); if let Some(rect) = response.rect(rect_id) { let (small_icon_rect, big_icon_rect) = ui.spacing().icon_rectangles(rect); ui.painter().add(epaint::RectShape::new( - big_icon_rect.expand(visuals.expansion), - visuals.corner_radius, - visuals.bg_fill, - visuals.bg_stroke, + big_icon_rect, + style.checkbox_frame.corner_radius, + style.checkbox_frame.fill, + style.checkbox_frame.stroke, epaint::StrokeKind::Inside, )); @@ -116,7 +123,7 @@ impl Widget for Checkbox<'_> { ui.painter().add(Shape::hline( small_icon_rect.x_range(), small_icon_rect.center().y, - visuals.fg_stroke, + style.stroke, )); } else if *checked { // Check mark: @@ -126,7 +133,7 @@ impl Widget for Checkbox<'_> { pos2(small_icon_rect.center().x, small_icon_rect.bottom()), pos2(small_icon_rect.right(), small_icon_rect.top()), ], - visuals.fg_stroke, + style.stroke, )); } } diff --git a/examples/hello_world_simple/questions.md b/examples/hello_world_simple/questions.md index a2afff1cf..85e5d713f 100644 --- a/examples/hello_world_simple/questions.md +++ b/examples/hello_world_simple/questions.md @@ -1,3 +1,7 @@ +## General + +- Interact size is great, but it SHOULD or MUST be at least this size ? Maybe add a parameter for this choice ? + ## Button - If hovering a button add a stroke, the ui shift. Maybe add the option to avoid this resize by making the frame smaller ? @@ -7,3 +11,9 @@ - I understand checking if a sense has been set by the user, but why check if it's different than hover ? Is it for technical purpose or purely to avoid confusion with a link ? - Selecting the text while being underlined move the underline + +## Checkbox + +- Checkbox are in fact a label and a check box. To propagate the CheckBoxStyle to the label we need to use a scope or something similar and change the global style. Why bind label to the check box, the user can add it himself (To keep the great prototyping speed we could keep this behavior in a Ui method, that would just merge) + +- Propose different type of checkmark ? (eg. small square, dot, filled, custom, etc) diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 6798fada6..8f3da8a44 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -1,9 +1,10 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release #![allow(rustdoc::missing_crate_level_docs)] // it's an example -use std::process::exit; - -use eframe::egui::{self, Color32, FontId, Label, RichText, Sense, Stroke, style::WidgetVisuals}; +use eframe::egui::{ + self, Atom, Checkbox, Color32, FontId, Label, RichText, Sense, Stroke, style::WidgetVisuals, + vec2, +}; fn main() -> eframe::Result { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -16,12 +17,18 @@ fn main() -> eframe::Result { // Our application state: let mut name = "Arthur".to_owned(); let mut age = 42; + let mut is_adult = age >= 18; eframe::run_simple_native("My egui App", options, move |ctx, _frame| { egui::CentralPanel::default().show(ctx, |ui| { ui.ctx().style_mut(|s| { + s.spacing.icon_width_inner = 8.0; + s.spacing.icon_width = 15.0; + s.spacing.button_padding = vec2(5.0, 5.0); + // s.spacing.interact_size.y = 30.0; s.visuals.widgets.inactive = WidgetVisuals { fg_stroke: Stroke::new(1.0, Color32::LIGHT_GRAY), + bg_stroke: Stroke::new(1.0, Color32::LIGHT_GRAY), ..s.visuals.widgets.inactive }; s.visuals.widgets.active = WidgetVisuals { @@ -29,7 +36,7 @@ fn main() -> eframe::Result { ..s.visuals.widgets.inactive }; s.visuals.widgets.hovered = WidgetVisuals { - fg_stroke: Stroke::new(1.0, Color32::YELLOW), + fg_stroke: Stroke::new(3.0, Color32::LIGHT_YELLOW), ..s.visuals.widgets.inactive }; s.visuals.widgets.noninteractive = WidgetVisuals { @@ -55,17 +62,22 @@ fn main() -> eframe::Result { // ui.add_enabled(false, Button::new("disabled")); // ui.add(Button::new("no frame inactive").frame_when_inactive(false)); - ui.label("Normal text"); - // Should not be affected by WidgetStyle - ui.label( - RichText::new("Unaffected by style") - .font(FontId::monospace(15.0)) - .color(Color32::KHAKI), - ); + // ui.label("Normal text"); + // // Should not be affected by WidgetStyle + // ui.label( + // RichText::new("Unaffected by style") + // .font(FontId::monospace(15.0)) + // .color(Color32::KHAKI), + // ); - ui.add(Label::new("interaction click").sense(Sense::click())); - ui.add(Label::new("focusable").sense(Sense::focusable_noninteractive())) - .request_focus(); + // ui.add(Label::new("interaction click").sense(Sense::click())); + // ui.add(Label::new("focusable").sense(Sense::focusable_noninteractive())) + // .request_focus(); + + ui.add(Checkbox::new(&mut is_adult, "test")); + ui.add(Checkbox::new(&mut is_adult, "test")); + ui.add(Checkbox::new(&mut is_adult, Atom::default())); + ui.add(Checkbox::new(&mut is_adult, Atom::default()).indeterminate(true)); }); }) } From b18070caefca9ca39b9484962eb2665d794604da Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Tue, 21 Oct 2025 10:42:42 +0200 Subject: [PATCH 7/9] checkbox & cleanup --- crates/egui/src/style_trait.rs | 78 ++++--------------------- crates/egui/src/widgets/button.rs | 2 +- crates/egui/src/widgets/checkbox.rs | 12 +++- crates/egui/src/widgets/drag_value.rs | 13 ++--- crates/egui/src/widgets/label.rs | 11 +--- crates/egui/src/widgets/separator.rs | 15 ++++- examples/hello_world_simple/src/main.rs | 72 ++++------------------- 7 files changed, 50 insertions(+), 153 deletions(-) diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs index cacf5ebe3..ecb7b8fbd 100644 --- a/crates/egui/src/style_trait.rs +++ b/crates/egui/src/style_trait.rs @@ -1,4 +1,3 @@ -use emath::Vec2; use epaint::{Color32, FontId, Shadow, Stroke, text::TextWrapMode}; use crate::{ @@ -36,9 +35,9 @@ pub struct CheckboxStyle { pub frame: Frame, /// Text next to it pub text: TextVisuals, - /// Box size + /// Checkbox size pub size: f32, - /// Check size + /// Checkmark size pub check_size: f32, /// Frame of the checkbox itself pub checkbox_frame: Frame, @@ -46,30 +45,6 @@ pub struct CheckboxStyle { pub stroke: Stroke, } -pub struct DragValueStyle { - /// Frame around - pub frame: Frame, - /// Text of the value - pub text: TextVisuals, - pub min_size: Vec2, -} - -pub struct HyperlinkStyle { - pub frame: Frame, - pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, - pub stroke: Stroke, -} - -pub struct ImageStyle { - pub frame: Frame, - pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, - pub stroke: Stroke, -} - pub struct LabelStyle { /// Frame around pub frame: Frame, @@ -79,32 +54,10 @@ pub struct LabelStyle { pub wrap_mode: TextWrapMode, } -pub struct RadioButtonStyle { - pub frame: Frame, - pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, - pub stroke: Stroke, -} - pub struct SeparatorStyle { - pub size: f32, - pub stroke: Stroke, -} - -pub struct SliderStyle { - pub frame: Frame, - pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, - pub stroke: Stroke, -} - -pub struct SpinnerStyle { - pub frame: Frame, - pub text: TextVisuals, - pub size: Vec2, - pub checkbox_frame: Frame, + /// How much space is allocated in the layout direction + pub spacing: f32, + /// How to paint it pub stroke: Stroke, } @@ -206,22 +159,11 @@ impl Style { } } - pub fn drag_value_style(&self, state: WidgetState) -> DragValueStyle { - let ws = self.widget_style(state); - DragValueStyle { - frame: ws.frame.inner_margin(self.spacing.button_padding), - min_size: self.spacing.interact_size, - text: ws.text, + pub fn separator_style(&self, state: WidgetState) -> SeparatorStyle { + let visuals = self.visuals.widgets.state(state); + SeparatorStyle { + spacing: 0.0, + stroke: visuals.fg_stroke, } } - - // pub fn hyperlink_style(&self, state: WidgetState) -> HyperlinkStyle {} - - // pub fn image_style(&self, state: WidgetState) -> ImageStyle {} - - // pub fn slider_style(&self, state: WidgetState) -> SliderStyle {} - - // pub fn separator_style(&self, state: WidgetState) -> SeparatorStyle {} - - // pub fn spinner_style(&self, state: WidgetState) -> SpinnerStyle {} } diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 24ea33ab3..6b5e77b5f 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -284,7 +284,7 @@ impl<'a> Button<'a> { let text = layout.text().map(String::from); - // Get the widget style by reading the rect from the previous pass + // Get the widget style by reading the response from the previous pass let id = ui.next_auto_id(); let response: Option = ui.ctx().read_response(id); let state = response.map(|r| r.widget_state()).unwrap_or_default(); diff --git a/crates/egui/src/widgets/checkbox.rs b/crates/egui/src/widgets/checkbox.rs index 598fc15e0..d8458eeb1 100644 --- a/crates/egui/src/widgets/checkbox.rs +++ b/crates/egui/src/widgets/checkbox.rs @@ -1,3 +1,5 @@ +use emath::Rect; + use crate::{ Atom, AtomLayout, Atoms, Id, IntoAtoms, NumExt as _, Response, Sense, Shape, Ui, Vec2, Widget, WidgetInfo, WidgetType, epaint, pos2, @@ -55,7 +57,7 @@ impl Widget for Checkbox<'_> { indeterminate, } = self; - // Get the widget style by reading the rect from the previous pass + // Get the widget style by reading the response from the previous pass let id = ui.next_auto_id(); let response: Option = ui.ctx().read_response(id); let state = response.map(|r| r.widget_state()).unwrap_or_default(); @@ -109,7 +111,13 @@ impl Widget for Checkbox<'_> { let response = prepared.paint(ui); if let Some(rect) = response.rect(rect_id) { - let (small_icon_rect, big_icon_rect) = ui.spacing().icon_rectangles(rect); + let big_icon_rect = Rect::from_center_size( + pos2(rect.left() + icon_width / 2.0, rect.center().y), + Vec2::splat(style.size), + ); + let small_icon_rect = + Rect::from_center_size(big_icon_rect.center(), Vec2::splat(style.check_size)); + ui.painter().add(epaint::RectShape::new( big_icon_rect, style.checkbox_frame.corner_radius, diff --git a/crates/egui/src/widgets/drag_value.rs b/crates/egui/src/widgets/drag_value.rs index 1c4caf995..9515726c2 100644 --- a/crates/egui/src/widgets/drag_value.rs +++ b/crates/egui/src/widgets/drag_value.rs @@ -4,7 +4,7 @@ use std::{cmp::Ordering, ops::RangeInclusive}; use crate::{ Button, CursorIcon, Id, Key, MINUS_CHAR_STR, Modifiers, NumExt as _, Response, RichText, Sense, - TextEdit, TextWrapMode, Ui, Widget, WidgetInfo, emath, grid::State, text, + TextEdit, TextWrapMode, Ui, Widget, WidgetInfo, emath, text, }; // ---------------------------------------------------------------------------- @@ -447,10 +447,6 @@ impl Widget for DragValue<'_> { let id = ui.next_auto_id(); let is_slow_speed = shift && ui.ctx().is_being_dragged(id); - let response = ui.ctx().read_response(id); - let state = response.map(|r| r.widget_state()).unwrap_or_default(); - let style = ui.style().drag_value_style(state); - // The following ensures that when a `DragValue` receives focus, // it is immediately rendered in edit mode, rather than being rendered // in button mode for just one frame. This is important for @@ -564,14 +560,13 @@ impl Widget for DragValue<'_> { .clip_text(false) .horizontal_align(ui.layout().horizontal_align()) .vertical_align(ui.layout().vertical_align()) - .margin(style.frame.inner_margin) - .min_size(style.min_size) + .margin(ui.spacing().button_padding) + .min_size(ui.spacing().interact_size) .id(id) .desired_width( ui.spacing().interact_size.x - 2.0 * ui.spacing().button_padding.x, ) - .text_color(style.text.color) - .font(style.text.font_id), + .font(text_style), ); // Select all text when the edit gains focus. diff --git a/crates/egui/src/widgets/label.rs b/crates/egui/src/widgets/label.rs index a0805b7de..bd0d347fe 100644 --- a/crates/egui/src/widgets/label.rs +++ b/crates/egui/src/widgets/label.rs @@ -179,7 +179,7 @@ impl Label { return (pos, galley, response); } - // Get the widget style by reading the rect from the previous pass + // Get the widget style by reading the response from the previous pass let id = ui.next_auto_id(); let response: Option = ui.ctx().read_response(id); let state = response.map(|r| r.widget_state()).unwrap_or_default(); @@ -280,10 +280,6 @@ impl Widget for Label { let selectable = self.selectable; let show_tooltip_when_elided = self.show_tooltip_when_elided; - // Get the widget style by reading the rect from the previous pass - // let id = ui.next_auto_id(); - // let response: Option = ui.ctx().read_response(id); - let (galley_pos, galley, mut response) = self.layout_in_ui(ui); response .widget_info(|| WidgetInfo::labeled(WidgetType::Label, ui.is_enabled(), galley.text())); @@ -309,11 +305,6 @@ impl Widget for Label { ui.style().visuals.text_color() }; - // let underline = if response.has_focus() || response.highlighted() { - // Stroke::new(1.0, response_color) - // } else { - // Stroke::NONE - // }; let underline = style.text.underline; let selectable = selectable.unwrap_or_else(|| ui.style().interaction.selectable_labels); diff --git a/crates/egui/src/widgets/separator.rs b/crates/egui/src/widgets/separator.rs index 6fdd03b96..f130d9272 100644 --- a/crates/egui/src/widgets/separator.rs +++ b/crates/egui/src/widgets/separator.rs @@ -88,11 +88,22 @@ impl Separator { impl Widget for Separator { fn ui(self, ui: &mut Ui) -> Response { let Self { - spacing, + mut spacing, grow, is_horizontal_line, } = self; + // Get the widget style by reading the response from the previous pass + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let style = ui.style().separator_style(state); + + // override the spacing if not set + if spacing == 0.0 && style.spacing != 0.0 { + spacing = style.spacing; + } + let is_horizontal_line = is_horizontal_line .unwrap_or_else(|| ui.is_grid() || !ui.layout().main_dir().is_horizontal()); @@ -111,7 +122,7 @@ impl Widget for Separator { let (rect, response) = ui.allocate_at_least(size, Sense::hover()); if ui.is_rect_visible(response.rect) { - let stroke = ui.visuals().widgets.noninteractive.bg_stroke; + let stroke = style.stroke; let painter = ui.painter(); if is_horizontal_line { painter.hline( diff --git a/examples/hello_world_simple/src/main.rs b/examples/hello_world_simple/src/main.rs index 8f3da8a44..4fe49a89d 100644 --- a/examples/hello_world_simple/src/main.rs +++ b/examples/hello_world_simple/src/main.rs @@ -1,10 +1,7 @@ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] // hide console window on Windows in release #![allow(rustdoc::missing_crate_level_docs)] // it's an example -use eframe::egui::{ - self, Atom, Checkbox, Color32, FontId, Label, RichText, Sense, Stroke, style::WidgetVisuals, - vec2, -}; +use eframe::egui; fn main() -> eframe::Result { env_logger::init(); // Log to stderr (if you run with `RUST_LOG=debug`). @@ -17,67 +14,20 @@ fn main() -> eframe::Result { // Our application state: let mut name = "Arthur".to_owned(); let mut age = 42; - let mut is_adult = age >= 18; eframe::run_simple_native("My egui App", options, move |ctx, _frame| { egui::CentralPanel::default().show(ctx, |ui| { - ui.ctx().style_mut(|s| { - s.spacing.icon_width_inner = 8.0; - s.spacing.icon_width = 15.0; - s.spacing.button_padding = vec2(5.0, 5.0); - // s.spacing.interact_size.y = 30.0; - s.visuals.widgets.inactive = WidgetVisuals { - fg_stroke: Stroke::new(1.0, Color32::LIGHT_GRAY), - bg_stroke: Stroke::new(1.0, Color32::LIGHT_GRAY), - ..s.visuals.widgets.inactive - }; - s.visuals.widgets.active = WidgetVisuals { - fg_stroke: Stroke::new(1.0, Color32::LIGHT_BLUE), - ..s.visuals.widgets.inactive - }; - s.visuals.widgets.hovered = WidgetVisuals { - fg_stroke: Stroke::new(3.0, Color32::LIGHT_YELLOW), - ..s.visuals.widgets.inactive - }; - s.visuals.widgets.noninteractive = WidgetVisuals { - fg_stroke: Stroke::new(1.0, Color32::RED), - ..s.visuals.widgets.inactive - }; + ui.heading("My egui Application"); + ui.horizontal(|ui| { + let name_label = ui.label("Your name: "); + ui.text_edit_singleline(&mut name) + .labelled_by(name_label.id); }); - - // ui.heading("My egui Application"); - // ui.horizontal(|ui| { - // let name_label = ui.label("Your name: "); - // ui.text_edit_singleline(&mut name) - // .labelled_by(name_label.id); - // }); - // ui.add(egui::Slider::new(&mut age, 0..=120).text("age")); - // if ui.button("Increment").clicked() { - // age += 1; - // } - - // Button test - // ui.add(Button::new("no frame").frame(false)); - // ui.add(Button::new("small").small()); - // ui.add_enabled(false, Button::new("disabled")); - // ui.add(Button::new("no frame inactive").frame_when_inactive(false)); - - // ui.label("Normal text"); - // // Should not be affected by WidgetStyle - // ui.label( - // RichText::new("Unaffected by style") - // .font(FontId::monospace(15.0)) - // .color(Color32::KHAKI), - // ); - - // ui.add(Label::new("interaction click").sense(Sense::click())); - // ui.add(Label::new("focusable").sense(Sense::focusable_noninteractive())) - // .request_focus(); - - ui.add(Checkbox::new(&mut is_adult, "test")); - ui.add(Checkbox::new(&mut is_adult, "test")); - ui.add(Checkbox::new(&mut is_adult, Atom::default())); - ui.add(Checkbox::new(&mut is_adult, Atom::default()).indeterminate(true)); + ui.add(egui::Slider::new(&mut age, 0..=120).text("age")); + if ui.button("Increment").clicked() { + age += 1; + } + ui.label(format!("Hello '{name}', age {age}")); }); }) } From 51c6c42f0e15d96ff8c78cb45af801a4db525bc2 Mon Sep 17 00:00:00 2001 From: Adrien Zianne Date: Tue, 21 Oct 2025 11:06:39 +0200 Subject: [PATCH 8/9] Button resize fix + Margin i8 -> i16 --- crates/egui/src/style.rs | 4 +-- crates/egui/src/widgets/button.rs | 55 ++++++++++++++++++++++++++----- crates/epaint/src/margin.rs | 42 +++++++++++------------ 3 files changed, 69 insertions(+), 32 deletions(-) diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 454fc6d89..0bee9bd73 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -2600,8 +2600,8 @@ impl Widget for &mut Margin { } else { // Make sure it is not same: if self.is_same() { - if self.right == i8::MAX { - self.right = i8::MAX - 1; + if self.right == i16::MAX { + self.right = i16::MAX - 1; } else { self.right += 1; } diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 6b5e77b5f..e20a09bbc 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -1,5 +1,7 @@ use std::sync::Arc; +use epaint::Margin; + use crate::{ Atom, AtomExt as _, AtomKind, AtomLayout, AtomLayoutResponse, Color32, CornerRadius, Image, IntoAtoms, NumExt as _, Response, RichText, Sense, Stroke, TextStyle, TextWrapMode, Ui, Vec2, @@ -255,14 +257,14 @@ impl<'a> Button<'a> { pub fn atom_ui(self, ui: &mut Ui) -> AtomLayoutResponse { let Button { mut layout, - fill: _, - stroke: _, + fill, + stroke, small, frame, frame_when_inactive, mut min_size, - corner_radius: _, - selected: _, + corner_radius, + selected, image_tint_follows_text_color, limit_image_size, } = self; @@ -284,14 +286,49 @@ impl<'a> Button<'a> { let text = layout.text().map(String::from); - // Get the widget style by reading the response from the previous pass - let id = ui.next_auto_id(); - let response: Option = ui.ctx().read_response(id); - let state = response.map(|r| r.widget_state()).unwrap_or_default(); + let state = if selected { + // If selected is true then the state is active + WidgetState::Active + } else { + // Get the widget state by reading the response from the previous pass + let id = ui.next_auto_id(); + let response: Option = ui.ctx().read_response(id); + response.map(|r| r.widget_state()).unwrap_or_default() + }; + let style = ui.style().button_style(state); let has_frame_margin = frame.unwrap_or_else(|| ui.visuals().button_frame); + let mut button_padding = if has_frame_margin { + style.frame.inner_margin + } else { + Margin::ZERO + }; + if small { + button_padding.bottom = 0; + button_padding.top = 0; + } + + // Override global style by local style + let mut frame = style.frame; + if let Some(fill) = fill { + frame = frame.fill(fill); + } + if let Some(corner_radius) = corner_radius { + frame = frame.corner_radius(corner_radius); + } + if let Some(stroke) = stroke { + frame = frame.stroke(stroke); + } + + frame = frame.inner_margin(Margin { + left: button_padding.left - frame.stroke.width as i16, + top: button_padding.top - frame.stroke.width as i16, + right: button_padding.right - frame.stroke.width as i16, + bottom: button_padding.bottom - frame.stroke.width as i16, + }); + // Apply the correct font and color if Text // We assume that the other WidgetText have already a Fontid and color layout.map_texts(|t| match t { @@ -307,7 +344,7 @@ impl<'a> Button<'a> { // Retrocompatibility with button settings let mut prepared = if has_frame_margin && (state != WidgetState::Inactive || frame_when_inactive) { - layout.frame(style.frame).min_size(min_size).allocate(ui) + layout.frame(frame).min_size(min_size).allocate(ui) } else { layout.min_size(min_size).allocate(ui) }; diff --git a/crates/epaint/src/margin.rs b/crates/epaint/src/margin.rs index e6f6d2287..66402a7ba 100644 --- a/crates/epaint/src/margin.rs +++ b/crates/epaint/src/margin.rs @@ -8,15 +8,15 @@ use emath::{Rect, Vec2, vec2}; /// Negative margins are possible, but may produce weird behavior. /// Use with care. /// -/// All values are stored as [`i8`] to keep the size of [`Margin`] small. +/// All values are stored as [`i16`] to keep the size of [`Margin`] small. /// If you want floats, use [`crate::MarginF32`] instead. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct Margin { - pub left: i8, - pub right: i8, - pub top: i8, - pub bottom: i8, + pub left: i16, + pub right: i16, + pub top: i16, + pub bottom: i16, } impl Margin { @@ -30,7 +30,7 @@ impl Margin { /// The same margin on every side. #[doc(alias = "symmetric")] #[inline] - pub const fn same(margin: i8) -> Self { + pub const fn same(margin: i16) -> Self { Self { left: margin, right: margin, @@ -41,7 +41,7 @@ impl Margin { /// Margins with the same size on opposing sides #[inline] - pub const fn symmetric(x: i8, y: i8) -> Self { + pub const fn symmetric(x: i16, y: i16) -> Self { Self { left: x, right: x, @@ -98,9 +98,9 @@ impl Margin { } } -impl From for Margin { +impl From for Margin { #[inline] - fn from(v: i8) -> Self { + fn from(v: i16) -> Self { Self::same(v) } } @@ -134,12 +134,12 @@ impl std::ops::Add for Margin { } } -/// `Margin + i8` -impl std::ops::Add for Margin { +/// `Margin + i16` +impl std::ops::Add for Margin { type Output = Self; #[inline] - fn add(self, v: i8) -> Self { + fn add(self, v: i16) -> Self { Self { left: self.left.saturating_add(v), right: self.right.saturating_add(v), @@ -149,10 +149,10 @@ impl std::ops::Add for Margin { } } -/// `Margin += i8` -impl std::ops::AddAssign for Margin { +/// `Margin += i16` +impl std::ops::AddAssign for Margin { #[inline] - fn add_assign(&mut self, v: i8) { + fn add_assign(&mut self, v: i16) { *self = *self + v; } } @@ -214,12 +214,12 @@ impl std::ops::Sub for Margin { } } -/// `Margin - i8` -impl std::ops::Sub for Margin { +/// `Margin - i16` +impl std::ops::Sub for Margin { type Output = Self; #[inline] - fn sub(self, v: i8) -> Self { + fn sub(self, v: i16) -> Self { Self { left: self.left.saturating_sub(v), right: self.right.saturating_sub(v), @@ -229,10 +229,10 @@ impl std::ops::Sub for Margin { } } -/// `Margin -= i8` -impl std::ops::SubAssign for Margin { +/// `Margin -= i16` +impl std::ops::SubAssign for Margin { #[inline] - fn sub_assign(&mut self, v: i8) { + fn sub_assign(&mut self, v: i16) { *self = *self - v; } } From f97ade3d7b86d21e2d364039bf5179361469aea1 Mon Sep 17 00:00:00 2001 From: adrien <221212@umons.ac.be> Date: Fri, 7 Nov 2025 11:11:07 +0100 Subject: [PATCH 9/9] check passed --- .gitignore | 1 + crates/egui/src/style.rs | 4 +- crates/egui/src/style_trait.rs | 10 ++ crates/egui/src/widgets/button.rs | 8 +- .../egui_demo_app/tests/snapshots/clock.png | 4 +- .../tests/snapshots/custom3d.png | 4 +- .../tests/snapshots/easymarkeditor.png | 4 +- .../tests/snapshots/imageviewer.png | 4 +- .../tests/snapshots/demos/Clipboard Test.png | 4 +- .../tests/snapshots/demos/Code Example.png | 4 +- .../tests/snapshots/demos/Dancing Strings.png | 4 +- .../tests/snapshots/demos/Font Book.png | 4 +- .../tests/snapshots/demos/Frame.png | 4 +- .../tests/snapshots/demos/Grid Test.png | 4 +- .../snapshots/demos/Input Event History.png | 4 +- .../tests/snapshots/demos/Input Test.png | 4 +- .../tests/snapshots/demos/Layout Test.png | 4 +- .../tests/snapshots/demos/Multi Touch.png | 4 +- .../tests/snapshots/demos/Painting.png | 4 +- .../tests/snapshots/demos/Panels.png | 4 +- .../tests/snapshots/demos/Popups.png | 4 +- .../tests/snapshots/demos/Scene.png | 4 +- .../tests/snapshots/demos/Screenshot.png | 4 +- .../tests/snapshots/demos/Scrolling.png | 4 +- .../tests/snapshots/demos/Sliders.png | 4 +- .../tests/snapshots/demos/Table.png | 4 +- .../snapshots/demos/Tessellation Test.png | 4 +- .../tests/snapshots/demos/Text Layout.png | 4 +- .../tests/snapshots/demos/Tooltips.png | 4 +- .../tests/snapshots/demos/Undo Redo.png | 4 +- .../tests/snapshots/demos/Window Options.png | 4 +- .../snapshots/demos/Window Resize Test.png | 4 +- .../tests/snapshots/modals_1.png | 4 +- .../tests/snapshots/modals_2.png | 4 +- .../tests/snapshots/modals_3.png | 4 +- .../snapshots/rendering_test/dpi_1.00.png | 4 +- .../snapshots/rendering_test/dpi_1.25.png | 4 +- .../snapshots/rendering_test/dpi_1.50.png | 4 +- .../snapshots/rendering_test/dpi_1.67.png | 4 +- .../snapshots/rendering_test/dpi_1.75.png | 4 +- .../snapshots/rendering_test/dpi_2.00.png | 4 +- .../tessellation_test/Additive rectangle.png | 4 +- .../tessellation_test/Blurred stroke.png | 4 +- .../snapshots/tessellation_test/Blurred.png | 4 +- .../tessellation_test/Minimal rounding.png | 4 +- .../snapshots/tessellation_test/Normal.png | 4 +- .../Thick stroke, minimal rounding.png | 4 +- .../tessellation_test/Thin filled.png | 4 +- .../tessellation_test/Thin stroked.png | 4 +- .../snapshots/widget_gallery_dark_x1.png | 4 +- .../snapshots/widget_gallery_dark_x2.png | 4 +- .../snapshots/widget_gallery_light_x1.png | 4 +- .../snapshots/widget_gallery_light_x2.png | 4 +- .../tests/snapshots/combobox_opened.png | 4 +- .../tests/snapshots/menu/closed_hovered.png | 4 +- .../tests/snapshots/menu/opened.png | 4 +- .../tests/snapshots/menu/submenu.png | 4 +- .../tests/snapshots/menu/subsubmenu.png | 4 +- .../override_text_color_interactive.png | 4 +- .../tests/snapshots/readme_example.png | 4 +- .../tests/snapshots/test_shrink.png | 4 +- .../tests/snapshots/test_tooltip_hidden.png | 4 +- .../tests/snapshots/test_tooltip_shown.png | 4 +- crates/epaint/src/margin.rs | 42 ++++----- scripts/check.sh | 92 ------------------- .../tests/snapshots/layout/checkbox.png | 4 +- .../snapshots/layout/checkbox_checked.png | 4 +- .../snapshots/layout/selectable_value.png | 4 +- .../layout/selectable_value_selected.png | 4 +- .../tests/snapshots/text_edit_rtl_2.png | 4 +- .../tests/snapshots/visuals/button.png | 4 +- .../tests/snapshots/visuals/button_image.png | 4 +- .../visuals/button_image_shortcut.png | 4 +- .../button_image_shortcut_selected.png | 4 +- .../tests/snapshots/visuals/checkbox.png | 4 +- .../snapshots/visuals/checkbox_checked.png | 4 +- .../tests/snapshots/visuals/drag_value.png | 4 +- .../snapshots/visuals/selectable_value.png | 4 +- .../visuals/selectable_value_selected.png | 4 +- .../tests/snapshots/visuals/text_edit.png | 4 +- 80 files changed, 186 insertions(+), 267 deletions(-) delete mode 100755 scripts/check.sh diff --git a/.gitignore b/.gitignore index 588826e7d..5d96b3808 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /.vscode /media/* .idea/ +/scripts/check.sh diff --git a/crates/egui/src/style.rs b/crates/egui/src/style.rs index 0bee9bd73..454fc6d89 100644 --- a/crates/egui/src/style.rs +++ b/crates/egui/src/style.rs @@ -2600,8 +2600,8 @@ impl Widget for &mut Margin { } else { // Make sure it is not same: if self.is_same() { - if self.right == i16::MAX { - self.right = i16::MAX - 1; + if self.right == i8::MAX { + self.right = i8::MAX - 1; } else { self.right += 1; } diff --git a/crates/egui/src/style_trait.rs b/crates/egui/src/style_trait.rs index ecb7b8fbd..7696cd4ea 100644 --- a/crates/egui/src/style_trait.rs +++ b/crates/egui/src/style_trait.rs @@ -9,8 +9,10 @@ use crate::{ pub struct TextVisuals { /// Font used pub font_id: FontId, + /// Font color pub color: Color32, + /// Text decoration pub underline: Stroke, pub strikethrough: Stroke, @@ -33,14 +35,19 @@ pub struct ButtonStyle { pub struct CheckboxStyle { /// Frame around pub frame: Frame, + /// Text next to it pub text: TextVisuals, + /// Checkbox size pub size: f32, + /// Checkmark size pub check_size: f32, + /// Frame of the checkbox itself pub checkbox_frame: Frame, + /// Checkmark stroke pub stroke: Stroke, } @@ -48,8 +55,10 @@ pub struct CheckboxStyle { pub struct LabelStyle { /// Frame around pub frame: Frame, + /// Text style pub text: TextVisuals, + /// Wrap mode used pub wrap_mode: TextWrapMode, } @@ -57,6 +66,7 @@ pub struct LabelStyle { pub struct SeparatorStyle { /// How much space is allocated in the layout direction pub spacing: f32, + /// How to paint it pub stroke: Stroke, } diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index e20a09bbc..e27ee0e9b 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -323,10 +323,10 @@ impl<'a> Button<'a> { } frame = frame.inner_margin(Margin { - left: button_padding.left - frame.stroke.width as i16, - top: button_padding.top - frame.stroke.width as i16, - right: button_padding.right - frame.stroke.width as i16, - bottom: button_padding.bottom - frame.stroke.width as i16, + left: button_padding.left - frame.stroke.width as i8, + top: button_padding.top - frame.stroke.width as i8, + right: button_padding.right - frame.stroke.width as i8, + bottom: button_padding.bottom - frame.stroke.width as i8, }); // Apply the correct font and color if Text diff --git a/crates/egui_demo_app/tests/snapshots/clock.png b/crates/egui_demo_app/tests/snapshots/clock.png index 39d9bb5ce..29e56828e 100644 --- a/crates/egui_demo_app/tests/snapshots/clock.png +++ b/crates/egui_demo_app/tests/snapshots/clock.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:44a68dc4d3aeebeb2d296c5c8e03aac330e1e4552364084347b710326c88f70c -size 335794 +oid sha256:7ea2f4e2fc86a3b5a612448d79589df8f5432d8891241541bba2135d80137ef0 +size 335919 diff --git a/crates/egui_demo_app/tests/snapshots/custom3d.png b/crates/egui_demo_app/tests/snapshots/custom3d.png index deed497b1..ca3551c2e 100644 --- a/crates/egui_demo_app/tests/snapshots/custom3d.png +++ b/crates/egui_demo_app/tests/snapshots/custom3d.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9a760fe4a695e6321f00e40bfa76fd0195bee7157a1217572765e3f146ea2cc -size 93640 +oid sha256:c79323e08a7027699082689194570c9b6c738d4b4d7d227ec4421bed028a12fa +size 93808 diff --git a/crates/egui_demo_app/tests/snapshots/easymarkeditor.png b/crates/egui_demo_app/tests/snapshots/easymarkeditor.png index a039b8c24..bcabed9bd 100644 --- a/crates/egui_demo_app/tests/snapshots/easymarkeditor.png +++ b/crates/egui_demo_app/tests/snapshots/easymarkeditor.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a1670bbfc1f0a71e20cbbeb73625c148b680963bc503d9b48e9cc43e704d7c54 -size 181671 +oid sha256:236e36cc1ae7f0b6564536e466a0d7992333254c6fd0853e85531895697fd996 +size 181936 diff --git a/crates/egui_demo_app/tests/snapshots/imageviewer.png b/crates/egui_demo_app/tests/snapshots/imageviewer.png index e1d518a96..8ce5442ca 100644 --- a/crates/egui_demo_app/tests/snapshots/imageviewer.png +++ b/crates/egui_demo_app/tests/snapshots/imageviewer.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dc9c22567b76193a7f6753c4217adb3c92afa921c488ba1cf2e14b403814e7ac -size 99841 +oid sha256:8b6566e6aae8f551adbd4f6efbf861ed59d467ec158cf28ada39177911f4b302 +size 100505 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Clipboard Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Clipboard Test.png index 373adc234..9dcfa16e7 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Clipboard Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Clipboard Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cb944eca56724f6a2106ea8db2043dc94c0ea40bdd4cdeb0e520790f97cc9598 -size 27049 +oid sha256:91823881c5d74838d2aea59e1b93a472d2133a184a1f98c9771919a5af4fd19f +size 27138 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Code Example.png b/crates/egui_demo_lib/tests/snapshots/demos/Code Example.png index 22341d7b3..935e209e8 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Code Example.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Code Example.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c1951b99908326b3f05ebb72aa4d02d0f297bdd925f38ded09041fae45400c1 -size 85217 +oid sha256:40f6059fb76d24f418d6808732a0887ec9d90f7da0be746a5ec077d2f2c0066b +size 85185 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png b/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png index 05a412548..707a18455 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Dancing Strings.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0df751bac5947c9bf6f82d075cf5670a562742b80d6c512bcd642da5ed449d26 -size 25975 +oid sha256:5f003032015dc8330f4bf5f334482b4a10fa8a25743e265ddbc5c47ff56723ff +size 26027 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Font Book.png b/crates/egui_demo_lib/tests/snapshots/demos/Font Book.png index 2a12a3152..c47eee065 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Font Book.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Font Book.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1227636b03a7d35db3482b19f6059ec7aaf03ca795edadd5338056be6f6a8f7f -size 126724 +oid sha256:a87f318f97d124b2033acf58b6f32e46e3aed018ce7705a6662681885d55e3b9 +size 126756 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Frame.png b/crates/egui_demo_lib/tests/snapshots/demos/Frame.png index 0385ab120..4c062051b 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Frame.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Frame.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c01e96bf0aab24dbcfc05f2a6dcb0ffcddff69ec2474797de4fbce0a0670a8cd -size 24964 +oid sha256:0dc7d0fc29e216e97a3a39250b40790c4e300b17a39be11674215797a471663a +size 25024 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Grid Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Grid Test.png index e14a4ecb5..6ead8b900 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Grid Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Grid Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ec357eafd145194f99c36a53a149a8b331fd691c5088df43ee96282b84bc81a4 -size 99439 +oid sha256:79b95e5b17c03b2301ab42b25ad6911ef5b536c8ecea23350e2973a46e803bdb +size 99707 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Input Event History.png b/crates/egui_demo_lib/tests/snapshots/demos/Input Event History.png index c100d9209..e4ad45786 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Input Event History.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Input Event History.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1378d865af3df02e12a0c4bc087620a4e9ef0029221db3180cdd2fd34f69d7f -size 24832 +oid sha256:c97e448603f69a413fe12f955c1e64eee8eb4700ee6e8eea1202ede9558bfd94 +size 24881 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Input Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Input Test.png index 58cc9f94b..397483016 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Input Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Input Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aff927596be5db77349ec0bbdcc852a0b1467e94c2a553a740a383ae318bad18 -size 51670 +oid sha256:a83b1f5f2ce1751e8288a2c33a46fa541cd28b2d1eb4ccefeaef4224b0be2f88 +size 51859 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Layout Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Layout Test.png index ed84d7428..53c80c31f 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Layout Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Layout Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ad26106a86a6236f0db1c51bed754b370530813e9bb6e36c1be2948820fbef25 -size 47827 +oid sha256:28f191a4ee646fc63e19ac435316fd790103221e3055da9979fce04c4f617c79 +size 48041 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Multi Touch.png b/crates/egui_demo_lib/tests/snapshots/demos/Multi Touch.png index daa9da35a..845529cde 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Multi Touch.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Multi Touch.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bf7f0a76424a959ede7afbb0eaf777638038cc6fe208ef710d9d82638d68b4d0 -size 37848 +oid sha256:744bfd9c1f714beedaf6cc3c9f5fed1aaeef0d8c8a5521fb09e419079140df35 +size 37922 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Painting.png b/crates/egui_demo_lib/tests/snapshots/demos/Painting.png index e53f4f7af..b2eeb48f8 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Painting.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Painting.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2d2370972781f15a1d602deca28bca38f1c077152801870edf2112650b8b1349 -size 17708 +oid sha256:c2449a12444f730d45b6e2856fd878d6b47a0eae56e53576a5899e61e2bd9c15 +size 17680 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Panels.png b/crates/egui_demo_lib/tests/snapshots/demos/Panels.png index 22daed0ed..60d86d8ea 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Panels.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Panels.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c91f592571ba654d0a96791662ae7530a1db4c1630b57c795d1c006ea6e46f19 -size 256975 +oid sha256:4b5998d173ac2c2ebf64ad8c2c4f98463b344a47874b9a390709e639f0fe2a62 +size 257487 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Popups.png b/crates/egui_demo_lib/tests/snapshots/demos/Popups.png index d00256a7e..f882c6728 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Popups.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Popups.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f8b937a8a63de6fedcd0f9748b1d04cd863331a297bec78906885a0107def32a -size 61242 +oid sha256:4237a914a0a57957d54020e496043305fe26438dbd4f03db15e9db43b471ccc8 +size 61322 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Scene.png b/crates/egui_demo_lib/tests/snapshots/demos/Scene.png index 2344a3868..84222180e 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Scene.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Scene.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2855bd95ab33b5232edada1f65684bbba2748025b6b64eb9ac68a5f2d10ad4bd -size 34491 +oid sha256:31ebde2103ea2c30320f95e7ee9a6960feaf3946ad3b6db0da0bbcc5f85fa89b +size 34646 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Screenshot.png b/crates/egui_demo_lib/tests/snapshots/demos/Screenshot.png index 7e49a8613..0854a469b 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Screenshot.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Screenshot.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:be599ae66323140bba4a7d63546acbf84340b57e2d82d4736bf3fe590040319d -size 23623 +oid sha256:96d5160a8e70480ac063be67481d890ddd17a929b1a6e8455e6e2568910eaa01 +size 23679 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Scrolling.png b/crates/egui_demo_lib/tests/snapshots/demos/Scrolling.png index 6de002ee4..71e08fcff 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Scrolling.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Scrolling.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:01c3cb5e8972e0cab5325328f93af8f51b35a0d61016e74969eab0f7ddea1e02 -size 176973 +oid sha256:f2b02e997183f30bdd7a53afb92cee9e91c205e2ad2f77db7781177c2f20e166 +size 168401 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Sliders.png b/crates/egui_demo_lib/tests/snapshots/demos/Sliders.png index 417b183b5..cdc160ff2 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Sliders.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Sliders.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f2f6cedc262259d52c1fbf4283d99b4b62ec732e8688b1e2799a2581425e0564 -size 120342 +oid sha256:25186c248e415becbbf00c90fad969f5b290683e1b3ffe25c07854330dbce999 +size 120914 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Table.png b/crates/egui_demo_lib/tests/snapshots/demos/Table.png index cf728bf3f..a1060783d 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Table.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Table.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4fbcca2b13c94769a62b44853b19f7e841bbb60c9197b3d0bf6e83ef9f8f76d1 -size 77815 +oid sha256:f95f41ced0ec7831acfb1257502b3d2617576b9d5002c7a30859a1150b4604cd +size 82431 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Tessellation Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Tessellation Test.png index cd8524cef..89371e3bd 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Tessellation Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Tessellation Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cc24f146adf0282cfb51723b56c76eceb92f2988fc67bbeefd16b93950505922 -size 70110 +oid sha256:d441f831d6ac99090756b8cadf13bc22ce11f8cc8aea9edced5c20b4578b71a8 +size 70273 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Text Layout.png b/crates/egui_demo_lib/tests/snapshots/demos/Text Layout.png index 28c9f57ac..fa2f782c3 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Text Layout.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Text Layout.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77aeaa1dcd391a571cb38732686e0b85b2d727975c02507a114d4e932f2c351b -size 65562 +oid sha256:4b6e31294f9933c1788eb5a4636042378610ac1756dbac26c25792fe0a4e7ba1 +size 66108 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Tooltips.png b/crates/egui_demo_lib/tests/snapshots/demos/Tooltips.png index 265dfdc1e..36fb1ae20 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Tooltips.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Tooltips.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:415b1ce17dd6df7ca7a86fed92750c2ef811ff64720a447ae3ca6be10090666e -size 64624 +oid sha256:3bdedaa57fcbd0b082000d47b43f75983171ee6ed7b7370a2092c39964d31309 +size 64906 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Undo Redo.png b/crates/egui_demo_lib/tests/snapshots/demos/Undo Redo.png index fb2bd06aa..0425e3333 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Undo Redo.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Undo Redo.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0eaf717bf0083737c4186ac39e7baf98f42fffb36b49434a6658eff1430a0ac6 -size 13187 +oid sha256:a622b6945028e019061fdcf5e6f303fe647e08b2b781ac5ce7eb6fc21bc41e7a +size 13190 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Window Options.png b/crates/egui_demo_lib/tests/snapshots/demos/Window Options.png index 97fa6cebc..5a08c93e2 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Window Options.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Window Options.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a31f0c12bb70449136443f9086103bd5b46356eedc2bb93ae1b6b10684ab69ca -size 36285 +oid sha256:b3ef5e5bdf4859a295212a17b879884f707e0c48e4a158bbe50961035af1408e +size 36410 diff --git a/crates/egui_demo_lib/tests/snapshots/demos/Window Resize Test.png b/crates/egui_demo_lib/tests/snapshots/demos/Window Resize Test.png index 7a042bdba..c7bf0cd12 100644 --- a/crates/egui_demo_lib/tests/snapshots/demos/Window Resize Test.png +++ b/crates/egui_demo_lib/tests/snapshots/demos/Window Resize Test.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b85a2af24c3361a0008fd0996e8d7244dc3e289646ec7233e8bad39a586c871c -size 44512 +oid sha256:4d100a7932f71b02732e454be4bcc9e634a0fc45be0aa4ecff8aefb148ab2f38 +size 44526 diff --git a/crates/egui_demo_lib/tests/snapshots/modals_1.png b/crates/egui_demo_lib/tests/snapshots/modals_1.png index a184b67dc..ca44d5073 100644 --- a/crates/egui_demo_lib/tests/snapshots/modals_1.png +++ b/crates/egui_demo_lib/tests/snapshots/modals_1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:60a44771c6bc9236593717236f9eca40bcb4723bac7567493cab4326f003eba3 -size 48693 +oid sha256:25c600764907b9a4e885939b3c5967ca67aa669f5ad2c30e02943bc97ca4cb87 +size 48884 diff --git a/crates/egui_demo_lib/tests/snapshots/modals_2.png b/crates/egui_demo_lib/tests/snapshots/modals_2.png index c8e7cb55a..08281c8ed 100644 --- a/crates/egui_demo_lib/tests/snapshots/modals_2.png +++ b/crates/egui_demo_lib/tests/snapshots/modals_2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:53c1509f7be264ed2947cd4ec0f10b555e9f710e949ed6fd8a73ca8ade53abd4 -size 48570 +oid sha256:831268ea2718a60e1142c98fd53c2530a25dd0bd2ededfbf3a5c213da0c72d8a +size 48751 diff --git a/crates/egui_demo_lib/tests/snapshots/modals_3.png b/crates/egui_demo_lib/tests/snapshots/modals_3.png index 777b700c2..eaea56328 100644 --- a/crates/egui_demo_lib/tests/snapshots/modals_3.png +++ b/crates/egui_demo_lib/tests/snapshots/modals_3.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:20eecafb998f69c2384afabc27eec1f97f413d603ece944adae9a99139be0b58 -size 44689 +oid sha256:9147bbd560474269a2294fab2df54d61ccf3eee0ae453e710fd8034d0f709232 +size 44865 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.00.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.00.png index 640d84c2b..e72402dc0 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.00.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.00.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f9980486c36a0242f3b043a172c411d4fc9573543d3cd7c1c43bf020c18868a9 -size 619816 +oid sha256:0f38b9859a1b272a6eeee71ce186a1ecaf245efd954ec5012a0c15236a530b6c +size 622678 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.25.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.25.png index df05ada25..84ef56d37 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.25.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.25.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:040e2e486ae4773a084da99513a53c620e8e2bba215183ec26c6e489381d6254 -size 823086 +oid sha256:8c4e677d8baf46bff20171ea9488ff36ff3d1d367355232c85b0bd1aa2e26009 +size 824364 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.50.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.50.png index c6aa2914f..1a7f93546 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.50.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.50.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:439a5f942a5f05b9c09685ef90be94c150a21a68d1d235af22372b9b6a7b7389 -size 1035734 +oid sha256:6fd3a2ae4ff90181e80c595f82f748cf333e829012bbf69fe65565ef10102006 +size 1038859 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.67.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.67.png index 1344edcfb..8a157f86d 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.67.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.67.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b7d7e290b97a8042af3af3cd9ceb274950cf607dd7e9cd6c71d5a113d3b57a5 -size 1206155 +oid sha256:be318246896430d1ccadcdbd49ce1f1b55656fc43f0df8468c96e8e8bd0186c6 +size 1210243 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.75.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.75.png index 9804e2942..f97f20ac4 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.75.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_1.75.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fedd5546e36a89121c0bb0a780b0bbe081611c2c04013064872801181503fb83 -size 1231599 +oid sha256:e8a595e9a1d0671c094aa204352a93bb35732bffdf73d2cf266baa860429d955 +size 1235525 diff --git a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_2.00.png b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_2.00.png index 04d4bb4ea..7c2c9cc6e 100644 --- a/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_2.00.png +++ b/crates/egui_demo_lib/tests/snapshots/rendering_test/dpi_2.00.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:69a7040336fc92c6d7b158283aabbc5817980c2fa84a1120b788516cf437b985 -size 1461979 +oid sha256:c1cc2ac5384a5ee41b4cdf1d83a72baf709f7cc8f3439fc5addedea723bbf96c +size 1467077 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Additive rectangle.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Additive rectangle.png index 50e84c900..b53f69bed 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Additive rectangle.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Additive rectangle.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1a32d361afa20fc8c20122a89b01fe14b45849da42663991e589579f70fb8577 -size 46790 +oid sha256:667280ce65e68ecf72202d1eb174114396300f2402e557e06677f23d22707790 +size 47010 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred stroke.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred stroke.png index ca5a23f97..5dc5c1f5a 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred stroke.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred stroke.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c8d55205cf4225123da33895ed45eb186e5e57184ef5928400a4bae3ab6092be -size 88548 +oid sha256:c8f17504759fd16d78fc0ac79d22b4daabc9cf723ff57128e3276aaf8c304446 +size 88708 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred.png index 41f9ef2f5..7a236ce37 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Blurred.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:77ab9e2e18c788f8cdbec171269afe4d0a90c52abeda7063cae3766dcaa5e93b -size 120612 +oid sha256:55c6d784f005e30fd05968b67a5afade2c0244449ead09b5eb4f24fa4e89238a +size 120408 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Minimal rounding.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Minimal rounding.png index 85d844c79..5203f867c 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Minimal rounding.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Minimal rounding.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:36622a2f934503a7b60ded2f44b002e37eedde22d548dcf5a209f54c19548665 -size 53064 +oid sha256:685df94301659df0e221e6ca1f24d3f002858ad3a7c058b2e8ce70d8aa7104f0 +size 53260 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Normal.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Normal.png index 6e6d9f0f2..0c9f36da1 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Normal.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Normal.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4adeb7a77a0d0fe85097fcd190a99b49858dce11bde601d30335afcb6cc3d5f6 -size 56276 +oid sha256:45cc44cff4facce5d19d2447431f4cad717b385afe73a22ddaa48733a2208d1f +size 56463 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thick stroke, minimal rounding.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thick stroke, minimal rounding.png index eefbac2bb..5a135fca8 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thick stroke, minimal rounding.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thick stroke, minimal rounding.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f45249f7cc90433a64856905c727571c4ef20468e2c7d3ac2029e18a0477932d -size 56743 +oid sha256:bd14edfdb8384849755784c3b6b43b8e6e88392978a64bca2683002cf5ac1169 +size 56905 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin filled.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin filled.png index 08178eaa8..0337d533c 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin filled.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin filled.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d437f68c521f3e627a1b50d46605e8b0b343c5fc3716d9669e8c4436c8992b6f -size 37602 +oid sha256:668b64f04d3249b3046a125eb3a323f30934d35329dc10c711f58ea78d98cfa2 +size 37847 diff --git a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin stroked.png b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin stroked.png index 13f057df9..32c7451c1 100644 --- a/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin stroked.png +++ b/crates/egui_demo_lib/tests/snapshots/tessellation_test/Thin stroked.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:08ba98437403a08cca825ed8e288c9f088a46d9a1081f0b0a4ed7fbb9b49bb85 -size 37640 +oid sha256:0f8644452fd5211f7ded1d73186c4d866aa49cb23d4087b2a126f87d8c3c5f62 +size 37886 diff --git a/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x1.png b/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x1.png index ab2db5eb5..acf9f71ac 100644 --- a/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x1.png +++ b/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e1ed0e40d08b2b9ea978a07a4b7bf282c9e2cba8c52896f12210f396241e1b78 -size 66859 +oid sha256:d1b80b2ae54d7e535700abf2036379c2477230353b53a5cba0bda9eebef32d3c +size 67123 diff --git a/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x2.png b/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x2.png index e84863bf4..148283d1f 100644 --- a/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x2.png +++ b/crates/egui_demo_lib/tests/snapshots/widget_gallery_dark_x2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:28f9862dd6f16b99523f5880bf90346fd9455d0d44e7bdd530d523e0b2ef2d2c -size 158892 +oid sha256:d018e524b432d24c32c641f889aab4e3d5e6192f8c22bb77e6a0f439dfdccf65 +size 159486 diff --git a/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x1.png b/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x1.png index 87eb5ce70..3ef62db98 100644 --- a/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x1.png +++ b/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x1.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:98c40c99a237f8388d82259fba4388d7b1759fe7b4bf657d326532934135c934 -size 61119 +oid sha256:b4906bc38d36cb837b417445a24c091c488600bff67be4ed4fc98653ba79dbf3 +size 61403 diff --git a/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x2.png b/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x2.png index c2c4705e1..8bd994095 100644 --- a/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x2.png +++ b/crates/egui_demo_lib/tests/snapshots/widget_gallery_light_x2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:90d36311ce5b1dcf81cab22113620a3362f255059d1f52c6794c8249f960549e -size 152215 +oid sha256:2e3c288d8e5cb768345f0577ad965cfb207b47bf37497a4283d28305dd8427ea +size 152658 diff --git a/crates/egui_kittest/tests/snapshots/combobox_opened.png b/crates/egui_kittest/tests/snapshots/combobox_opened.png index aaa7198ce..b64baffec 100644 --- a/crates/egui_kittest/tests/snapshots/combobox_opened.png +++ b/crates/egui_kittest/tests/snapshots/combobox_opened.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f70ef032c241cd63675a246de07886c5c822e6fe21525b3a6d3fee106a589c9 -size 7501 +oid sha256:ec3b264d0243f950babd8eb943efcaa2d40b0fa586cf391ab6ff28e56f1318bb +size 7623 diff --git a/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png b/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png index d2969adee..7f6820276 100644 --- a/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png +++ b/crates/egui_kittest/tests/snapshots/menu/closed_hovered.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:dd6e159a462dde10240c4ca51da5ca5badfb7fc170bad97a59106babb72f8ae3 -size 10795 +oid sha256:1ed9c5dca0551d8e6177dc67def3e8819036e39d935e11f9ee77a974dd7a3306 +size 10938 diff --git a/crates/egui_kittest/tests/snapshots/menu/opened.png b/crates/egui_kittest/tests/snapshots/menu/opened.png index 30f26b446..44f9e1e31 100644 --- a/crates/egui_kittest/tests/snapshots/menu/opened.png +++ b/crates/egui_kittest/tests/snapshots/menu/opened.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8f2a5873350f85457d599c1fd165ac756ed69758e7647e160c64f44d2f35c804 -size 21812 +oid sha256:1f765cc56eb84b14d0c7d7804c5ec24f90ea8ba14ee288787aa5131d58365629 +size 22072 diff --git a/crates/egui_kittest/tests/snapshots/menu/submenu.png b/crates/egui_kittest/tests/snapshots/menu/submenu.png index 96ffaf97c..ee122f962 100644 --- a/crates/egui_kittest/tests/snapshots/menu/submenu.png +++ b/crates/egui_kittest/tests/snapshots/menu/submenu.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:facc05c499745594ac286f15645e40447633a176058337cad9edcb850ad578c7 -size 29379 +oid sha256:27c85c456e69f4d885ccf9af606e426138f6ca6b8e0762ea4806d6cc8225382c +size 29569 diff --git a/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png b/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png index d1d0b4cd3..eb4692afe 100644 --- a/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png +++ b/crates/egui_kittest/tests/snapshots/menu/subsubmenu.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9f23ff8c6782befdbe7bd5f076dcdda15c38555f8e505282369bf52e43938c1b -size 34194 +oid sha256:231c72b67e733d7c12e76d28c4702cef9490d169e80f1388ad0b5276bd7184fc +size 34175 diff --git a/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png b/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png index 6e92f9f03..6d30bd5ee 100644 --- a/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png +++ b/crates/egui_kittest/tests/snapshots/override_text_color_interactive.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2fa5cb5b96232d729f89be8cc92263715fe7197e72343b71e57e53a359afe181 -size 19881 +oid sha256:a525d62b50978bfa059f043f502ddf0ea4f8f88b2ec09cf7e07c53a7bf09e763 +size 19969 diff --git a/crates/egui_kittest/tests/snapshots/readme_example.png b/crates/egui_kittest/tests/snapshots/readme_example.png index 2c8565718..399005939 100644 --- a/crates/egui_kittest/tests/snapshots/readme_example.png +++ b/crates/egui_kittest/tests/snapshots/readme_example.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb8d702361987803995c0f557ce94552a87b97dcd25bed5ee39af4c0e6090700 -size 1904 +oid sha256:18fbcc76f0df799331760e06487d6467aa2f575ac14d31d1859bf6ba3dba2941 +size 2199 diff --git a/crates/egui_kittest/tests/snapshots/test_shrink.png b/crates/egui_kittest/tests/snapshots/test_shrink.png index c25ae0367..9155bb6e7 100644 --- a/crates/egui_kittest/tests/snapshots/test_shrink.png +++ b/crates/egui_kittest/tests/snapshots/test_shrink.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:025942c144891b8862bf931385824e0484e60f4e7766f5d4401511c72ff20756 -size 2975 +oid sha256:08da2ac5bfb1e5ef7fb97cdc792bbf0529c20276312f0c444b122af02990e78b +size 3004 diff --git a/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png b/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png index c25ae0367..9155bb6e7 100644 --- a/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png +++ b/crates/egui_kittest/tests/snapshots/test_tooltip_hidden.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:025942c144891b8862bf931385824e0484e60f4e7766f5d4401511c72ff20756 -size 2975 +oid sha256:08da2ac5bfb1e5ef7fb97cdc792bbf0529c20276312f0c444b122af02990e78b +size 3004 diff --git a/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png b/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png index 8ff6bba67..1c6358ad5 100644 --- a/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png +++ b/crates/egui_kittest/tests/snapshots/test_tooltip_shown.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c267530452adb4f1ed1440df476d576ef4c2d96e6c58068bb57fed4615f5e113 -size 4453 +oid sha256:b902df1b5971cd8d54a2e345f293bca2bf6f5ad262812ef8535f4191375e9dd2 +size 4486 diff --git a/crates/epaint/src/margin.rs b/crates/epaint/src/margin.rs index 66402a7ba..e6f6d2287 100644 --- a/crates/epaint/src/margin.rs +++ b/crates/epaint/src/margin.rs @@ -8,15 +8,15 @@ use emath::{Rect, Vec2, vec2}; /// Negative margins are possible, but may produce weird behavior. /// Use with care. /// -/// All values are stored as [`i16`] to keep the size of [`Margin`] small. +/// All values are stored as [`i8`] to keep the size of [`Margin`] small. /// If you want floats, use [`crate::MarginF32`] instead. #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)] #[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))] pub struct Margin { - pub left: i16, - pub right: i16, - pub top: i16, - pub bottom: i16, + pub left: i8, + pub right: i8, + pub top: i8, + pub bottom: i8, } impl Margin { @@ -30,7 +30,7 @@ impl Margin { /// The same margin on every side. #[doc(alias = "symmetric")] #[inline] - pub const fn same(margin: i16) -> Self { + pub const fn same(margin: i8) -> Self { Self { left: margin, right: margin, @@ -41,7 +41,7 @@ impl Margin { /// Margins with the same size on opposing sides #[inline] - pub const fn symmetric(x: i16, y: i16) -> Self { + pub const fn symmetric(x: i8, y: i8) -> Self { Self { left: x, right: x, @@ -98,9 +98,9 @@ impl Margin { } } -impl From for Margin { +impl From for Margin { #[inline] - fn from(v: i16) -> Self { + fn from(v: i8) -> Self { Self::same(v) } } @@ -134,12 +134,12 @@ impl std::ops::Add for Margin { } } -/// `Margin + i16` -impl std::ops::Add for Margin { +/// `Margin + i8` +impl std::ops::Add for Margin { type Output = Self; #[inline] - fn add(self, v: i16) -> Self { + fn add(self, v: i8) -> Self { Self { left: self.left.saturating_add(v), right: self.right.saturating_add(v), @@ -149,10 +149,10 @@ impl std::ops::Add for Margin { } } -/// `Margin += i16` -impl std::ops::AddAssign for Margin { +/// `Margin += i8` +impl std::ops::AddAssign for Margin { #[inline] - fn add_assign(&mut self, v: i16) { + fn add_assign(&mut self, v: i8) { *self = *self + v; } } @@ -214,12 +214,12 @@ impl std::ops::Sub for Margin { } } -/// `Margin - i16` -impl std::ops::Sub for Margin { +/// `Margin - i8` +impl std::ops::Sub for Margin { type Output = Self; #[inline] - fn sub(self, v: i16) -> Self { + fn sub(self, v: i8) -> Self { Self { left: self.left.saturating_sub(v), right: self.right.saturating_sub(v), @@ -229,10 +229,10 @@ impl std::ops::Sub for Margin { } } -/// `Margin -= i16` -impl std::ops::SubAssign for Margin { +/// `Margin -= i8` +impl std::ops::SubAssign for Margin { #[inline] - fn sub_assign(&mut self, v: i16) { + fn sub_assign(&mut self, v: i8) { *self = *self - v; } } diff --git a/scripts/check.sh b/scripts/check.sh deleted file mode 100755 index ffee218f6..000000000 --- a/scripts/check.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/usr/bin/env bash -# This scripts runs various CI-like checks in a convenient way. - -set -eu -script_path=$( cd "$(dirname "${BASH_SOURCE[0]}")" ; pwd -P ) -cd "$script_path/.." -set -x - -# Checks all tests, lints etc. -# Basically does what the CI does. - -# cargo +1.88.0 install --quiet typos-cli - -export RUSTFLAGS="-D warnings" -export RUSTDOCFLAGS="-D warnings" # https://github.com/emilk/egui/pull/1454 - -# Fast checks first: -typos -./scripts/lint.py -cargo fmt --all -- --check -cargo doc --quiet --lib --no-deps --all-features -cargo doc --quiet --document-private-items --no-deps --all-features -cargo clippy --quiet --all-targets --all-features -- -D warnings -cargo clippy --quiet --all-targets --all-features --release -- -D warnings # we need to check release mode too - -./scripts/clippy_wasm.sh - -cargo check --quiet --all-targets -cargo check --quiet --all-targets --all-features -cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown -cargo check --quiet -p egui_demo_app --lib --target wasm32-unknown-unknown --all-features -# TODO(#5297) re-enable --all-features once the tests work with the unity feature -cargo test --quiet --all-targets --all-features -cargo test --quiet --doc # slow - checks all doc-tests - -cargo check --quiet -p eframe --no-default-features --features "glow" -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - cargo check --quiet -p eframe --no-default-features --features "wgpu","x11" - cargo check --quiet -p eframe --no-default-features --features "wgpu","wayland" -else - cargo check --quiet -p eframe --no-default-features --features "wgpu" -fi - -cargo check --quiet -p egui --no-default-features --features "serde" -cargo check --quiet -p egui_demo_app --no-default-features --features "glow" - -if [[ "$OSTYPE" == "linux-gnu"* ]]; then - cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu","x11" - cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu","wayland" -else - cargo check --quiet -p egui_demo_app --no-default-features --features "wgpu" -fi - -cargo check --quiet -p egui_demo_lib --no-default-features -cargo check --quiet -p egui_extras --no-default-features -cargo check --quiet -p egui_glow --no-default-features -cargo check --quiet -p egui-winit --no-default-features --features "wayland" -cargo check --quiet -p egui-winit --no-default-features --features "x11" -cargo check --quiet -p emath --no-default-features -cargo check --quiet -p epaint --no-default-features --release -cargo check --quiet -p epaint --no-default-features - -cargo check --quiet -p eframe --all-features -cargo check --quiet -p egui --all-features -cargo check --quiet -p egui_demo_app --all-features -cargo check --quiet -p egui_extras --all-features -cargo check --quiet -p egui_glow --all-features -cargo check --quiet -p egui-winit --all-features -cargo check --quiet -p emath --all-features -cargo check --quiet -p epaint --all-features - -./scripts/wasm_bindgen_check.sh - -./scripts/cargo_deny.sh - -# TODO(emilk): consider using https://github.com/taiki-e/cargo-hack or https://github.com/frewsxcv/cargo-all-features - -# ------------------------------------------------------------ -# - -# For finding bloat: -# cargo bloat --release --bin egui_demo_app -n 200 | rg egui -# Also try https://github.com/google/bloaty - -# what compiles slowly? -# cargo clean && time cargo build -p eframe --timings -# https://fasterthanli.me/articles/why-is-my-rust-build-so-slow - -# what compiles slowly? -# cargo llvm-lines --lib -p egui | head -20 - -echo "All checks passed." diff --git a/tests/egui_tests/tests/snapshots/layout/checkbox.png b/tests/egui_tests/tests/snapshots/layout/checkbox.png index 18ebbdb7c..2fcfe186a 100644 --- a/tests/egui_tests/tests/snapshots/layout/checkbox.png +++ b/tests/egui_tests/tests/snapshots/layout/checkbox.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4747efdf758e7e8e2d7f3954d9595dfd45d3b4b86923b8ff39c8a96002bb4825 -size 408726 +oid sha256:ef93c74cb71d7a5386cc361ca91b3826c27c257413eaafc8f283bd177111d6b6 +size 409009 diff --git a/tests/egui_tests/tests/snapshots/layout/checkbox_checked.png b/tests/egui_tests/tests/snapshots/layout/checkbox_checked.png index 127aa7f30..544276069 100644 --- a/tests/egui_tests/tests/snapshots/layout/checkbox_checked.png +++ b/tests/egui_tests/tests/snapshots/layout/checkbox_checked.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a3ca4b3a47ff516f9b05799cdf5f92845ae1e058728d635986cc61b7317f110 -size 437102 +oid sha256:554d51d9c557d8f7bc7ef6a5cac04520e0535074c2e762d8fc5ddd23b4a037bd +size 439301 diff --git a/tests/egui_tests/tests/snapshots/layout/selectable_value.png b/tests/egui_tests/tests/snapshots/layout/selectable_value.png index 2ee7f7d0e..efb50987b 100644 --- a/tests/egui_tests/tests/snapshots/layout/selectable_value.png +++ b/tests/egui_tests/tests/snapshots/layout/selectable_value.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bfc900ea84b408564652df487e705311b164d9bd3ff5631c3cebb83b06497a7b -size 410131 +oid sha256:c70f3d9e6e767b9857b218ef25166aa0fc5a1d8b72cb9582e1322d53a3f135e4 +size 403775 diff --git a/tests/egui_tests/tests/snapshots/layout/selectable_value_selected.png b/tests/egui_tests/tests/snapshots/layout/selectable_value_selected.png index 7e3dd6319..dccd1bc3d 100644 --- a/tests/egui_tests/tests/snapshots/layout/selectable_value_selected.png +++ b/tests/egui_tests/tests/snapshots/layout/selectable_value_selected.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9d08ce85c9210a7d9046480ab208040e5ba399c40acaecf5cb43f807534bce9 -size 423523 +oid sha256:e5188b61af6366680144486d927f8b497dcc1e836ae8e5d767c5bce59e05056a +size 446497 diff --git a/tests/egui_tests/tests/snapshots/text_edit_rtl_2.png b/tests/egui_tests/tests/snapshots/text_edit_rtl_2.png index b9235740d..b6233f378 100644 --- a/tests/egui_tests/tests/snapshots/text_edit_rtl_2.png +++ b/tests/egui_tests/tests/snapshots/text_edit_rtl_2.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:38f325f2e741f18f897502c176f9a7efe276e9adab41a144511121dd8b8a3073 -size 3079 +oid sha256:055b6111aa48f19c894729e2935cb9298231aab78efb10b9e73c00da9edfd338 +size 3130 diff --git a/tests/egui_tests/tests/snapshots/visuals/button.png b/tests/egui_tests/tests/snapshots/visuals/button.png index 4c81f62fc..89958941a 100644 --- a/tests/egui_tests/tests/snapshots/visuals/button.png +++ b/tests/egui_tests/tests/snapshots/visuals/button.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1c05992e16c1abf6d174fed73d19cad6bb2266e0adb87b8232e765d75fcf3f14 -size 10310 +oid sha256:9df0ca1e011ccbba6e8620e2ef04b2e4f5614fd596a6dbc072179614552468c1 +size 10118 diff --git a/tests/egui_tests/tests/snapshots/visuals/button_image.png b/tests/egui_tests/tests/snapshots/visuals/button_image.png index 00582f3ae..305907647 100644 --- a/tests/egui_tests/tests/snapshots/visuals/button_image.png +++ b/tests/egui_tests/tests/snapshots/visuals/button_image.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7681d33a5a764187c084c966a4e47063136e2832094c44f62718447b1b3027ec -size 11292 +oid sha256:bf2a513396ba3ba90e65a163fcd21d1eb1277f59ede157c67e12f1f18cbe070a +size 11109 diff --git a/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut.png b/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut.png index 1429bfd2d..1d1373005 100644 --- a/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut.png +++ b/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b99a82e9f3dfa24c079545272d680b55c4285c276befa0efc492fe273422f541 -size 14195 +oid sha256:37cf0ae5fd2fb2e2f2b960b7ea451e380c335e42a0f4d45cacec90dfcb9bdb48 +size 13981 diff --git a/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut_selected.png b/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut_selected.png index c73effead..8216b4cdf 100644 --- a/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut_selected.png +++ b/tests/egui_tests/tests/snapshots/visuals/button_image_shortcut_selected.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:cdf079228b762949dbc67308103f8fe1328b6c0175f312ccc492d4e86d42127b -size 13868 +oid sha256:79bc45bc2c675a9deddf25aad80de45170bd97d157bfb195cd59f1b027240652 +size 14600 diff --git a/tests/egui_tests/tests/snapshots/visuals/checkbox.png b/tests/egui_tests/tests/snapshots/visuals/checkbox.png index 16d88e546..866473abb 100644 --- a/tests/egui_tests/tests/snapshots/visuals/checkbox.png +++ b/tests/egui_tests/tests/snapshots/visuals/checkbox.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:0bafe4c157696bfb52940b69501416d4da0b4eab52f34f52220d2e9ed01357cf -size 12901 +oid sha256:4f400f82eb9339c136f8ba2f393ae3b4832461fd2eca64cb4aa4f2ec60992d0c +size 13026 diff --git a/tests/egui_tests/tests/snapshots/visuals/checkbox_checked.png b/tests/egui_tests/tests/snapshots/visuals/checkbox_checked.png index fd85297ac..6b854278d 100644 --- a/tests/egui_tests/tests/snapshots/visuals/checkbox_checked.png +++ b/tests/egui_tests/tests/snapshots/visuals/checkbox_checked.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:72175bf108135b422d978b701d29e6d9a5348c536e25abc924234bc11b6b7f21 -size 14016 +oid sha256:d96e5948ab50362475ab034e428804c1091b5dfacb8e3191021b1b13c3ce9c8e +size 14060 diff --git a/tests/egui_tests/tests/snapshots/visuals/drag_value.png b/tests/egui_tests/tests/snapshots/visuals/drag_value.png index 5411009f0..a9fc67d23 100644 --- a/tests/egui_tests/tests/snapshots/visuals/drag_value.png +++ b/tests/egui_tests/tests/snapshots/visuals/drag_value.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:129121534b5f1a2a668898ebb3560820fe50aa4d3546ef46cc764d5513787e9e -size 7529 +oid sha256:2fc2d9eaec38ec6cc5466117bfa6eedf027b2f8c5d146c16428e992e71352ee2 +size 7526 diff --git a/tests/egui_tests/tests/snapshots/visuals/selectable_value.png b/tests/egui_tests/tests/snapshots/visuals/selectable_value.png index a0b480be4..e6bdd7583 100644 --- a/tests/egui_tests/tests/snapshots/visuals/selectable_value.png +++ b/tests/egui_tests/tests/snapshots/visuals/selectable_value.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ac18e2eef000a80858b2d0811f9ee31304c6ff96f7a91dc60cc1a404ae28ce38 -size 13246 +oid sha256:eaf5722dc3d31272e1f804f46a472aa12cecf2744e617378514a8314f73c173a +size 12708 diff --git a/tests/egui_tests/tests/snapshots/visuals/selectable_value_selected.png b/tests/egui_tests/tests/snapshots/visuals/selectable_value_selected.png index 291263c44..ed901d465 100644 --- a/tests/egui_tests/tests/snapshots/visuals/selectable_value_selected.png +++ b/tests/egui_tests/tests/snapshots/visuals/selectable_value_selected.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c11fe0399c85db5a618580ec4c1f2fe76176c6ea0ead3710a430d9a2bf8acc5d -size 13352 +oid sha256:7b1879c66f124ae40ce8e9fcbc1a36369ec141a31a0d5d9fb5306fe704772277 +size 13784 diff --git a/tests/egui_tests/tests/snapshots/visuals/text_edit.png b/tests/egui_tests/tests/snapshots/visuals/text_edit.png index d8e56eb2a..b3ae22df8 100644 --- a/tests/egui_tests/tests/snapshots/visuals/text_edit.png +++ b/tests/egui_tests/tests/snapshots/visuals/text_edit.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a103b51df184d5480438e8b537106432205a6d86f2927ab1bd507fe8ed3bb29b -size 7656 +oid sha256:e2051b9aeef49c404b49c6b47b8ff34be66dff2c792f5eceba456f855ebdb8bc +size 7682