Skip to content

Commit

Permalink
some updates
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Oct 6, 2022
1 parent e168812 commit 12bda38
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/widget_schemes/aqua.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ fn down_box(x: i32, y: i32, w: i32, h: i32, c: Color) {

fn radio_round_down_box(x: i32, y: i32, w: i32, h: i32, c: Color) {
let col = c.to_rgb();
draw::draw_box(FrameType::OFlatFrame, x, y, w, h, c);
draw::draw_box(FrameType::OFlatBox, x, y, w, h, c);
}

fn border_box(x: i32, y: i32, w: i32, h: i32, c: Color) {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_schemes/fluent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ 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 = Color::Background.to_rgb();
let fg = Color::contrast(Color::Background, Color::Background);
draw::draw_box(FrameType::OFlatFrame, x, y, w, h, Color::Background);
draw::draw_box(FrameType::OFlatBox, x, y, w, h, Color::Background);
draw::draw_box(FrameType::OvalFrame, x, y, w, h, fg);
}

Expand Down
15 changes: 7 additions & 8 deletions src/widget_schemes/svg_based.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use super::*;
use fltk::{image, prelude::ImageExt};
use fltk::{enums::FrameType, image, prelude::ImageExt};

fn rounded_frame(x: i32, y: i32, w: i32, h: i32, c: Color) {
let (r, g, b) = c.to_rgb();
Expand Down Expand Up @@ -68,13 +68,12 @@ fn oflat_box(x: i32, y: i32, w: i32, h: i32, c: Color) {
}

pub(crate) fn use_svg_based_scheme() {
use fltk::enums::FrameType::*;
app::reload_scheme().ok();
app::set_scheme(app::Scheme::Base);
app::set_frame_type_cb(RoundedFrame, rounded_frame, 2, 2, 4, 4);
app::set_frame_type_cb(RoundedBox, rounded_box, 2, 2, 4, 4);
app::set_frame_type_cb(RFlatBox, rflat_box, 2, 2, 4, 4);
app::set_frame_type_cb(OvalBox, oval_box, 2, 2, 4, 4);
app::set_frame_type_cb(OvalFrame, oval_frame, 2, 2, 4, 4);
app::set_frame_type_cb(OFlatFrame, oflat_box, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::RoundedFrame, rounded_frame, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::RoundedBox, rounded_box, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::RFlatBox, rflat_box, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::OvalBox, oval_box, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::OvalFrame, oval_frame, 2, 2, 4, 4);
app::set_frame_type_cb(FrameType::OFlatBox, oflat_box, 2, 2, 4, 4);
}
2 changes: 1 addition & 1 deletion src/widget_themes/aero.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ pub(crate) fn use_aero_colors() {
app::set_color(Color::Selection, 0x33, 0x99, 0xFF);
app::set_color(Color::Free, 0xFF, 0xFF, 0xFF);
Tooltip::set_color(Color::from_rgb(0xFF, 0xFF, 0xF0));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_aero_theme() {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_themes/aqua_classic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ fn use_aqua_classic_colors() {
app::set_color(Color::Selection, 0x30, 0x60, 0xF6);
app::set_color(Color::Free, 0xFB, 0xFB, 0xFB);
Tooltip::set_color(Color::from_rgb(0xFF, 0xFF, 0xC7));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_aqua_classic_theme() {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_themes/blue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ fn use_blue_colors() {
app::set_color(Color::Selection, 0x33, 0x33, 0x33);
app::set_color(Color::Free, 0xEA, 0xF1, 0xFA);
Tooltip::set_color(Color::from_rgb(0xFF, 0xFF, 0xFF));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_blue_theme() {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_themes/classic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ fn use_classic_colors() {
app::set_color(Color::Selection, 0x0A, 0x24, 0x6A);
app::set_color(Color::Free, 0xD4, 0xD0, 0xC8);
Tooltip::set_color(Color::from_rgb(0xFF, 0xFF, 0xE1));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_classic_theme() {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_themes/high_contrast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ fn use_high_contrast_colors() {
app::set_color(Color::Selection, 0x00, 0xFF, 0xFF);
app::set_color(Color::Free, 0x20, 0x20, 0x20);
Tooltip::set_color(Color::from_rgb(0x00, 0x00, 0x00));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_high_contrast_theme() {
Expand Down
2 changes: 1 addition & 1 deletion src/widget_themes/metro.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ fn use_metro_colors() {
app::set_color(Color::Selection, 0x33, 0x99, 0xFF);
app::set_color(Color::Free, 0xFF, 0xFF, 0xFF);
Tooltip::set_color(Color::from_rgb(0xFF, 0xFF, 0xFF));
Tooltip::set_text_color(Color::ForeGround);
Tooltip::set_text_color(Color::Foreground);
}

pub(crate) fn use_metro_theme() {
Expand Down

0 comments on commit 12bda38

Please sign in to comment.