-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
010e218
commit c15a416
Showing
16 changed files
with
189 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
use fltk::{prelude::*, *}; | ||
use fltk_theme::{widget_themes::*, ThemeType, WidgetTheme}; | ||
|
||
fn main() { | ||
let a = app::App::default(); | ||
let theme = WidgetTheme::new(ThemeType::Aqua); | ||
theme.apply(); | ||
let mut win = window::Window::default().with_size(800, 800); | ||
let mut choice = menu::Choice::new(300, 10, 200, 30, None); | ||
choice.add_choice("Classic|Aero|Metro|Aqua|Greybird|Blue|HighContrast|Dark"); | ||
choice.set_value(3); | ||
choice.set_frame(OS_PANEL_THIN_UP_BOX); | ||
let mut vgrid = group::VGrid::new(50, 100, 700, 700, None); | ||
vgrid.set_params(6, 6, 5); | ||
let mut frame = frame::Frame::default().with_label(&"BUTTON_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_BUTTON_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"CHECK_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_CHECK_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"BUTTON_UP_FRAME".to_lowercase()); | ||
frame.set_frame(OS_BUTTON_UP_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"CHECK_DOWN_FRAME".to_lowercase()); | ||
frame.set_frame(OS_CHECK_DOWN_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"PANEL_THIN_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_PANEL_THIN_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"SPACER_THIN_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_SPACER_THIN_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"PANEL_THIN_UP_FRAME".to_lowercase()); | ||
frame.set_frame(OS_PANEL_THIN_UP_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"SPACER_THIN_DOWN_FRAME".to_lowercase()); | ||
frame.set_frame(OS_SPACER_THIN_DOWN_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"RADIO_ROUND_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_RADIO_ROUND_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"HOVERED_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_HOVERED_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"DEPRESSED_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_DEPRESSED_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"HOVERED_UP_FRAME".to_lowercase()); | ||
frame.set_frame(OS_HOVERED_UP_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"DEPRESSED_DOWN_FRAME".to_lowercase()); | ||
frame.set_frame(OS_DEPRESSED_DOWN_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"INPUT_THIN_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_INPUT_THIN_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"INPUT_THIN_DOWN_FRAME".to_lowercase()); | ||
frame.set_frame(OS_INPUT_THIN_DOWN_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"MINI_BUTTON_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_MINI_BUTTON_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"MINI_DEPRESSED_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_MINI_DEPRESSED_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"MINI_BUTTON_UP_FRAME".to_lowercase()); | ||
frame.set_frame(OS_MINI_BUTTON_UP_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"MINI_DEPRESSED_DOWN_FRAME".to_lowercase()); | ||
frame.set_frame(OS_MINI_DEPRESSED_DOWN_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"DEFAULT_BUTTON_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_DEFAULT_BUTTON_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"DEFAULT_HOVERED_UP_BOX".to_lowercase()); | ||
frame.set_frame(OS_DEFAULT_HOVERED_UP_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = | ||
frame::Frame::default().with_label(&"DEFAULT_DEPRESSED_DOWN_BOX".to_lowercase()); | ||
frame.set_frame(OS_DEFAULT_DEPRESSED_DOWN_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"TOOLBAR_BUTTON_HOVER_BOX".to_lowercase()); | ||
frame.set_frame(OS_TOOLBAR_BUTTON_HOVER_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"TABS_BOX".to_lowercase()); | ||
frame.set_frame(OS_TABS_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"SWATCH_BOX".to_lowercase()); | ||
frame.set_frame(OS_SWATCH_BOX); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"SWATCH_FRAME".to_lowercase()); | ||
frame.set_frame(OS_SWATCH_FRAME); | ||
frame.set_label_size(10); | ||
let mut frame = frame::Frame::default().with_label(&"BG_BOX".to_lowercase()); | ||
frame.set_frame(OS_BG_BOX); | ||
frame.set_label_size(10); | ||
frame::Frame::default(); | ||
frame::Frame::default(); | ||
frame::Frame::default(); | ||
vgrid.end(); | ||
win.end(); | ||
win.show(); | ||
choice.set_callback(|c| { | ||
let theme = match c.value() { | ||
0 => WidgetTheme::new(ThemeType::Classic), | ||
1 => WidgetTheme::new(ThemeType::Aero), | ||
2 => WidgetTheme::new(ThemeType::Metro), | ||
3 => WidgetTheme::new(ThemeType::Aqua), | ||
4 => WidgetTheme::new(ThemeType::Greybird), | ||
5 => WidgetTheme::new(ThemeType::Blue), | ||
6 => WidgetTheme::new(ThemeType::HighContrast), | ||
7 => WidgetTheme::new(ThemeType::Dark), | ||
_ => WidgetTheme::new(ThemeType::Classic), | ||
}; | ||
theme.apply(); | ||
}); | ||
a.run().unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,4 +30,4 @@ fn main() { | |
win.end(); | ||
win.show(); | ||
a.run().unwrap(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,36 @@ | ||
use fltk::{prelude::*, *}; | ||
use fltk_theme::{widget_themes, WidgetTheme, ThemeType}; | ||
use fltk_theme::{widget_themes, ThemeType, WidgetTheme}; | ||
|
||
fn main() { | ||
let a = app::App::default(); | ||
let widget_theme = WidgetTheme::new(ThemeType::Aqua); | ||
widget_theme.apply(); | ||
let theme = WidgetTheme::new(ThemeType::Aqua); | ||
theme.apply(); | ||
let mut win = window::Window::default().with_size(400, 300); | ||
let mut btn = button::Button::new(160, 200, 80, 30, "Hello"); | ||
let mut choice = menu::Choice::new(100, 100, 200, 30, None); | ||
choice.add_choice("Classic|Aero|Metro|Aqua|Greybird|Blue|HighContrast|Dark"); | ||
choice.set_value(3); | ||
choice.set_frame(widget_themes::OS_PANEL_THIN_UP_BOX); | ||
let mut check = button::CheckButton::new(160, 150, 80, 30, "Check"); | ||
check.set_value(true); | ||
let mut round = button::RoundButton::new(160, 180, 80, 30, "Round"); | ||
round.set_value(true); | ||
let mut btn = button::Button::new(160, 220, 80, 30, "Hello"); | ||
btn.set_frame(widget_themes::OS_DEFAULT_BUTTON_UP_BOX); | ||
win.end(); | ||
win.show(); | ||
choice.set_callback(|c| { | ||
let theme = match c.value() { | ||
0 => WidgetTheme::new(ThemeType::Classic), | ||
1 => WidgetTheme::new(ThemeType::Aero), | ||
2 => WidgetTheme::new(ThemeType::Metro), | ||
3 => WidgetTheme::new(ThemeType::Aqua), | ||
4 => WidgetTheme::new(ThemeType::Greybird), | ||
5 => WidgetTheme::new(ThemeType::Blue), | ||
6 => WidgetTheme::new(ThemeType::HighContrast), | ||
7 => WidgetTheme::new(ThemeType::Dark), | ||
_ => WidgetTheme::new(ThemeType::Classic), | ||
}; | ||
theme.apply(); | ||
}); | ||
a.run().unwrap(); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
mod tan; | ||
mod black; | ||
mod dark; | ||
mod gray; | ||
mod shake; | ||
mod dark; | ||
mod tan; | ||
|
||
pub use tan::*; | ||
pub use black::*; | ||
pub use dark::*; | ||
pub use gray::*; | ||
pub use shake::*; | ||
pub use dark::*; | ||
pub use tan::*; |