diff options
| author | 2022-07-09 02:28:52 +0200 | |
|---|---|---|
| committer | 2022-07-09 02:28:52 +0200 | |
| commit | e053e25d2ccb17f7a162685a106a8bbd915a873f (patch) | |
| tree | 5304f3ea2712e8889c7278ec5e57418f484d8f6c /examples/pane_grid | |
| parent | 66eb6263003c1bbedd1fd14d6b12f172d20a6211 (diff) | |
| parent | 7105db97a53d90adf429091298f31c90974d8f08 (diff) | |
| download | iced-e053e25d2ccb17f7a162685a106a8bbd915a873f.tar.gz iced-e053e25d2ccb17f7a162685a106a8bbd915a873f.tar.bz2 iced-e053e25d2ccb17f7a162685a106a8bbd915a873f.zip | |
Merge pull request #1362 from iced-rs/theming
Theming
Diffstat (limited to '')
| -rw-r--r-- | examples/pane_grid/src/main.rs | 154 |
1 files changed, 44 insertions, 110 deletions
diff --git a/examples/pane_grid/src/main.rs b/examples/pane_grid/src/main.rs index 2962ca25..5fbcea2c 100644 --- a/examples/pane_grid/src/main.rs +++ b/examples/pane_grid/src/main.rs @@ -4,6 +4,7 @@ use iced::executor; use iced::keyboard; use iced::pane_grid::{self, PaneGrid}; use iced::scrollable::{self, Scrollable}; +use iced::theme::{self, Theme}; use iced::{ Application, Color, Column, Command, Container, Element, Length, Row, Settings, Size, Subscription, Text, @@ -36,6 +37,7 @@ enum Message { impl Application for Example { type Message = Message; + type Theme = Theme; type Executor = executor::Default; type Flags = (); @@ -171,14 +173,14 @@ impl Application for Example { let text = if *is_pinned { "Unpin" } else { "Pin" }; let pin_button = Button::new(pin_button, Text::new(text).size(14)) .on_press(Message::TogglePin(id)) - .style(style::Button::Pin) + .style(theme::Button::Secondary) .padding(3); let title = Row::with_children(vec