Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fa685fc3
Commit
fa685fc3
authored
Feb 21, 2015
by
Mark Harmstone
Committed by
Alexandre Julliard
Feb 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecfg: Refresh sys params on theme change.
parent
81711c75
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
2 deletions
+22
-2
theme.c
programs/winecfg/theme.c
+22
-2
No files found.
programs/winecfg/theme.c
View file @
fa685fc3
...
...
@@ -83,6 +83,9 @@ HRESULT WINAPI CloseThemeFile (HTHEMEFILE hThemeFile);
HRESULT
WINAPI
EnumThemes
(
LPCWSTR
pszThemePath
,
EnumThemeProc
callback
,
LPVOID
lpData
);
static
void
refresh_sysparams
(
HWND
hDlg
);
static
void
on_sysparam_change
(
HWND
hDlg
);
/* A struct to keep both the internal and "fancy" name of a color or size */
typedef
struct
{
...
...
@@ -388,7 +391,7 @@ static BOOL update_color_and_size (int themeIndex, HWND comboColor,
}
/* Apply a theme from a given theme, color and size combo box item index. */
static
void
do_apply_theme
(
int
themeIndex
,
int
colorIndex
,
int
sizeIndex
)
static
void
do_apply_theme
(
HWND
dialog
,
int
themeIndex
,
int
colorIndex
,
int
sizeIndex
)
{
static
char
b
[]
=
"
\0
"
;
...
...
@@ -423,6 +426,8 @@ static void do_apply_theme (int themeIndex, int colorIndex, int sizeIndex)
ApplyTheme
(
NULL
,
b
,
NULL
);
}
}
refresh_sysparams
(
dialog
);
}
static
BOOL
updating_ui
;
...
...
@@ -491,7 +496,7 @@ static void apply_theme(HWND dialog)
sizeIndex
=
SendMessageW
(
GetDlgItem
(
dialog
,
IDC_THEME_SIZECOMBO
),
CB_GETCURSEL
,
0
,
0
);
do_apply_theme
(
themeIndex
,
colorIndex
,
sizeIndex
);
do_apply_theme
(
dialog
,
themeIndex
,
colorIndex
,
sizeIndex
);
theme_dirty
=
FALSE
;
}
...
...
@@ -956,6 +961,21 @@ static void apply_shell_folder_changes(void) {
}
}
static
void
refresh_sysparams
(
HWND
hDlg
)
{
int
i
;
for
(
i
=
0
;
i
<
sizeof
(
metrics
)
/
sizeof
(
metrics
[
0
]);
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
);
}
on_sysparam_change
(
hDlg
);
}
static
void
read_sysparams
(
HWND
hDlg
)
{
WCHAR
buffer
[
256
];
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment