Crate fltk_theme[−][src]
Expand description
fltk-theme
A theming crate for fltk-rs, based on work by Remy Oukaour and Greg Ercolano.
Usage
[dependencies] fltk = "1.1.4" fltk-theme = "0.1"
Example
Setting the color theme:
use fltk::{prelude::*, *}; use fltk_theme::{ColorTheme, color_themes}; let a = app::App::default().with_scheme(app::Scheme::Gtk); let theme = ColorTheme::from_colormap(color_themes::BLACK_THEME); theme.apply(); let mut win = window::Window::default().with_size(400, 300); let mut btn = button::Button::new(160, 200, 80, 40, "Hello"); btn.set_color(btn.color().lighter()); win.end(); win.show(); a.run().unwrap();
Setting the widget theme:
use fltk::{prelude::*, *}; use fltk_theme::{widget_themes, WidgetTheme, ThemeType}; let a = app::App::default(); let widget_theme = WidgetTheme::new(ThemeType::Aqua); widget_theme.apply(); let mut win = window::Window::default().with_size(400, 300); let mut btn = button::Button::new(160, 200, 80, 30, "Hello"); btn.set_frame(widget_themes::OS_DEFAULT_BUTTON_UP_BOX); win.end(); win.show(); a.run().unwrap();
Modules
Macros
Structs
Enums
Lists support themes