Commit Graph

68 Commits

Author SHA1 Message Date
Zhiyi Zhang 7290db3e7a uxtheme: Get and set system metrics in 96 DPI.
Fix a bug that font size may be smaller than normal after toggling theming.

For example, the following steps will change the system metrics to incorrect values.
1. Open winecfg, and set DPI to 192. Do not restart winecfg.
2. Change the theme to Light. UXTHEME_BackupSystemMetrics() backs up system metrics in 96 DPI
because the current DPI is still 96.
3. Restart winecfg and turn off theming. UXTHEME_RestoreSystemMetrics() restores system metrics in
192 DPI because the current DPI is 192. So system metrics will be scaled to 1/2 of the original size.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=37592
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-09 10:21:27 +02:00
Zhiyi Zhang 615a90e219 uxtheme: Implement OpenThemeDataForDpi().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-01 17:06:22 +02:00
Zhiyi Zhang 0a83027e20 uxtheme: Support drawing themed standard scroll bars.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39821
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:50:11 +02:00
Zhiyi Zhang b0e51ead0d uxtheme: Move themed dialog to uxtheme.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51137
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:49:55 +02:00
Zhiyi Zhang d9063802f2 uxtheme: Move themed scroll bar to uxtheme.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-20 18:49:49 +02:00
Zhiyi Zhang 6f00a2983a uxtheme: Avoid memory leaks.
A THEME_FILE struct and four global ATOMs are leaked when unloading uxtheme.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-05 17:52:47 +02:00
Zhiyi Zhang fe257dde58 uxtheme: Send WM_THEMECHANGED instead of posting it in SetWindowTheme().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51348
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-02 12:39:12 +02:00
Zhiyi Zhang 3f292a0e65 uxtheme: Check window handle for SetWindowTheme().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 23:13:57 +02:00
Zhiyi Zhang 16e2a9aecc uxtheme: Check window handle for GetWindowTheme().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 23:13:57 +02:00
Zhiyi Zhang f5e56638a7 uxtheme: Set last error code for OpenThemeDataEx().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 23:13:57 +02:00
Zhiyi Zhang 3e9fbda43c uxtheme: Fall back to default class if the specified subclass is not found.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50113
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-21 23:13:57 +02:00
Michael Stefaniuc 1f040d666b uxtheme: Use wide-char string literals.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-20 12:43:01 +02:00
Alexandre Julliard 21a19fb4e3 uxtheme: Build with msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 08:36:46 +02:00
Alex Henrie 53c8abbf8a uxtheme: Turn a variable and a constant into static constants.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:10 +01:00
Michael Stefaniuc 93994dfc0b uxtheme: Use the ARRAY_SIZE() macro.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-18 21:09:28 +02:00
Louis Lenders 28613fcd93 uxtheme: Add stub for SetWindowThemeAttribute.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-01-26 14:45:47 +01:00
Sergio Gómez Del Real 731136d8d3 uxtheme: Add a stub for IsCompositionActive().
Signed-off-by: Sergio Gómez Del Real <sdelreal@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-10-18 20:26:18 +02:00
Sebastian Lackner 461bfc64ba uxtheme: Return E_NOTIMPL in HRESULT stub functions.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-14 11:51:53 +09:00
Louis Lenders 997e2046df uxtheme: Fix CloseThemeData with invalid handle value.
Signed-off-by: Louis Lenders <xerox.xerox2000x@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-02-15 21:30:05 +09:00
Andrew Talbot 925a4411e8 uxtheme: Remove unused variable. 2012-11-29 00:15:56 +01:00
Alistair Leslie-Hughes 81079ef35b uxtheme: Set last error on NULL pointer. 2011-08-31 19:43:07 +02:00
Marcus Meissner 790c107045 uxtheme: Mark internal symbols with hidden visibility. 2011-05-25 11:52:01 +02:00
André Hentschel 0304a3e998 uxtheme: Add OpenThemeDataEx. 2011-03-30 15:05:04 +02:00
Alexandre Julliard de3e06a745 uxtheme: Fix some pointer cast warnings on 64-bit. 2009-12-09 12:04:08 +01:00
Michael Stefaniuc 7eb3abc1c1 uxtheme: Remove superfluous pointer casts. 2009-01-13 15:25:55 +01:00
Francois Gouget b3bf746ff9 Straighten out some ellipses. 2008-11-26 12:33:34 +01:00
Michael Stefaniuc 373f8ff103 uxtheme: Remove superflous casts. 2008-11-03 13:42:23 +01:00
Reece Dunn d85c3e7c72 uxtheme: Fixed the todo blocks in the IsThemed tests when theming is inactive. 2008-10-27 13:49:01 +01:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Francois Gouget 2993785f3a Assorted non-ANSI function declaration fixes (missing void). 2007-08-30 11:57:18 +02:00
Andrew Talbot 2bb44198b6 uxtheme: Declare some items static. 2007-02-05 12:32:42 +01:00
Francois Gouget 1ccf944900 Assorted spelling fixes. 2006-11-13 13:01:53 +01:00
Francois Gouget 7a2bd72b8a uxtheme: winerror.h must not define the E_PROP_*_UNSUPPORTED macros. 2006-11-08 12:10:47 +01:00
Francois Gouget a7f8195be9 include: The PSDK does not have the A/W variants of MAKEINTATOM() so we should not either. 2006-11-08 12:10:26 +01:00
Michael Stefaniuc dc3706ae50 uxtheme: Win64 printf format warning fixes. 2006-10-09 12:55:53 +02:00
Francois Gouget 82babbee0b Add missing '\n's to Wine traces. 2006-10-05 17:46:48 +02:00
Frank Richter 11211bf940 uxtheme: Set non-client metrics from theme. 2006-08-14 20:17:10 +02:00
Frank Richter f34412b957 uxtheme: Enable gradient captions if a theme provides colors for them. 2006-08-14 20:17:10 +02:00
Frank Richter 83974b21fa uxtheme: Don't back up colors etc. when a theme is already active. 2006-08-14 11:46:30 +02:00
Alexandre Julliard 5234c8c94b uxtheme: Make some variables static. 2006-08-02 13:33:01 +02:00
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Markus Amsler 104f2e8e7b Improve c2man Documented-Total count. Changes:
- add missing returns section
2005-11-10 11:05:45 +00:00
Mike McCormack d168219849 Fix gcc 4.0 warnings. 2005-09-06 10:26:13 +00:00
Frank Richter 064b54a0ad Remove shlwapi dependency. 2005-09-02 12:29:02 +00:00
Frank Richter 28022e8022 EnumThemeColors() and EnumThemeSizes() actually do not return a single
string with the color/size name, but rather a struct containing three
strings - name, display name and tooltip.
2005-08-30 08:54:45 +00:00
Frank Richter fcb8a2f859 Compare result of RegQueryValueExW() with ERROR_SUCCESS. 2005-08-15 10:23:48 +00:00
Frank Richter 0f94e03b40 Enhance uxtheme to store the themed system metrics in the registry and
also backup the old metrics. That way, themed system colors are set
even uxtheme was not loaded and initialized yet, and when a theme is
deactivated, the colors prior to the activation are restored as well.
Also, not having to set the system colors in uxtheme startup works
around weird problems where SetSystemColors() ended up being called
from inside window creation and this seemingly led to some creation
message being sent twice.
2005-08-12 15:51:13 +00:00
Frank Richter 100923508c OpenThemeData() now always sets the window theme to the handle
returned (even if that is NULL) - previously, it could happen that
when no theme was active or the theme data could not be opened that
the window theme remained became then-dangling (and hence subsequent
calls to GetWindowTheme() would return that bogus theme).
2005-07-24 17:11:05 +00:00
Frank Richter 5bb8f968f6 Make dialog theme texture setting non-global (ie a per-window
setting).
2005-07-15 16:32:37 +00:00
Frank Richter 0bd04866e8 Don't crash if NULL is passed as the class list to OpenThemeData(). 2005-07-12 16:59:20 +00:00