Mercurial > dwindows
changeset 2101:07666f97412f
Mac: I didn't like the Xcode auto-fix... here is a better one.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 12 Jun 2020 21:02:20 +0000 |
parents | 12a9546c3e03 |
children | 9a5dbda8f2ab |
files | mac/dw.m |
diffstat | 1 files changed, 18 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/mac/dw.m Fri Jun 12 20:55:01 2020 +0000 +++ b/mac/dw.m Fri Jun 12 21:02:20 2020 +0000 @@ -12642,8 +12642,9 @@ if([basicAppearance isEqualToString:NSAppearanceNameAqua]) return DW_FEATURE_DISABLED; } - } - return DW_FEATURE_ENABLED; + return DW_FEATURE_ENABLED; + } + return DW_FEATURE_UNSUPPORTED; } #endif default: @@ -12682,21 +12683,22 @@ #ifdef BUILDING_FOR_MOJAVE case DW_FEATURE_DARK_MODE: { - /* Disabled forces the non-dark aqua theme */ - if(state == DW_FEATURE_DISABLED) - [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; - /* Enabled lets the OS decide the mode */ - else if(state == DW_FEATURE_ENABLED || state == 2) - [DWApp setAppearance:nil]; - /* 2 forces dark mode aqua appearance */ - else if(state == 3) - { - if(@available(macOS 10.14, *)) + if(@available(macOS 10.14, *)) + { + /* Disabled forces the non-dark aqua theme */ + if(state == DW_FEATURE_DISABLED) + [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; + /* Enabled lets the OS decide the mode */ + else if(state == DW_FEATURE_ENABLED || state == 2) + [DWApp setAppearance:nil]; + /* 2 forces dark mode aqua appearance */ + else if(state == 3) [DWApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]]; - } - else - return DW_ERROR_GENERAL; - return DW_ERROR_NONE; + else + return DW_ERROR_GENERAL; + return DW_ERROR_NONE; + } + return DW_FEATURE_UNSUPPORTED; } #endif default: