From 13dc9d528ce38269668170790a0b0b1bf2bceff5 Mon Sep 17 00:00:00 2001 From: Lucas Meurer Date: Fri, 28 Aug 2026 17:24:22 +0200 Subject: [PATCH] Wording --- crates/egui/src/theme/default_style.rs | 2 +- crates/egui/src/widgets/button.rs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/crates/egui/src/theme/default_style.rs b/crates/egui/src/theme/default_style.rs index ec4804004..196bf2280 100644 --- a/crates/egui/src/theme/default_style.rs +++ b/crates/egui/src/theme/default_style.rs @@ -62,7 +62,7 @@ impl StyleProvider for DefaultStyle { let frame = if !has_frame { // No frame at all: the button takes up no more room than its contents. Frame::new() - } else if classes.has_class(Button::CLASS_NO_FRAME_WHEN_INACTIVE) + } else if classes.has_class(Button::CLASS_HIDE_FRAME_WHEN_INACTIVE) && *state == WidgetState::Inactive { // Invisible, but as big as it will be once the user interacts with it. diff --git a/crates/egui/src/widgets/button.rs b/crates/egui/src/widgets/button.rs index 2ba5fe9c9..771f34d65 100644 --- a/crates/egui/src/widgets/button.rs +++ b/crates/egui/src/widgets/button.rs @@ -50,7 +50,8 @@ impl<'a> Button<'a> { pub const CLASS_FRAME: &'static str = "egui::frame"; /// Present on a button that should have no frame while it is inactive. - pub const CLASS_NO_FRAME_WHEN_INACTIVE: &'static str = "egui::button::no_frame_when_inactive"; + pub const CLASS_HIDE_FRAME_WHEN_INACTIVE: &'static str = + "egui::button::hide_frame_when_inactive"; pub fn new(atoms: impl IntoAtoms<'a>) -> Self { Self { @@ -187,7 +188,7 @@ impl<'a> Button<'a> { /// If `false`, the button will not have a frame when inactive. /// - /// This adds the built-in [`Self::CLASS_NO_FRAME_WHEN_INACTIVE`], which with the + /// This adds the built-in [`Self::CLASS_HIDE_FRAME_WHEN_INACTIVE`], which with the /// default style removes the fill and the stroke, but keeps the margin, so the button does /// not change size once the user interacts with it. /// @@ -197,7 +198,7 @@ impl<'a> Button<'a> { /// has no effect. #[inline] pub fn frame_when_inactive(mut self, frame_when_inactive: bool) -> Self { - self.set_class(Self::CLASS_NO_FRAME_WHEN_INACTIVE, !frame_when_inactive); + self.set_class(Self::CLASS_HIDE_FRAME_WHEN_INACTIVE, !frame_when_inactive); self }