diff --git a/README.md b/README.md index 7129efb..e2f25a5 100644 --- a/README.md +++ b/README.md @@ -72,28 +72,28 @@ fn main() { ## Widget themes - Classic (old Windows theme) -![alt_test](screenshots/classic.jpg) +- ![alt_test](screenshots/classic.jpg) - Aero (Windows 7 theme) -![alt_test](screenshots/aero.jpg) +- ![alt_test](screenshots/aero.jpg) - Aqua (MacOS theme) -![alt_test](screenshots/aqua.jpg) +- ![alt_test](screenshots/aqua.jpg) - Dark -![alt_test](screenshots/dark.jpg) +- ![alt_test](screenshots/dark.jpg) - High Contrast -![alt_test](screenshots/high_contrast.jpg) +- ![alt_test](screenshots/high_contrast.jpg) - Blue -![alt_test](screenshots/blue.jpg) +- ![alt_test](screenshots/blue.jpg) - Metro (Windows 8 theme) -![alt_test](screenshots/metro.jpg) +- ![alt_test](screenshots/metro.jpg) - Greybird (Gnome xfce) -![alt_test](screenshots/greybird.jpg) +- ![alt_test](screenshots/greybird.jpg) ## Theme FrameTypes @@ -129,45 +129,46 @@ OS_BG_BOX ``` You can check the frames example to see all `FrameType`'s you can apply to you widgets. -![alt_test](screenshots/frames.jpg) +- ![alt_test](screenshots/frames.jpg) ## Color themes - Black theme -![alt_test](screenshots/black.jpg) +- ![alt_test](screenshots/black.jpg) - Dark theme -![alt_test](screenshots/dark_color.jpg) +- ![alt_test](screenshots/dark_color.jpg) - Plain gray theme -![alt_test](screenshots/plain-gray.jpg) +- ![alt_test](screenshots/plain-gray.jpg) - Tan theme -![alt_test](screenshots/tan.jpg) +- ![alt_test](screenshots/tan.jpg) - Shake theme -![alt_test](screenshots/shake.jpg) +- ![alt_test](screenshots/shake.jpg) ## Widget Schemes These provide schemes for widgets without color theming. Currently there are 6 schemes: - Aqua: Tries to mimic MacOS's styles. -- ![alt_test](screenshots/clean.jpg) +- ![alt_test](screenshots/aqua_scheme.jpg) - Fluent: Tries to mimic Window's 10 styles. -- ![alt_test](screenshots/clean.jpg) +- ![alt_test](screenshots/fluent.jpg) +- ![alt_test](screenshots/fluent2.jpg) - Clean: Taken from NTK's clear scheme. -![alt_test](screenshots/clean.jpg) +- ![alt_test](screenshots/clean.jpg) - Crystal: Taken from NTK's crystal scheme. -![alt_test](screenshots/crystal.jpg) +- ![alt_test](screenshots/crystal.jpg) - Gleam: Taken from NTK's gleam scheme. -![alt_test](screenshots/gleam.jpg) +- ![alt_test](screenshots/gleam.jpg) - SvgBased: This overrides FLTK's Base scheme round/rounded/oval FrameTypes which are drawn using scalable vector graphics. -![alt_test](screenshots/svgbased.jpg) +- ![alt_test](screenshots/svgbased.jpg) diff --git a/examples/aqua_dark.rs b/examples/aqua_dark.rs index b54646d..4352124 100644 --- a/examples/aqua_dark.rs +++ b/examples/aqua_dark.rs @@ -1,6 +1,7 @@ use fltk::{prelude::*, enums::*, *}; use fltk_theme::{WidgetScheme, SchemeType}; use fltk_theme::widget_schemes::aqua::dark::*; // get all the dark aqua colors +// use fltk_theme::widget_schemes::aqua::light::*; fn main() { let a = app::App::default(); diff --git a/screenshots/aqua_scheme.jpg b/screenshots/aqua_scheme.jpg new file mode 100755 index 0000000..8ba6fa2 Binary files /dev/null and b/screenshots/aqua_scheme.jpg differ diff --git a/screenshots/fluent.jpg b/screenshots/fluent.jpg new file mode 100755 index 0000000..81f1ae3 Binary files /dev/null and b/screenshots/fluent.jpg differ diff --git a/screenshots/fluent2.jpg b/screenshots/fluent2.jpg new file mode 100755 index 0000000..a82592f Binary files /dev/null and b/screenshots/fluent2.jpg differ diff --git a/src/widget_schemes/fluent.rs b/src/widget_schemes/fluent.rs index 1b81085..1b6c3a7 100644 --- a/src/widget_schemes/fluent.rs +++ b/src/widget_schemes/fluent.rs @@ -49,16 +49,20 @@ fn border_box(x: i32, y: i32, w: i32, h: i32, c: Color) { } fn round_box(x: i32, y: i32, w: i32, h: i32, c: Color) { - let col = c.to_rgb(); + let col = Color::BackGround.to_rgb(); + let fg = Color::contrast(Color::BackGround, Color::BackGround).to_rgb(); let svg = format!( " - + ", w, h, w / 2, h / 2, (w as f64 - 1.0) / 2.0, + fg.0, + fg.1, + fg.2, col.0, col.1, col.2