Skip to content

Commit

Permalink
Improve high contrast high DPI display
Browse files Browse the repository at this point in the history
  • Loading branch information
dannye committed Nov 22, 2024
1 parent 505cc39 commit 9c573cf
Showing 1 changed file with 16 additions and 12 deletions.
28 changes: 16 additions & 12 deletions src/themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3005,9 +3005,10 @@ void OS::use_brushed_metal_theme() {

static void high_contrast_button_up_frame(int x, int y, int w, int h, Fl_Color) {
fl_color(activated_color(fl_rgb_color(0x00, 0xFF, 0xFF)));
fl_line_style(FL_SOLID, 2);
fl_rect(x+1, y+1, w-1, h-1);
fl_line_style(FL_SOLID);
fl_rectf(x, y, w, 2);
fl_rectf(x, y+h-2, w, 2);
fl_rectf(x, y, 2, h);
fl_rectf(x+w-2, y, 2, h);
}

static void high_contrast_button_up_box(int x, int y, int w, int h, Fl_Color c) {
Expand All @@ -3018,9 +3019,10 @@ static void high_contrast_button_up_box(int x, int y, int w, int h, Fl_Color c)

static void high_contrast_check_down_frame(int x, int y, int w, int h, Fl_Color) {
fl_color(activated_color(fl_rgb_color(0x00, 0x80, 0x80)));
fl_line_style(FL_SOLID, 2);
fl_rect(x+1, y+1, w-1, h-1);
fl_line_style(FL_SOLID);
fl_rectf(x, y, w, 2);
fl_rectf(x, y+h-2, w, 2);
fl_rectf(x, y, 2, h);
fl_rectf(x+w-2, y, 2, h);
}

static void high_contrast_check_down_box(int x, int y, int w, int h, Fl_Color c) {
Expand Down Expand Up @@ -3053,9 +3055,10 @@ static void high_contrast_spacer_thin_down_box(int x, int y, int w, int h, Fl_Co

static void high_contrast_default_button_up_frame(int x, int y, int w, int h, Fl_Color) {
fl_color(activated_color(fl_rgb_color(0xFF, 0xFF, 0xFF)));
fl_line_style(FL_SOLID, 2);
fl_rect(x+1, y+1, w-1, h-1);
fl_line_style(FL_SOLID);
fl_rectf(x, y, w, 2);
fl_rectf(x, y+h-2, w, 2);
fl_rectf(x, y, 2, h);
fl_rectf(x+w-2, y, 2, h);
}

static void high_contrast_default_button_up_box(int x, int y, int w, int h, Fl_Color c) {
Expand All @@ -3078,9 +3081,10 @@ static void high_contrast_radio_round_down_box(int x, int y, int w, int h, Fl_Co

static void high_contrast_hovered_up_frame(int x, int y, int w, int h, Fl_Color) {
fl_color(activated_color(fl_rgb_color(0xFF, 0xFF, 0xFF)));
fl_line_style(FL_SOLID, 2);
fl_rect(x+1, y+1, w-1, h-1);
fl_line_style(FL_SOLID);
fl_rectf(x, y, w, 2);
fl_rectf(x, y+h-2, w, 2);
fl_rectf(x, y, 2, h);
fl_rectf(x+w-2, y, 2, h);
}

static void high_contrast_hovered_up_box(int x, int y, int w, int h, Fl_Color c) {
Expand Down

0 comments on commit 9c573cf

Please sign in to comment.