Simplify theming for Checkbox widget

This commit is contained in:
Héctor Ramón Jiménez 2024-03-05 02:08:19 +01:00
parent f4a4845ddb
commit 1f0a0c235a
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 196 additions and 218 deletions

View file

@ -1,6 +1,5 @@
use iced::executor;
use iced::font::{self, Font};
use iced::theme;
use iced::widget::{checkbox, column, container, row, text};
use iced::{Application, Command, Element, Length, Settings, Theme};
@ -71,10 +70,10 @@ impl Application for Example {
};
let checkboxes = row![
styled_checkbox("Primary", theme::Checkbox::Primary),
styled_checkbox("Secondary", theme::Checkbox::Secondary),
styled_checkbox("Success", theme::Checkbox::Success),
styled_checkbox("Danger", theme::Checkbox::Danger),
styled_checkbox("Primary", checkbox::primary),
styled_checkbox("Secondary", checkbox::secondary),
styled_checkbox("Success", checkbox::success),
styled_checkbox("Danger", checkbox::danger),
]
.spacing(20);