Commit Graph

57 Commits

Author SHA1 Message Date
Eric Pouech 208c04111e uxtheme: Use correct integral type.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-02 18:43:10 +01:00
Zhiyi Zhang 18eacc6dc7 uxtheme: Use vssym32.h instead of tmschema.h.
tmschema.h is obsolete and missing some definitions. The deleted global and menu classes are not
used anywhere and not in Windows headers.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-02 17:09:39 +01:00
Zhiyi Zhang cd99d08a74 uxtheme: Initialize system metrics in 96 DPI.
Similar to 7290db3.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-22 09:39:40 +02:00
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 f8bc5d7627 uxtheme: Get DPI from theme class.
Fix Command Link glyphs not scaled according to DPI because a NULL device context handle was
passed to GetThemePartSize() and GetThemePartSize() was using a device context to get DPI.

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 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 96b7a8a317 uxtheme: Use TransparentBlt() for bitmaps with all alpha values being 0xff.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51553
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 10:40:11 +02:00
Zhiyi Zhang c6b100ef98 uxtheme: Remove unused code.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:20:10 +01: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
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
Nikolay Sivov d4cc71c5db uxtheme: Use global memory allocation helpers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-26 11:25:31 +01:00
Nikolay Sivov 3fd8a8f209 uxtheme: Return NULL file handle on OpenThemeFile() failure.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-11-13 13:02:46 +01:00
Akihiro Sagawa 9abd3b9622 msstyles: Avoid using isspace() for WCHARs.
Found with Coccinelle.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-17 16:11:22 +02:00
Mark Harmstone 9f622f1fa6 uxtheme: Fix typo making fonts italic. 2015-04-13 15:05:53 +09:00
Mark Harmstone 7aae2d2eae uxtheme: Free properties when theme file closed. 2015-04-13 15:05:39 +09:00
Mark Harmstone 1a9810b385 uxtheme: Fix off-by-one error in array size. 2015-04-06 16:04:41 +09:00
Andrew Talbot 925a4411e8 uxtheme: Remove unused variable. 2012-11-29 00:15:56 +01:00
Henri Verbeet d8c13bc5db uxtheme: GetObject() already returns a DIB's absolute height. 2010-03-01 14:03:34 +01:00
Marcus Meissner 88bd52daaf uxtheme: Handle malformed keys a bit better (Coverity). 2009-11-23 13:09:39 +01:00
Michael Stefaniuc 7eb3abc1c1 uxtheme: Remove superfluous pointer casts. 2009-01-13 15:25:55 +01:00
Austin English 0f361b802d uxtheme: Fix a compiler warning. 2008-12-09 11:26:42 +01:00
Alexandre Julliard ff4fff56e5 uxtheme: Make some functions static. 2008-12-04 12:48:21 +01:00
Michael Stefaniuc 373f8ff103 uxtheme: Remove superflous casts. 2008-11-03 13:42:23 +01:00
Andrew Talbot 7abeb20490 uxtheme: Assign to structs instead of using memcpy. 2008-03-20 14:27:34 +01:00
Andrew Talbot 9e5f2148a1 uxtheme: Remove unneeded casts. 2008-01-23 11:31:42 +01:00
Francois Gouget 44b52b128c Assorted spelling fixes. 2008-01-16 12:48:29 +01:00
Andrew Talbot 7e989655fa uxtheme: Exclude unused headers. 2007-05-21 13:36:34 +02:00
Andrew Talbot 2bb44198b6 uxtheme: Declare some items static. 2007-02-05 12:32:42 +01:00
Francois Gouget 7a2bd72b8a uxtheme: winerror.h must not define the E_PROP_*_UNSUPPORTED macros. 2006-11-08 12:10:47 +01:00
Michael Stefaniuc dc3706ae50 uxtheme: Win64 printf format warning fixes. 2006-10-09 12:55:53 +02:00
Frank Richter 11211bf940 uxtheme: Set non-client metrics from theme. 2006-08-14 20:17:10 +02:00
Frank Richter 3e4bdad4a3 uxtheme: Split color handling out of MSSTYLES_ParseThemeIni into smaller helper functions. 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
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Gerald Pfeifer d60c5cea1c #include <stdlib.h> to get abs() prototype. 2005-09-06 09:19:27 +00:00
Frank Richter 064b54a0ad Remove shlwapi dependency. 2005-09-02 12:29:02 +00:00
Frank Richter 44b4c7459b Pass around what kind of transparency an image actually needs. Use
alpha-blending for 32bpp images.
2005-08-29 21:47:26 +00:00
Frank Richter eed5b662b9 Implement "manual" image sharing(as opposed to using LoadImage() with
LR_SHARED) by keeping the loaded images in a list. This is needed for
proper alpha support later on since once-per-image preparations will
be needed then.
2005-08-29 09:30:17 +00:00
Kevin Koltzau dbfac2ee12 Fix 'cast to pointer from integer of different size' warnings in
64bit.
2005-08-22 10:18:17 +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
Stefan Huehner 2440dcfe88 Fix -Wmissing-declarations warnings. 2005-07-05 12:49:14 +00:00
Frank Richter 420d7a82da Opening some theme class data now also increases the reference count
of the theme file, so as long as theme class data is still opened
somewhere, the theme file won't get freed. Otherwise, it could happen
that invalid class data was used, which could lead to problems.
2005-07-05 11:45:57 +00:00
Frank Richter 796f941bee Enable/disable "flat menus" based on the setting from the active
theme.
2005-07-05 10:55:22 +00:00
Frank Richter db56189f24 Have the theme INI file parsed upon theme activation and not just when
the first theme data is requested; that way, the themed system colors
are set correctly from the start, and not just after some theme data
was requested.
2005-07-01 15:39:14 +00:00
Francois Gouget 52c0832161 Make Unicode strings static const. 2004-04-20 01:12:17 +00:00
Francois Gouget ebf0eb3138 Make static Unicode strings const. 2004-04-20 00:34:52 +00:00
Kevin Koltzau 92002d924b Implemented system metric functions. 2004-02-20 05:12:21 +00:00
Kevin Koltzau f28552b3d3 Keep track of theme filename within THEME_FILE. 2004-02-17 20:22:27 +00:00
Kevin Koltzau 533a999adb Implement DrawThemeBackgroundEx, DrawThemeText, GetThemeTextExtent. 2004-02-16 20:32:59 +00:00