From 38d5130b5c59308853f1743c0b0bcfe6220031f3 Mon Sep 17 00:00:00 2001 From: Vitaliy Margolen Date: Sat, 18 Nov 2006 10:58:21 -0700 Subject: [PATCH] winecfg: Add ability to change colors and non-client sizes. --- programs/winecfg/Bg.rc | 8 ++ programs/winecfg/De.rc | 8 ++ programs/winecfg/En.rc | 36 +++++++ programs/winecfg/Es.rc | 8 ++ programs/winecfg/Fi.rc | 8 ++ programs/winecfg/Fr.rc | 8 ++ programs/winecfg/Hu.rc | 8 ++ programs/winecfg/Ja.rc | 8 ++ programs/winecfg/Ko.rc | 8 ++ programs/winecfg/Nl.rc | 8 ++ programs/winecfg/No.rc | 8 ++ programs/winecfg/Ru.rc | 28 +++++ programs/winecfg/Tr.rc | 8 ++ programs/winecfg/resource.h | 24 +++++ programs/winecfg/theme.c | 199 +++++++++++++++++++++++++++++++++++- 15 files changed, 371 insertions(+), 4 deletions(-) diff --git a/programs/winecfg/Bg.rc b/programs/winecfg/Bg.rc index 554905cf466..76f2729bc6a 100644 --- a/programs/winecfg/Bg.rc +++ b/programs/winecfg/Bg.rc @@ -187,6 +187,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Размер:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Папки ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/De.rc b/programs/winecfg/De.rc index c00d1d71350..2bcf91535ef 100644 --- a/programs/winecfg/De.rc +++ b/programs/winecfg/De.rc @@ -185,6 +185,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "GrцЯe:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell-Ordner ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/En.rc b/programs/winecfg/En.rc index dee54e43902..59b1fd75710 100644 --- a/programs/winecfg/En.rc +++ b/programs/winecfg/En.rc @@ -186,6 +186,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Size:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 @@ -280,6 +288,26 @@ BEGIN IDS_WARNING "Warning" END +STRINGTABLE DISCARDABLE +BEGIN + IDC_SYSPARAMS_BUTTON "Controls Background" + IDC_SYSPARAMS_BUTTON_TEXT "Controls Text" + IDC_SYSPARAMS_DESKTOP "Desktop" + IDC_SYSPARAMS_MENU "Menu Background" + IDC_SYSPARAMS_MENU_TEXT "Menu Text" + IDC_SYSPARAMS_SCROLLBAR "Scrollbar" + IDC_SYSPARAMS_SELECTION "Selection Background" + IDC_SYSPARAMS_SELECTION_TEXT "Selection Text" + IDC_SYSPARAMS_TOOLTIP "ToolTip Background" + IDC_SYSPARAMS_TOOLTIP_TEXT "ToolTip Text" + IDC_SYSPARAMS_WINDOW "Window Background" + IDC_SYSPARAMS_WINDOW_TEXT "Window Text" + IDC_SYSPARAMS_ACTIVE_TITLE "Active Title Bar" + IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Active Title Text" + IDC_SYSPARAMS_INACTIVE_TITLE "Inactive Title Bar" + IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Inactive Title Text" +END + /****************************************************************/ /* English neutral resources /****************************************************************/ @@ -326,6 +354,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Size:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Es.rc b/programs/winecfg/Es.rc index f2400acda6f..8c1c8108f4f 100644 --- a/programs/winecfg/Es.rc +++ b/programs/winecfg/Es.rc @@ -181,6 +181,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Tamaсo:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Fi.rc b/programs/winecfg/Fi.rc index cfa2b263610..3c4db8d5a0f 100644 --- a/programs/winecfg/Fi.rc +++ b/programs/winecfg/Fi.rc @@ -185,6 +185,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Koko:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Fr.rc b/programs/winecfg/Fr.rc index 073fd3d91a0..6e6901bc449 100644 --- a/programs/winecfg/Fr.rc +++ b/programs/winecfg/Fr.rc @@ -185,6 +185,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Taille:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Dossiers systиme ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Hu.rc b/programs/winecfg/Hu.rc index a846ef22fa6..dc84b43409e 100644 --- a/programs/winecfg/Hu.rc +++ b/programs/winecfg/Hu.rc @@ -181,6 +181,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Mйret:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Rendszermappa ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Ja.rc b/programs/winecfg/Ja.rc index c69e2a783f2..ba4743bcf5c 100644 --- a/programs/winecfg/Ja.rc +++ b/programs/winecfg/Ja.rc @@ -180,6 +180,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "ѓTѓCѓY:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Ko.rc b/programs/winecfg/Ko.rc index 8f67d9f83cc..7e45ef18c91 100644 --- a/programs/winecfg/Ko.rc +++ b/programs/winecfg/Ko.rc @@ -188,6 +188,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Е©±в:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Ѕ© Жъґх ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Nl.rc b/programs/winecfg/Nl.rc index b4239e7e197..fe04d3df1c1 100644 --- a/programs/winecfg/Nl.rc +++ b/programs/winecfg/Nl.rc @@ -186,6 +186,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Tekstgrootte:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Shell Folder ",IDC_STATIC,8,114,244,100 /* FIXME */ CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/No.rc b/programs/winecfg/No.rc index 4a826acdd25..e07eed08bfe 100644 --- a/programs/winecfg/No.rc +++ b/programs/winecfg/No.rc @@ -184,6 +184,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Stшrrelse:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Skallkatalog ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/Ru.rc b/programs/winecfg/Ru.rc index a8be2c8b17d..2991b4cc0d6 100644 --- a/programs/winecfg/Ru.rc +++ b/programs/winecfg/Ru.rc @@ -187,6 +187,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Размер:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Элемент:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Цвет:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Размер:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Шрифт",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Стандартные папки ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 @@ -279,3 +287,23 @@ BEGIN IDS_UNAVAILABLE_DRIVER "Драйвер, указанный в реестре, не найден!\n\nУдалить \"%s\" из реестра?" IDS_WARNING "Внимание" END + +STRINGTABLE DISCARDABLE +BEGIN + IDC_SYSPARAMS_BUTTON "Элементы управления - фон" + IDC_SYSPARAMS_BUTTON_TEXT "Элементы управления - текст" + IDC_SYSPARAMS_DESKTOP "Стол" + IDC_SYSPARAMS_MENU "Меню - фон" + IDC_SYSPARAMS_MENU_TEXT "Меню - текст" + IDC_SYSPARAMS_SCROLLBAR "Полоса прокрутки" + IDC_SYSPARAMS_SELECTION "Выделение - фон" + IDC_SYSPARAMS_SELECTION_TEXT "Выделение - текст" + IDC_SYSPARAMS_TOOLTIP "Подсказка - фон" + IDC_SYSPARAMS_TOOLTIP_TEXT "Подсказка - текст" + IDC_SYSPARAMS_WINDOW "Содержимое окна - фон" + IDC_SYSPARAMS_WINDOW_TEXT "Содержимое окна - текст" + IDC_SYSPARAMS_ACTIVE_TITLE "Активное окно" + IDC_SYSPARAMS_ACTIVE_TITLE_TEXT "Активное окно - текст" + IDC_SYSPARAMS_INACTIVE_TITLE "Пассивное окно" + IDC_SYSPARAMS_INACTIVE_TITLE_TEXT "Пассивное окно - текст" +END diff --git a/programs/winecfg/Tr.rc b/programs/winecfg/Tr.rc index c5a4aadec78..5d5b6403c0d 100644 --- a/programs/winecfg/Tr.rc +++ b/programs/winecfg/Tr.rc @@ -184,6 +184,14 @@ BEGIN COMBOBOX IDC_THEME_COLORCOMBO,15,48,112,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP LTEXT "Boyut:",IDC_THEME_SIZETEXT,135,40,110,8 COMBOBOX IDC_THEME_SIZECOMBO,135,48,110,14,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP + LTEXT "Item:",IDC_STATIC,15,64,112,8 + COMBOBOX IDC_SYSPARAM_COMBO,15,74,112,120,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP | CBS_SORT + LTEXT "Color:",IDC_SYSPARAM_COLOR_TEXT,135,64,25,8,WS_DISABLED + PUSHBUTTON "",IDC_SYSPARAM_COLOR,135,74,25,13,WS_DISABLED | BS_OWNERDRAW + LTEXT "Size:",IDC_SYSPARAM_SIZE_TEXT,166,64,30,8,WS_DISABLED + EDITTEXT IDC_SYSPARAM_SIZE,166,74,23,13,ES_AUTOHSCROLL | WS_TABSTOP | WS_DISABLED + CONTROL "",IDC_SYSPARAM_SIZE_UD,UPDOWN_CLASS,UDS_SETBUDDYINT | WS_DISABLED,187,74,15,13 + PUSHBUTTON "Font",IDC_SYSPARAM_FONT,208,74,37,13,WS_DISABLED GROUPBOX " Цzel Klasцrler ",IDC_STATIC,8,114,244,100 CONTROL "Listview",IDC_LIST_SFPATHS,"SysListView32",LVS_REPORT | LVS_AUTOARRANGE | LVS_ALIGNLEFT | LVS_SINGLESEL | WS_BORDER | WS_TABSTOP, 15,126,230,64 diff --git a/programs/winecfg/resource.h b/programs/winecfg/resource.h index 1fb5e88e652..4d4fdd19517 100644 --- a/programs/winecfg/resource.h +++ b/programs/winecfg/resource.h @@ -206,3 +206,27 @@ #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_SYSPARAMS_BUTTON 8400 +#define IDC_SYSPARAMS_BUTTON_TEXT 8401 +#define IDC_SYSPARAMS_DESKTOP 8402 +#define IDC_SYSPARAMS_MENU 8403 +#define IDC_SYSPARAMS_MENU_TEXT 8404 +#define IDC_SYSPARAMS_SCROLLBAR 8405 +#define IDC_SYSPARAMS_SELECTION 8406 +#define IDC_SYSPARAMS_SELECTION_TEXT 8407 +#define IDC_SYSPARAMS_TOOLTIP 8408 +#define IDC_SYSPARAMS_TOOLTIP_TEXT 8409 +#define IDC_SYSPARAMS_WINDOW 8410 +#define IDC_SYSPARAMS_WINDOW_TEXT 8411 +#define IDC_SYSPARAMS_ACTIVE_TITLE 8412 +#define IDC_SYSPARAMS_ACTIVE_TITLE_TEXT 8413 +#define IDC_SYSPARAMS_INACTIVE_TITLE 8414 +#define IDC_SYSPARAMS_INACTIVE_TITLE_TEXT 8415 diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c index 8eeb08a74dc..7410a0db612 100644 --- a/programs/winecfg/theme.c +++ b/programs/winecfg/theme.c @@ -36,6 +36,7 @@ #include #include #include +#include #include "resource.h" #include "winecfg.h" @@ -444,7 +445,10 @@ static void init_dialog (HWND dialog) enable_size_and_color_controls (dialog, TRUE); } theme_dirty = FALSE; - + + SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETBUDDY, (WPARAM)GetDlgItem(dialog, IDC_SYSPARAM_SIZE), 0); + SendDlgItemMessageW(dialog, IDC_SYSPARAM_SIZE_UD, UDM_SETRANGE, 0, MAKELONG(100, 8)); + updating_ui = FALSE; } @@ -815,6 +819,147 @@ static void apply_shell_folder_changes() { } } +static struct +{ + int sm_idx, color_idx; + const char *color_reg; + int size; + COLORREF color; +} metrics[] = +{ + {-1, COLOR_BTNFACE, "ButtonFace" }, /* IDC_SYSPARAMS_BUTTON */ + {-1, COLOR_BTNTEXT, "ButtonText" }, /* IDC_SYSPARAMS_BUTTON_TEXT */ + {-1, COLOR_BACKGROUND, "Background" }, /* IDC_SYSPARAMS_DESKTOP */ + {SM_CXMENUSIZE, COLOR_MENU, "Menu" }, /* IDC_SYSPARAMS_MENU */ + {-1, COLOR_MENUTEXT, "MenuText" }, /* IDC_SYSPARAMS_MENU_TEXT */ + {SM_CXVSCROLL, COLOR_SCROLLBAR, "Scrollbar" }, /* IDC_SYSPARAMS_SCROLLBAR */ + {-1, COLOR_HIGHLIGHT, "Hilight" }, /* IDC_SYSPARAMS_SELECTION */ + {-1, COLOR_HIGHLIGHTTEXT, "HilightText" }, /* IDC_SYSPARAMS_SELECTION_TEXT */ + {-1, COLOR_INFOBK, "InfoWindow" }, /* IDC_SYSPARAMS_TOOLTIP */ + {-1, COLOR_INFOTEXT, "InfoText" }, /* IDC_SYSPARAMS_TOOLTIP_TEXT */ + {-1, COLOR_WINDOW, "Window" }, /* IDC_SYSPARAMS_WINDOW */ + {-1, COLOR_WINDOWTEXT, "WindowText" }, /* IDC_SYSPARAMS_WINDOW_TEXT */ + {SM_CXSIZE, COLOR_ACTIVECAPTION, "ActiveTitle" }, /* IDC_SYSPARAMS_ACTIVE_TITLE */ + {-1, COLOR_CAPTIONTEXT, "TitleText" }, /* IDC_SYSPARAMS_ACTIVE_TITLE_TEXT */ + {-1, COLOR_INACTIVECAPTION, "InactiveTitle" }, /* IDC_SYSPARAMS_INACTIVE_TITLE */ + {-1, COLOR_INACTIVECAPTIONTEXT,"InactiveTitleText" } /* IDC_SYSPARAMS_INACTIVE_TITLE_TEXT */ +}; + +static void save_sys_color(int idx, COLORREF clr) +{ + char buffer[13]; + + sprintf(buffer, "%d %d %d", GetRValue (clr), GetGValue (clr), GetBValue (clr)); + set_reg_key(HKEY_CURRENT_USER, "Control Panel\\Colors", metrics[idx].color_reg, buffer); +} + +static void read_sysparams(HWND hDlg) +{ + WCHAR buffer[256]; + HWND list = GetDlgItem(hDlg, IDC_SYSPARAM_COMBO); + int i, idx; + + for (i = 0; i < sizeof(metrics) / sizeof(metrics[0]); i++) + { + LoadStringW(GetModuleHandle(NULL), i + IDC_SYSPARAMS_BUTTON, buffer, + sizeof(buffer) / sizeof(buffer[0])); + idx = SendMessageW(list, CB_ADDSTRING, 0, (LPARAM)buffer); + if (idx != CB_ERR) SendMessageW(list, CB_SETITEMDATA, idx, i); + + if (metrics[i].sm_idx != -1) + metrics[i].size = GetSystemMetrics(metrics[i].sm_idx); + if (metrics[i].color_idx != -1) + metrics[i].color = GetSysColor(metrics[i].color_idx); + } +} + +static void apply_sysparams(void) +{ + NONCLIENTMETRICSW nonclient_metrics; + int i, cnt = 0; + int colors_idx[sizeof(metrics) / sizeof(metrics[0])]; + COLORREF colors[sizeof(metrics) / sizeof(metrics[0])]; + + nonclient_metrics.cbSize = sizeof(nonclient_metrics); + SystemParametersInfoW(SPI_GETNONCLIENTMETRICS, sizeof(nonclient_metrics), &nonclient_metrics, 0); + + nonclient_metrics.iMenuWidth = nonclient_metrics.iMenuHeight = + metrics[IDC_SYSPARAMS_MENU - IDC_SYSPARAMS_BUTTON].size; + nonclient_metrics.iCaptionWidth = nonclient_metrics.iCaptionHeight = + metrics[IDC_SYSPARAMS_ACTIVE_TITLE - IDC_SYSPARAMS_BUTTON].size; + nonclient_metrics.iScrollWidth = nonclient_metrics.iScrollHeight = + metrics[IDC_SYSPARAMS_SCROLLBAR - IDC_SYSPARAMS_BUTTON].size; + + SystemParametersInfoW(SPI_SETNONCLIENTMETRICS, sizeof(nonclient_metrics), &nonclient_metrics, + SPIF_UPDATEINIFILE | SPIF_SENDCHANGE); + + for (i = 0; i < sizeof(metrics) / sizeof(metrics[0]); i++) + if (metrics[i].color_idx != -1) + { + colors_idx[cnt] = metrics[i].color_idx; + colors[cnt++] = metrics[i].color; + } + SetSysColors(cnt, colors_idx, colors); +} + +static void on_sysparam_change(HWND hDlg) +{ + int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0); + + index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0); + + updating_ui = TRUE; + + EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_COLOR_TEXT), metrics[index].color_idx != -1); + EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_COLOR), metrics[index].color_idx != -1); + InvalidateRect(GetDlgItem(hDlg, IDC_SYSPARAM_COLOR), NULL, TRUE); + + EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_SIZE_TEXT), metrics[index].sm_idx != -1); + EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_SIZE), metrics[index].sm_idx != -1); + EnableWindow(GetDlgItem(hDlg, IDC_SYSPARAM_SIZE_UD), metrics[index].sm_idx != -1); + if (metrics[index].sm_idx != -1) + SendDlgItemMessageW(hDlg, IDC_SYSPARAM_SIZE_UD, UDM_SETPOS, 0, MAKELONG(metrics[index].size, 0)); + else + set_text(hDlg, IDC_SYSPARAM_SIZE, ""); + + updating_ui = FALSE; +} + +static void on_draw_item(HWND hDlg, WPARAM wParam, LPARAM lParam) +{ + static HBRUSH black_brush = 0; + LPDRAWITEMSTRUCT draw_info = (LPDRAWITEMSTRUCT)lParam; + + if (!black_brush) black_brush = CreateSolidBrush(0); + + if (draw_info->CtlID == IDC_SYSPARAM_COLOR) + { + UINT state = DFCS_ADJUSTRECT | DFCS_BUTTONPUSH; + + if (draw_info->itemState & ODS_DISABLED) + state |= DFCS_INACTIVE; + else + state |= draw_info->itemState & ODS_SELECTED ? DFCS_PUSHED : 0; + + DrawFrameControl(draw_info->hDC, &draw_info->rcItem, DFC_BUTTON, state); + + if (!(draw_info->itemState & ODS_DISABLED)) + { + HBRUSH brush; + int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0); + + index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0); + brush = CreateSolidBrush(metrics[index].color); + + InflateRect(&draw_info->rcItem, -1, -1); + FrameRect(draw_info->hDC, &draw_info->rcItem, black_brush); + InflateRect(&draw_info->rcItem, -1, -1); + FillRect(draw_info->hDC, &draw_info->rcItem, brush); + DeleteObject(brush); + } + } +} + INT_PTR CALLBACK ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -823,6 +968,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) read_shell_folder_link_targets(); init_shell_folder_listview_headers(hDlg); update_shell_folder_listview(hDlg); + read_sysparams(hDlg); break; case WM_DESTROY: @@ -837,18 +983,34 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) switch(HIWORD(wParam)) { case CBN_SELCHANGE: { if (updating_ui) break; - SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); switch (LOWORD(wParam)) { case IDC_THEME_THEMECOMBO: on_theme_changed(hDlg); break; case IDC_THEME_COLORCOMBO: /* fall through */ case IDC_THEME_SIZECOMBO: theme_dirty = TRUE; break; + case IDC_SYSPARAM_COMBO: on_sysparam_change(hDlg); return FALSE; } + SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); break; } case EN_CHANGE: { - if (LOWORD(wParam) == IDC_EDIT_SFPATH) - on_shell_folder_edit_changed(hDlg); + if (updating_ui) break; + switch (LOWORD(wParam)) + { + case IDC_EDIT_SFPATH: on_shell_folder_edit_changed(hDlg); break; + case IDC_SYSPARAM_SIZE: + { + char *text = get_text(hDlg, IDC_SYSPARAM_SIZE); + int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0); + + index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0); + metrics[index].size = atoi(text); + HeapFree(GetProcessHeap(), 0, text); + + SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); + break; + } + } break; } case BN_CLICKED: @@ -879,6 +1041,30 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); } break; + + case IDC_SYSPARAM_COLOR: + { + static COLORREF user_colors[16]; + CHOOSECOLORW c_color; + int index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETCURSEL, 0, 0); + + index = SendDlgItemMessageW(hDlg, IDC_SYSPARAM_COMBO, CB_GETITEMDATA, index, 0); + + memset(&c_color, 0, sizeof(c_color)); + c_color.lStructSize = sizeof(c_color); + c_color.lpCustColors = user_colors; + c_color.rgbResult = metrics[index].color; + c_color.Flags = CC_ANYCOLOR | CC_RGBINIT; + c_color.hwndOwner = hDlg; + if (ChooseColorW(&c_color)) + { + metrics[index].color = c_color.rgbResult; + save_sys_color(index, metrics[index].color); + InvalidateRect(GetDlgItem(hDlg, IDC_SYSPARAM_COLOR), NULL, TRUE); + SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0); + } + break; + } } break; } @@ -894,6 +1080,7 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) apply(); apply_theme(hDlg); apply_shell_folder_changes(); + apply_sysparams(); read_shell_folder_link_targets(); update_shell_folder_listview(hDlg); SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSNRET_NOERROR); @@ -911,6 +1098,10 @@ ThemeDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) } break; + case WM_DRAWITEM: + on_draw_item(hDlg, wParam, lParam); + break; + default: break; }