Mercurial > dwindows
comparison mac/dw.m @ 2099:296a3872ddd9
Added a fourth dark mode option on Windows: Disabled, Basic, Full, Forced.
Disabled (0) forces dark mode off on Mac and Windows.
Enabled (1) System decides but only window frame is dark mode on Windows.
Full (2) System decides but everything that can be dark is on Mac and Windows.
Forced (3) Force dark mode on Mac and Windows regardless of system setting.
Enabled (1) and Full (2) are identical on Mac.
Added code to enable full dark mode in the test program.
Several widgets are not able to go dark on Windows currently: Notebook, Menubar
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 12 Jun 2020 20:40:47 +0000 |
parents | 68f1924fdd13 |
children | 12a9546c3e03 |
comparison
equal
deleted
inserted
replaced
2098:665d87a50eac | 2099:296a3872ddd9 |
---|---|
12681 { | 12681 { |
12682 /* Disabled forces the non-dark aqua theme */ | 12682 /* Disabled forces the non-dark aqua theme */ |
12683 if(state == DW_FEATURE_DISABLED) | 12683 if(state == DW_FEATURE_DISABLED) |
12684 [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; | 12684 [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; |
12685 /* Enabled lets the OS decide the mode */ | 12685 /* Enabled lets the OS decide the mode */ |
12686 else if(state == DW_FEATURE_ENABLED) | 12686 else if(state == DW_FEATURE_ENABLED || state == 2) |
12687 [DWApp setAppearance:nil]; | 12687 [DWApp setAppearance:nil]; |
12688 /* 2 forces dark mode aqua appearance */ | 12688 /* 2 forces dark mode aqua appearance */ |
12689 else if(state == 2) | 12689 else if(state == 3) |
12690 [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]]; | 12690 [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]]; |
12691 else | 12691 else |
12692 return DW_ERROR_GENERAL; | 12692 return DW_ERROR_GENERAL; |
12693 return DW_ERROR_NONE; | 12693 return DW_ERROR_NONE; |
12694 } | 12694 } |