Add screen depth option and remove "Allocated System Colors" setting.
This commit is contained in:
parent
a6d37f6d31
commit
81be7f7892
|
@ -68,14 +68,11 @@ BEGIN
|
|||
BS_AUTOCHECKBOX | WS_TABSTOP,145,44,97,10
|
||||
*/
|
||||
|
||||
LTEXT "Screen color depth: ",IDC_STATIC,8,10,60,30
|
||||
COMBOBOX IDC_SCREEN_DEPTH,70,8,180,70,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP
|
||||
|
||||
EDITTEXT IDC_DESKTOP_WIDTH,64,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
EDITTEXT IDC_DESKTOP_HEIGHT,117,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
|
||||
GROUPBOX " Render Settings ",IDC_STATIC,8,4,244,60
|
||||
LTEXT "The driver color and render settings are used to optimise the way in which colors and applications are displayed.",
|
||||
IDC_STATIC,15,17,228,22
|
||||
|
||||
LTEXT "Allocated system colors:",IDC_STATIC,15,43,76,8
|
||||
EDITTEXT IDC_SYSCOLORS,90,41,40,14,ES_AUTOHSCROLL | ES_NUMBER
|
||||
|
||||
GROUPBOX " Window settings ",IDC_STATIC,8,65,244,170
|
||||
|
||||
|
|
|
@ -103,3 +103,4 @@
|
|||
#define IDC_ENABLE_DESKTOP 1074
|
||||
#define IDS_DRIVE_NO_C 1075
|
||||
#define IDC_ENABLE_MANAGED 1076
|
||||
#define IDC_SCREEN_DEPTH 1077
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
* - Make a list of prefs that have been dropped from the UI/should be eliminated
|
||||
* - Multimedia page
|
||||
* - Settings migration code (from old configs)
|
||||
* - Clean up resource.h, it's a bog
|
||||
*
|
||||
* Minor things that should be done someday:
|
||||
* - Make the desktop size UI a combo box, with a Custom option, so it's more obvious what you might want to choose here
|
||||
|
|
|
@ -73,7 +73,7 @@ void updateGUIForDesktopMode(HWND hDlg) {
|
|||
void initX11DrvDlg (HWND hDlg)
|
||||
{
|
||||
char *buf;
|
||||
char *i;
|
||||
char *bufindex;
|
||||
|
||||
updatingUI = TRUE;
|
||||
|
||||
|
@ -81,20 +81,34 @@ void initX11DrvDlg (HWND hDlg)
|
|||
|
||||
/* desktop size */
|
||||
buf = getConfigValue("x11drv", "Desktop", "640x480");
|
||||
i = strchr(buf, 'x');
|
||||
*i = '\0';
|
||||
i++;
|
||||
bufindex = strchr(buf, 'x');
|
||||
*bufindex = '\0';
|
||||
bufindex++;
|
||||
SetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_WIDTH), buf);
|
||||
SetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_HEIGHT), i);
|
||||
SetWindowText(GetDlgItem(hDlg, IDC_DESKTOP_HEIGHT), bufindex);
|
||||
free(buf);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "8 bit");
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "16 bit");
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "24 bit");
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_ADDSTRING, 0, (LPARAM) "32 bit"); /* is this valid? */
|
||||
|
||||
buf = getConfigValue("x11drv", "ScreenDepth", "24");
|
||||
if (strcmp(buf, "8") == 0)
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 0, 0);
|
||||
else if (strcmp(buf, "16") == 0)
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 1, 0);
|
||||
else if (strcmp(buf, "24") == 0)
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 2, 0);
|
||||
else if (strcmp(buf, "32") == 0)
|
||||
SendDlgItemMessage(hDlg, IDC_SCREEN_DEPTH, CB_SETCURSEL, 3, 0);
|
||||
else
|
||||
WINE_ERR("Invalid screen depth read from registry (%s)\n", buf);
|
||||
free(buf);
|
||||
|
||||
SendDlgItemMessage(hDlg, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
|
||||
SendDlgItemMessage(hDlg, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
|
||||
|
||||
buf = getConfigValue("x11drv", "AllocSysColors", "100");
|
||||
SetWindowText(GetDlgItem(hDlg, IDC_SYSCOLORS), buf);
|
||||
free(buf);
|
||||
|
||||
buf = getConfigValue("x11drv", "Managed", "Y");
|
||||
if (IS_OPTION_TRUE(*buf))
|
||||
CheckDlgButton(hDlg, IDC_ENABLE_MANAGED, BST_CHECKED);
|
||||
|
@ -141,14 +155,15 @@ void onEnableDesktopClicked(HWND hDlg) {
|
|||
updateGUIForDesktopMode(hDlg);
|
||||
}
|
||||
|
||||
void onSysColorsChange(HWND hDlg) {
|
||||
char *newvalue = getDialogItemText(hDlg, IDC_SYSCOLORS);
|
||||
void onScreenDepthChanged(HWND hDlg) {
|
||||
char *newvalue = getDialogItemText(hDlg, IDC_SCREEN_DEPTH);
|
||||
char *spaceIndex = strchr(newvalue, ' ');
|
||||
|
||||
WINE_TRACE("\n");
|
||||
WINE_TRACE("newvalue=%s\n", newvalue);
|
||||
if (updatingUI) return;
|
||||
if (!newvalue) return;
|
||||
|
||||
addTransaction("x11drv", "AllocSystemColors", ACTION_SET, newvalue);
|
||||
*spaceIndex = '\0';
|
||||
addTransaction("x11drv", "ScreenDepth", ACTION_SET, newvalue);
|
||||
free(newvalue);
|
||||
}
|
||||
|
||||
|
@ -171,7 +186,6 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
case EN_CHANGE: {
|
||||
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
|
||||
if ( (LOWORD(wParam) == IDC_DESKTOP_WIDTH) || (LOWORD(wParam) == IDC_DESKTOP_HEIGHT) ) setFromDesktopSizeEdits(hDlg);
|
||||
if (LOWORD(wParam) == IDC_SYSCOLORS) onSysColorsChange(hDlg);
|
||||
break;
|
||||
}
|
||||
case BN_CLICKED: {
|
||||
|
@ -182,6 +196,10 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
|||
};
|
||||
break;
|
||||
}
|
||||
case CBN_SELCHANGE: {
|
||||
if (LOWORD(wParam) == IDC_SCREEN_DEPTH) onScreenDepthChanged(hDlg);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue