Skip to content

Commit

Permalink
feat: light theme follows system settings (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
sigoden authored Jan 2, 2025
1 parent ca93496 commit 2fde6ec
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/painter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ pub struct GdiAAPainter {
hwnd: HWND,
hdc_screen: HDC,
rounded_corner: bool,
light: bool,
show: bool,
}

Expand All @@ -62,14 +61,12 @@ impl GdiAAPainter {

let hdc_screen = unsafe { GetDC(hwnd) };
let rounded_corner = is_win11();
let light = is_light_theme();

Ok(Self {
token,
hwnd,
hdc_screen,
rounded_corner,
light,
show: false,
})
}
Expand All @@ -93,7 +90,7 @@ impl GdiAAPainter {
let hwnd = self.hwnd;
let hdc_screen = self.hdc_screen;

let (fg_color, bg_color) = theme_color(self.light);
let (fg_color, bg_color) = theme_color(is_light_theme());

unsafe {
let hdc_mem = CreateCompatibleDC(hdc_screen);
Expand Down

0 comments on commit 2fde6ec

Please sign in to comment.