This is what it looks like:
![Screenshot_20230213_212244](/uploads/14156031c91d4da29fc49ed9831b599a/Screenshot_20230213_212244.png)
-- v2: winecfg: Add an option to enable WinRT app dark theme. wine.inf: Add AppsUseLightTheme key.
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- loader/wine.inf.in | 1 + 1 file changed, 1 insertion(+)
diff --git a/loader/wine.inf.in b/loader/wine.inf.in index 1f5138051c9..e6ca74ef043 100644 --- a/loader/wine.inf.in +++ b/loader/wine.inf.in @@ -2363,6 +2363,7 @@ StartType=3 ErrorControl=1
[ThemeManager] +HKCU,"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize","AppsUseLightTheme",0x10003,0x00000001 HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","ThemeActive",2,"1" HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","DllName",2,"%10%\resources\themes\light\light.msstyles" HKCU,"Software\Microsoft\Windows\CurrentVersion\ThemeManager","ColorName",2,"Blue"
From: Mohamad Al-Jaf mohamadaljaf@gmail.com
--- dlls/windows.ui/tests/uisettings.c | 4 ++-- programs/winecfg/resource.h | 27 ++++++++++++------------ programs/winecfg/theme.c | 33 +++++++++++++++++++++++++++++- programs/winecfg/winecfg.rc | 8 +++++--- 4 files changed, 53 insertions(+), 19 deletions(-)
diff --git a/dlls/windows.ui/tests/uisettings.c b/dlls/windows.ui/tests/uisettings.c index bd1e7a02d20..9711d93d051 100644 --- a/dlls/windows.ui/tests/uisettings.c +++ b/dlls/windows.ui/tests/uisettings.c @@ -152,14 +152,14 @@ static void test_UISettings(void) type = UIColorType_Foreground; hr = IUISettings3_GetColorValue( uisettings3, type, &value ); ok( hr == S_OK, "GetColorValue returned %#lx\n", hr ); - todo_wine ok( value.A == 255 && value.R == 255 && value.G == 255 && value.B == 255, + ok( value.A == 255 && value.R == 255 && value.G == 255 && value.B == 255, "got unexpected value.A == %d value.R == %d value.G == %d value.B == %d\n", value.A, value.R, value.G, value.B );
reset_color( &value ); type = UIColorType_Background; hr = IUISettings3_GetColorValue( uisettings3, type, &value ); ok( hr == S_OK, "GetColorValue returned %#lx\n", hr ); - todo_wine ok( value.A == 255 && value.R == 0 && value.G == 0 && value.B == 0, + ok( value.A == 255 && value.R == 0 && value.G == 0 && value.B == 0, "got unexpected value.A == %d value.R == %d value.G == %d value.B == %d\n", value.A, value.R, value.G, value.B );
done: diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h index dd46bc71b40..8d7ff909bf6 100644 --- a/programs/winecfg/resource.h +++ b/programs/winecfg/resource.h @@ -163,19 +163,20 @@ #define IDC_THEME_SIZECOMBO 1403 #define IDC_THEME_SIZETEXT 1404 #define IDC_THEME_THEMECOMBO 1405 -#define IDC_THEME_INSTALL 1406 -#define IDC_LIST_SFPATHS 1407 -#define IDC_LINK_SFPATH 1408 -#define IDC_EDIT_SFPATH 1409 -#define IDC_BROWSE_SFPATH 1410 -#define IDC_SYSPARAM_COMBO 1411 -#define IDC_SYSPARAM_SIZE_TEXT 1412 -#define IDC_SYSPARAM_SIZE 1413 -#define IDC_SYSPARAM_SIZE_UD 1414 -#define IDC_SYSPARAM_COLOR_TEXT 1415 -#define IDC_SYSPARAM_COLOR 1416 -#define IDC_SYSPARAM_FONT 1417 -#define IDC_ENABLE_FILE_ASSOCIATIONS 1418 +#define IDC_THEME_APPCOMBO 1406 +#define IDC_THEME_INSTALL 1407 +#define IDC_LIST_SFPATHS 1408 +#define IDC_LINK_SFPATH 1409 +#define IDC_EDIT_SFPATH 1410 +#define IDC_BROWSE_SFPATH 1411 +#define IDC_SYSPARAM_COMBO 1412 +#define IDC_SYSPARAM_SIZE_TEXT 1413 +#define IDC_SYSPARAM_SIZE 1414 +#define IDC_SYSPARAM_SIZE_UD 1415 +#define IDC_SYSPARAM_COLOR_TEXT 1416 +#define IDC_SYSPARAM_COLOR 1417 +#define IDC_SYSPARAM_FONT 1418 +#define IDC_ENABLE_FILE_ASSOCIATIONS 1419
#define IDC_SYSPARAMS_BUTTON 8400 #define IDC_SYSPARAMS_BUTTON_TEXT 8401 diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c index bbc4d3cc11f..1817fa373ae 100644 --- a/programs/winecfg/theme.c +++ b/programs/winecfg/theme.c @@ -45,6 +45,22 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
/* UXTHEME functions not in the headers */
+static const WCHAR *subkey = L"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; +static const WCHAR *name = L"AppsUseLightTheme"; +static const HKEY root = HKEY_CURRENT_USER; + +typedef struct +{ + DWORD value; + const WCHAR *descr; +} AppTheme; + +AppTheme app_themes[] = +{ + { 0, L"Dark" }, + { 1, L"Light" }, +}; + typedef struct tagTHEMENAMES { WCHAR szName[MAX_PATH+1]; @@ -421,6 +437,13 @@ static void enable_size_and_color_controls (HWND dialog, BOOL enable)
static void init_dialog (HWND dialog) { + WCHAR *buf = get_reg_key(root, subkey, name, L"\0001"); + int state = wcscmp(buf, L""); + + SendDlgItemMessageW(dialog, IDC_THEME_APPCOMBO, CB_RESETCONTENT, 0, 0); + SendDlgItemMessageW(dialog, IDC_THEME_APPCOMBO, CB_ADDSTRING, 0, (LPARAM)app_themes[0].descr); + SendDlgItemMessageW(dialog, IDC_THEME_APPCOMBO, CB_ADDSTRING, 0, (LPARAM)app_themes[1].descr); + SendDlgItemMessageW(dialog, IDC_THEME_APPCOMBO, CB_SETCURSEL, state, 0); SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY, (WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0); } @@ -450,7 +473,9 @@ static void update_dialog (HWND dialog) }
static void on_theme_changed(HWND dialog) { - int index = SendMessageW (GetDlgItem (dialog, IDC_THEME_THEMECOMBO), + int index; + + index = SendMessageW (GetDlgItem (dialog, IDC_THEME_THEMECOMBO), CB_GETCURSEL, 0, 0); if (!update_color_and_size (index, GetDlgItem (dialog, IDC_THEME_COLORCOMBO), GetDlgItem (dialog, IDC_THEME_SIZECOMBO))) @@ -463,6 +488,11 @@ static void on_theme_changed(HWND dialog) { { enable_size_and_color_controls (dialog, TRUE); } + + index = SendMessageW (GetDlgItem (dialog, IDC_THEME_APPCOMBO), + CB_GETCURSEL, 0, 0); + set_reg_key_dword(root, subkey, name, index); + theme_dirty = TRUE; }
@@ -1148,6 +1178,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) if (updating_ui) break; switch (LOWORD(wParam)) { + case IDC_THEME_APPCOMBO: case IDC_THEME_THEMECOMBO: on_theme_changed(hDlg); break; case IDC_THEME_COLORCOMBO: /* fall through */ case IDC_THEME_SIZECOMBO: theme_dirty = TRUE; break; diff --git a/programs/winecfg/winecfg.rc b/programs/winecfg/winecfg.rc index 8775b3b691b..cf04a947e3b 100644 --- a/programs/winecfg/winecfg.rc +++ b/programs/winecfg/winecfg.rc @@ -283,9 +283,11 @@ STYLE WS_CHILD | WS_DISABLED FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Appearance",IDC_STATIC,8,4,244,90 - LTEXT "&Theme:",IDC_STATIC,15,15,130,8 - COMBOBOX IDC_THEME_THEMECOMBO,15,25,130,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP - PUSHBUTTON "&Install theme...",IDC_THEME_INSTALL,152,25,93,13 + LTEXT "System &Theme:",IDC_STATIC,15,15,70,8 + COMBOBOX IDC_THEME_THEMECOMBO,15,25,70,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "App &Theme:",IDC_STATIC,90,15,70,8 + COMBOBOX IDC_THEME_APPCOMBO,90,25,70,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + PUSHBUTTON "&Install theme...",IDC_THEME_INSTALL,165,25,80,13 LTEXT "&Color:",IDC_THEME_COLORTEXT,15,40,105,8 COMBOBOX IDC_THEME_COLORCOMBO,15,50,105,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "&Size:",IDC_THEME_SIZETEXT,126,40,120,8
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129440
Your paranoid android.
=== debian11 (32 bit report) ===
d3d11: d3d11.c:25778: Test failed: Got 0, expected 33 (index 1). d3d11.c:25778: Test failed: Got 0, expected 66 (index 2). d3d11.c:25778: Test failed: Got 0, expected 99 (index 3). d3d11.c:25778: Test failed: Got 0, expected 132 (index 4). d3d11.c:25778: Test failed: Got 0, expected 165 (index 5). d3d11.c:25778: Test failed: Got 0, expected 198 (index 6). d3d11.c:25778: Test failed: Got 0, expected 231 (index 7). d3d11.c:25778: Test failed: Got 0, expected 264 (index 8). d3d11.c:25778: Test failed: Got 0, expected 297 (index 9). d3d11.c:25778: Test failed: Got 0, expected 330 (index 10). d3d11.c:25778: Test failed: Got 0, expected 363 (index 11). d3d11.c:25778: Test failed: Got 0, expected 396 (index 12). d3d11.c:25778: Test failed: Got 0, expected 429 (index 13). d3d11.c:25778: Test failed: Got 0, expected 462 (index 14). d3d11.c:25778: Test failed: Got 0, expected 495 (index 15). d3d11.c:25778: Test failed: Got 0, expected 528 (index 16). d3d11.c:25778: Test failed: Got 0, expected 561 (index 17). d3d11.c:25778: Test failed: Got 0, expected 594 (index 18). d3d11.c:25778: Test failed: Got 0, expected 627 (index 19). d3d11.c:25778: Test failed: Got 0, expected 660 (index 20). d3d11.c:25778: Test failed: Got 0, expected 693 (index 21). d3d11.c:25778: Test failed: Got 0, expected 726 (index 22). d3d11.c:25778: Test failed: Got 0, expected 759 (index 23). d3d11.c:25778: Test failed: Got 0, expected 792 (index 24). d3d11.c:25778: Test failed: Got 0, expected 825 (index 25). d3d11.c:25778: Test failed: Got 0, expected 858 (index 26). d3d11.c:25778: Test failed: Got 0, expected 891 (index 27). d3d11.c:25778: Test failed: Got 0, expected 924 (index 28). d3d11.c:25778: Test failed: Got 0, expected 957 (index 29). d3d11.c:25778: Test failed: Got 0, expected 990 (index 30). d3d11.c:25778: Test failed: Got 0, expected 1023 (index 31). d3d11.c:25778: Test failed: Got 0, expected 1056 (index 32). d3d11.c:25778: Test failed: Got 0, expected 1089 (index 33). d3d11.c:25778: Test failed: Got 0, expected 1122 (index 34). d3d11.c:25778: Test failed: Got 0, expected 1155 (index 35). d3d11.c:25778: Test failed: Got 0, expected 1188 (index 36). d3d11.c:25778: Test failed: Got 0, expected 1221 (index 37). d3d11.c:25778: Test failed: Got 0, expected 1254 (index 38). d3d11.c:25778: Test failed: Got 0, expected 1287 (index 39). d3d11.c:25778: Test failed: Got 0, expected 1320 (index 40). d3d11.c:25778: Test failed: Got 0, expected 1353 (index 41). d3d11.c:25778: Test failed: Got 0, expected 1386 (index 42). d3d11.c:25778: Test failed: Got 0, expected 1419 (index 43). d3d11.c:25778: Test failed: Got 0, expected 1452 (index 44). d3d11.c:25778: Test failed: Got 0, expected 1485 (index 45). d3d11.c:25778: Test failed: Got 0, expected 1518 (index 46). d3d11.c:25778: Test failed: Got 0, expected 1551 (index 47). d3d11.c:25778: Test failed: Got 0, expected 1584 (index 48). d3d11.c:25778: Test failed: Got 0, expected 1617 (index 49). d3d11.c:25778: Test failed: Got 0, expected 1650 (index 50). d3d11.c:25778: Test failed: Got 0, expected 1683 (index 51). d3d11.c:25778: Test failed: Got 0, expected 1716 (index 52). d3d11.c:25778: Test failed: Got 0, expected 1749 (index 53). d3d11.c:25778: Test failed: Got 0, expected 1782 (index 54). d3d11.c:25778: Test failed: Got 0, expected 1815 (index 55). d3d11.c:25778: Test failed: Got 0, expected 1848 (index 56). d3d11.c:25778: Test failed: Got 0, expected 1881 (index 57). d3d11.c:25778: Test failed: Got 0, expected 1914 (index 58). d3d11.c:25778: Test failed: Got 0, expected 1947 (index 59). d3d11.c:25778: Test failed: Got 0, expected 1980 (index 60). d3d11.c:25778: Test failed: Got 0, expected 2013 (index 61). d3d11.c:25778: Test failed: Got 0, expected 2046 (index 62). d3d11.c:25778: Test failed: Got 0, expected 2079 (index 63). d3d11.c:25810: Test failed: Got 0, expected 32 (index 0). d3d11.c:25810: Test failed: Got 0, expected 96 (index 1). d3d11.c:25810: Test failed: Got 0, expected 160 (index 2). d3d11.c:25810: Test failed: Got 0, expected 224 (index 3). d3d11.c:25810: Test failed: Got 0, expected 288 (index 4). d3d11.c:25810: Test failed: Got 0, expected 352 (index 5). d3d11.c:25810: Test failed: Got 0, expected 416 (index 6). d3d11.c:25810: Test failed: Got 0, expected 480 (index 7). d3d11.c:25810: Test failed: Got 0, expected 544 (index 8). d3d11.c:25810: Test failed: Got 0, expected 608 (index 9). d3d11.c:25810: Test failed: Got 0, expected 672 (index 10). d3d11.c:25810: Test failed: Got 0, expected 736 (index 11). d3d11.c:25810: Test failed: Got 0, expected 800 (index 12). d3d11.c:25810: Test failed: Got 0, expected 864 (index 13). d3d11.c:25810: Test failed: Got 0, expected 928 (index 14). d3d11.c:25810: Test failed: Got 0, expected 992 (index 15). d3d11.c:25810: Test failed: Got 0, expected 1056 (index 16). d3d11.c:25810: Test failed: Got 0, expected 1120 (index 17). d3d11.c:25810: Test failed: Got 0, expected 1184 (index 18). d3d11.c:25810: Test failed: Got 0, expected 1248 (index 19). d3d11.c:25810: Test failed: Got 0, expected 1312 (index 20). d3d11.c:25810: Test failed: Got 0, expected 1376 (index 21). d3d11.c:25810: Test failed: Got 0, expected 1440 (index 22). d3d11.c:25810: Test failed: Got 0, expected 1504 (index 23). d3d11.c:25810: Test failed: Got 0, expected 1568 (index 24). d3d11.c:25810: Test failed: Got 0, expected 1632 (index 25). d3d11.c:25810: Test failed: Got 0, expected 1696 (index 26). d3d11.c:25810: Test failed: Got 0, expected 1760 (index 27). d3d11.c:25810: Test failed: Got 0, expected 1824 (index 28). d3d11.c:25810: Test failed: Got 0, expected 1888 (index 29). d3d11.c:25810: Test failed: Got 0, expected 1952 (index 30). d3d11.c:25810: Test failed: Got 0, expected 2016 (index 31). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 1 (index 32). d3d11.c:25854: Test failed: Got 0, expected 1 (index 32). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 2 (index 33). d3d11.c:25854: Test failed: Got 0, expected 2 (index 33). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 3 (index 34). d3d11.c:25854: Test failed: Got 0, expected 3 (index 34). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 4 (index 35). d3d11.c:25854: Test failed: Got 0, expected 4 (index 35). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 5 (index 36). d3d11.c:25854: Test failed: Got 0, expected 5 (index 36). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 6 (index 37). d3d11.c:25854: Test failed: Got 0, expected 6 (index 37). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 7 (index 38). d3d11.c:25854: Test failed: Got 0, expected 7 (index 38). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 8 (index 39). d3d11.c:25854: Test failed: Got 0, expected 8 (index 39). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 9 (index 40). d3d11.c:25854: Test failed: Got 0, expected 9 (index 40). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 10 (index 41). d3d11.c:25854: Test failed: Got 0, expected 10 (index 41). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 11 (index 42). d3d11.c:25854: Test failed: Got 0, expected 11 (index 42). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 12 (index 43). d3d11.c:25854: Test failed: Got 0, expected 12 (index 43). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 13 (index 44). d3d11.c:25854: Test failed: Got 0, expected 13 (index 44). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 14 (index 45). d3d11.c:25854: Test failed: Got 0, expected 14 (index 45). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 15 (index 46). d3d11.c:25854: Test failed: Got 0, expected 15 (index 46). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 16 (index 47). d3d11.c:25854: Test failed: Got 0, expected 16 (index 47). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 17 (index 48). d3d11.c:25854: Test failed: Got 0, expected 17 (index 48). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 18 (index 49). d3d11.c:25854: Test failed: Got 0, expected 18 (index 49). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 19 (index 50). d3d11.c:25854: Test failed: Got 0, expected 19 (index 50). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 20 (index 51). d3d11.c:25854: Test failed: Got 0, expected 20 (index 51). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 21 (index 52). d3d11.c:25854: Test failed: Got 0, expected 21 (index 52). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 22 (index 53). d3d11.c:25854: Test failed: Got 0, expected 22 (index 53). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 23 (index 54). d3d11.c:25854: Test failed: Got 0, expected 23 (index 54). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 24 (index 55). d3d11.c:25854: Test failed: Got 0, expected 24 (index 55). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 25 (index 56). d3d11.c:25854: Test failed: Got 0, expected 25 (index 56). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 26 (index 57). d3d11.c:25854: Test failed: Got 0, expected 26 (index 57). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 27 (index 58). d3d11.c:25854: Test failed: Got 0, expected 27 (index 58). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 28 (index 59). d3d11.c:25854: Test failed: Got 0, expected 28 (index 59). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 29 (index 60). d3d11.c:25854: Test failed: Got 0, expected 29 (index 60). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 30 (index 61). d3d11.c:25854: Test failed: Got 0, expected 30 (index 61). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 31 (index 62). d3d11.c:25854: Test failed: Got 0, expected 31 (index 62). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 32 (index 63). d3d11.c:25854: Test failed: Got 0, expected 32 (index 63). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 2 (index 64). d3d11.c:25854: Test failed: Got 0, expected 2 (index 64). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 4 (index 65). d3d11.c:25854: Test failed: Got 0, expected 4 (index 65). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 6 (index 66). d3d11.c:25854: Test failed: Got 0, expected 6 (index 66). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 8 (index 67). d3d11.c:25854: Test failed: Got 0, expected 8 (index 67). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 10 (index 68). d3d11.c:25854: Test failed: Got 0, expected 10 (index 68). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 12 (index 69). d3d11.c:25854: Test failed: Got 0, expected 12 (index 69). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 14 (index 70). d3d11.c:25854: Test failed: Got 0, expected 14 (index 70). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 16 (index 71). d3d11.c:25854: Test failed: Got 0, expected 16 (index 71). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 18 (index 72). d3d11.c:25854: Test failed: Got 0, expected 18 (index 72). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 20 (index 73). d3d11.c:25854: Test failed: Got 0, expected 20 (index 73). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 22 (index 74). d3d11.c:25854: Test failed: Got 0, expected 22 (index 74). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 24 (index 75). d3d11.c:25854: Test failed: Got 0, expected 24 (index 75). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 26 (index 76). d3d11.c:25854: Test failed: Got 0, expected 26 (index 76). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 28 (index 77). d3d11.c:25854: Test failed: Got 0, expected 28 (index 77). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 30 (index 78). d3d11.c:25854: Test failed: Got 0, expected 30 (index 78). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 32 (index 79). d3d11.c:25854: Test failed: Got 0, expected 32 (index 79). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 34 (index 80). d3d11.c:25854: Test failed: Got 0, expected 34 (index 80). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 36 (index 81). d3d11.c:25854: Test failed: Got 0, expected 36 (index 81). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 38 (index 82). d3d11.c:25854: Test failed: Got 0, expected 38 (index 82). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 40 (index 83). d3d11.c:25854: Test failed: Got 0, expected 40 (index 83). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 42 (index 84). d3d11.c:25854: Test failed: Got 0, expected 42 (index 84). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 44 (index 85). d3d11.c:25854: Test failed: Got 0, expected 44 (index 85). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 46 (index 86). d3d11.c:25854: Test failed: Got 0, expected 46 (index 86). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 48 (index 87). d3d11.c:25854: Test failed: Got 0, expected 48 (index 87). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 50 (index 88). d3d11.c:25854: Test failed: Got 0, expected 50 (index 88). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 52 (index 89). d3d11.c:25854: Test failed: Got 0, expected 52 (index 89). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 54 (index 90). d3d11.c:25854: Test failed: Got 0, expected 54 (index 90). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 56 (index 91). d3d11.c:25854: Test failed: Got 0, expected 56 (index 91). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 58 (index 92). d3d11.c:25854: Test failed: Got 0, expected 58 (index 92). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 60 (index 93). d3d11.c:25854: Test failed: Got 0, expected 60 (index 93). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 62 (index 94). d3d11.c:25854: Test failed: Got 0, expected 62 (index 94). d3d11.c:25852: Test failed: Got 0.00000000e+000, expected 64 (index 95). d3d11.c:25854: Test failed: Got 0, expected 64 (index 95).
On Wed Feb 15 10:47:34 2023 +0000, Mohamad Al-Jaf wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/2183/diffs?diff_id=32674&start_sha=70da9d078ba763d3307313616e76e4b557137ce7#dcea097491aea5c674c4bd70c05f7ab7b0278e18_2366_2366)
Indeed, good catch.
On Wed Feb 15 10:47:37 2023 +0000, Mohamad Al-Jaf wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/2183/diffs?diff_id=32674&start_sha=70da9d078ba763d3307313616e76e4b557137ce7#f66e40bde0908a5c3bca60d7a205d3f9024c741f_303_303)
I added the checkbox to the appearance section but it just looked out of place and barely fit. Some of the translations can be long so it would overlap. I think adding a combo box is better. Plus, it can be used in the future to use the host system's mode.
On Tue Feb 14 23:26:36 2023 +0000, Etaash Mathamsetty wrote:
host system's dark mode support requires dbus, I guess we could implement that using mountmgr, but I think it is a better idea to just make a basic checkbox in winecfg before doing anything more advanced.
I added a combo box with the options Light and Dark for now. This is how it is on Windows anyway, well the options, they use radio buttons. But this allows additional options to be added in the future, like host system's mode.
On Wed Feb 15 10:47:39 2023 +0000, Mohamad Al-Jaf wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/2183/diffs?diff_id=32674&start_sha=70da9d078ba763d3307313616e76e4b557137ce7#580198df69160e9ca39c268d0e926fabed8ee79b_19630_19630)
Ah I did not know that. Which script is it specifically?
On Wed Feb 15 10:55:30 2023 +0000, Mohamad Al-Jaf wrote:
Ah I did not know that. Which script is it specifically?
configure --enable-maintainer-mode, I think.
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/theme.c:
if (updating_ui) break; switch (LOWORD(wParam)) {
case IDC_THEME_APPCOMBO:
Add a /* fall through */ comment here as well.
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/theme.c:
static void init_dialog (HWND dialog) {
- WCHAR *buf = get_reg_key(root, subkey, name, L"\0001");
- int state = wcscmp(buf, L"");
Let change `buf` to `value` and `state` to `apps_use_light_theme`. And please don't use the return value from wcscmp() directly. It must be 0 or 1.
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/theme.c:
/* UXTHEME functions not in the headers */
+static const WCHAR *subkey = L"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; +static const WCHAR *name = L"AppsUseLightTheme";
Personally, I prefer you use string literals directly here. So it's get_reg_key(HKEY_CURRENT_USER, L"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize", L"AppsUseLightTheme", L"\0001");
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/theme.c:
/* UXTHEME functions not in the headers */
+static const WCHAR *subkey = L"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; +static const WCHAR *name = L"AppsUseLightTheme"; +static const HKEY root = HKEY_CURRENT_USER;
+typedef struct +{
- DWORD value;
- const WCHAR *descr;
+} AppTheme;
+AppTheme app_themes[] = +{
- { 0, L"Dark" },
- { 1, L"Light" },
Let's put "Light" as the first item since it's the default. Remember to change the index calculation logic.
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/winecfg.rc:
FONT 8, "MS Shell Dlg" BEGIN GROUPBOX "Appearance",IDC_STATIC,8,4,244,90
- LTEXT "&Theme:",IDC_STATIC,15,15,130,8
- COMBOBOX IDC_THEME_THEMECOMBO,15,25,130,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- PUSHBUTTON "&Install theme...",IDC_THEME_INSTALL,152,25,93,13
- LTEXT "System &Theme:",IDC_STATIC,15,15,70,8
- COMBOBOX IDC_THEME_THEMECOMBO,15,25,70,60,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
- LTEXT "App &Theme:",IDC_STATIC,90,15,70,8
I would prefer you keep the name for IDC_THEME_THEMECOMBO and use "WinRT app theme" for IDC_THEME_APPCOMBO. Because there is also a `SystemUsesLightTheme` registry value that controls whether system WinRT apps use a light theme and "System Theme" with "App Theme" makes it confusing.
Zhiyi Zhang (@zhiyi) commented about programs/winecfg/theme.c:
/* UXTHEME functions not in the headers */
+static const WCHAR *subkey = L"Software\Microsoft\Windows\CurrentVersion\Themes\Personalize"; +static const WCHAR *name = L"AppsUseLightTheme"; +static const HKEY root = HKEY_CURRENT_USER;
+typedef struct +{
- DWORD value;
- const WCHAR *descr;
+} AppTheme;
+AppTheme app_themes[] =
app_themes is only used once. Let's move it into init_dialog().