Skip to content

Commit

Permalink
prep for bump
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Sep 28, 2021
1 parent ff6e134 commit 3c71255
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 22 deletions.
41 changes: 21 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

1 change: 1 addition & 0 deletions examples/aqua_dark.rs
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
Binary file added screenshots/aqua_scheme.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/fluent.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/fluent2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions src/widget_schemes/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
"<svg width='{}' height='{}'>
<circle cx='{}' cy='{}' r='{}' stroke='black' stroke-width='1' fill='rgb({},{},{})'/>
<circle cx='{}' cy='{}' r='{}' stroke='rgb({},{},{})' stroke-width='1' fill='rgb({},{},{})'/>
</svg>",
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
Expand Down

0 comments on commit 3c71255

Please sign in to comment.