Skip to content

Commit 2fde6ec

Browse files
authored
feat: light theme follows system settings (#161)
1 parent ca93496 commit 2fde6ec

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/painter.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ pub struct GdiAAPainter {
4646
hwnd: HWND,
4747
hdc_screen: HDC,
4848
rounded_corner: bool,
49-
light: bool,
5049
show: bool,
5150
}
5251

@@ -62,14 +61,12 @@ impl GdiAAPainter {
6261

6362
let hdc_screen = unsafe { GetDC(hwnd) };
6463
let rounded_corner = is_win11();
65-
let light = is_light_theme();
6664

6765
Ok(Self {
6866
token,
6967
hwnd,
7068
hdc_screen,
7169
rounded_corner,
72-
light,
7370
show: false,
7471
})
7572
}
@@ -93,7 +90,7 @@ impl GdiAAPainter {
9390
let hwnd = self.hwnd;
9491
let hdc_screen = self.hdc_screen;
9592

96-
let (fg_color, bg_color) = theme_color(self.light);
93+
let (fg_color, bg_color) = theme_color(is_light_theme());
9794

9895
unsafe {
9996
let hdc_mem = CreateCompatibleDC(hdc_screen);

0 commit comments

Comments
 (0)