diff --git a/crates/egui/src/widget_style.rs b/crates/egui/src/widget_style.rs index 005c40800..57144ed48 100644 --- a/crates/egui/src/widget_style.rs +++ b/crates/egui/src/widget_style.rs @@ -218,13 +218,18 @@ impl Style { } } -/// The root class is present on every top-level ui +/// The root class is a special class present on every top-level [`Ui`]. pub const ROOT_CLASS: &str = "root"; +/// The selected class is a special class present on selected [`Button`]. pub const SELECTED_CLASS: &str = "selected"; +/// A class is a static string identifier. pub type ClassName = Cow<'static, str>; -/// The classes assigned to a widget +/// Classes are string identifier that can be set on widget/Ui. +/// +/// This can be used by styling engine to compute a different style +/// based on the set of classes present on the widget/Ui. #[derive(Debug, Default, Clone)] pub struct Classes { classes: SmallVec<[ClassName; 5]>, diff --git a/crates/egui_demo_app/tests/snapshots/clock.png b/crates/egui_demo_app/tests/snapshots/clock.png index da8425458..b8ba70789 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:80c64fe75dfc412bb33aa977055afcb140e6bfff19128ecf5bd35318ab6773d0 -size 335380 +oid sha256:e4cff85a005ad897624f6c7a2b2ad599325ec99e0b3c9c35963f16611f283997 +size 335371 diff --git a/crates/egui_kittest/tests/snapshots/should_wait_for_images.png b/crates/egui_kittest/tests/snapshots/should_wait_for_images.png index 54c0f9d76..9709e159e 100644 --- a/crates/egui_kittest/tests/snapshots/should_wait_for_images.png +++ b/crates/egui_kittest/tests/snapshots/should_wait_for_images.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:845acb34152fb829dc24c606b1741e250f1d1fa645236ef57fce0cbda104c465 -size 2121 +oid sha256:ad75a0e568e04c20d0e3b823c7e4906c39dcd0a69a086d8e30714a9e4530d031 +size 2128 diff --git a/tests/egui_tests/tests/snapshots/visuals/button_image.png b/tests/egui_tests/tests/snapshots/visuals/button_image.png index 9d48cf0d9..eca582ec0 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:31111fd16534107d74c03b798f53a013741bc1c83cf4bb24e374e4c3cac13af3 -size 11783 +oid sha256:a2a017c2b93d1920ae85792c13eafa2fd43f93b2e3bbaa5981ed3a43050c0995 +size 11808 diff --git a/tests/egui_tests/tests/snapshots/visuals/radio.png b/tests/egui_tests/tests/snapshots/visuals/radio.png index 3762b912a..b35eb2d51 100644 --- a/tests/egui_tests/tests/snapshots/visuals/radio.png +++ b/tests/egui_tests/tests/snapshots/visuals/radio.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5e645507bdb755dc8c30e2c3ebaa1ca1a30fb9d52395d3eb70854be8ec8203da -size 11791 +oid sha256:4502cc58a4085d1e0f9945d0bd1d25adeefe71094ce94a210c57f113727f3a5a +size 11806 diff --git a/tests/egui_tests/tests/snapshots/visuals/radio_checked.png b/tests/egui_tests/tests/snapshots/visuals/radio_checked.png index 9c62da854..7bdae8cf1 100644 --- a/tests/egui_tests/tests/snapshots/visuals/radio_checked.png +++ b/tests/egui_tests/tests/snapshots/visuals/radio_checked.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:33fb05197d6ae6f56d79263db49fcbb9534ec5552e4712ee5dfd0c1f76dc745e -size 12483 +oid sha256:cdedec6788b1a5026603322db9dd9f5fa398813d8aa2c56bc60acad390110501 +size 12499