Skip to content

Commit

Permalink
prelim aqua light
Browse files Browse the repository at this point in the history
  • Loading branch information
MoAlyousef committed Sep 26, 2021
1 parent 29d72ed commit 8b0ac0a
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 373 deletions.
2 changes: 1 addition & 1 deletion examples/aqua_dark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ fn main() {
let widget_theme = WidgetTheme::new(ThemeType::AquaDark);
widget_theme.apply();
let mut win = window::Window::default().with_size(400, 300);
input::Input::new(50, 10, 300, 30, None);
input::Input::new(50, 50, 300, 30, None);
let mut check = button::CheckButton::new(160, 150, 80, 30, " Check");
check.set_value(true);
check.set_frame(enums::FrameType::FlatBox);
Expand Down
21 changes: 20 additions & 1 deletion src/widget_themes/aqua_dark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,17 @@ fn aqua_dark_default_button_up_box(x: i32, y: i32, w: i32, h: i32, c: Color) {
image.draw(x, y, w, h);
}

fn aqua_dark_radio_round_down_box(x: i32, y: i32, w: i32, h: i32, c: Color) {
let col = &CTRL_ACC_COL;
let svg = format!(
"<svg width='{}' height='{}'>
<circle cx='{}' cy='{}' r='{}' fill='rgb({},{},{})'/>
</svg>", w, h, w/2, h/2, w/2, col.0, col.1, col.2
);
let mut image = image::SvgImage::from_data(&svg).unwrap();
image.draw(x, y, w, h);
}

fn use_aqua_dark_scheme() {
app::set_scheme(app::Scheme::Gtk);
app::set_frame_type_cb(FrameType::UpBox, aqua_dark_button_up_box, 1, 1, 2, 2);
Expand All @@ -196,7 +207,15 @@ fn use_aqua_dark_scheme() {
2,
2,
);

app::set_frame_type_cb(
OS_RADIO_ROUND_DOWN_BOX,
aqua_dark_radio_round_down_box,
2,
2,
4,
4,
);
app::set_frame_type2(FrameType::RoundDownBox, OS_RADIO_ROUND_DOWN_BOX);
app::set_frame_type2(OS_BG_BOX, FrameType::FlatBox);
// app::set_frame_type_cb(OS_BG_DOWN_BOX, OS_BG_BOX);
}
Expand Down
Loading

0 comments on commit 8b0ac0a

Please sign in to comment.