Commit Graph

84 Commits

Author SHA1 Message Date
Eric Pouech 354be197cd uxtheme: Enable compilation with long types.
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-21 12:32:07 +01:00
Zhiyi Zhang 7bc708df35 uxtheme: Do not resize source image even if destination is smaller than sizing margins.
This partially reverts 2b650fa, which resizes source image if destination is smaller than its sizing
margins. Resizing the source image may result in the destination image missing some edges because
of StretchBlt() calls. Same StretchBlt() calls also produce similar results on Windows. So it seems
that Windows don't resize the source image and only resize the margins to try to keep the edges
crisp.

Fix scroll bar thumb missing edges when it's too small.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:28:06 +01:00
Zhiyi Zhang 4311a993dd uxtheme: Search TMT_IMAGEFILE1~7 first when drawing background for parts without glyph images.
Try TMT_IMAGEFILE first when drawing part background and the part contains glyph images.
Otherwise, search TMT_IMAGEFILE1~7 and then TMT_IMAGEFILE or TMT_GLYPHIMAGEFILE. This behavior can
be verified by drawing scroll bar arrow buttons, where TMT_IMAGEFILE is used for background despite
TMT_IMAGEFILE1 being present and TMT_IMAGEFILE1 is used for glyphs despite TMT_IMAGEFILE is present.
For parts without glyph images, TMT_IMAGEFILE1~7 are always searched first, then try TMT_IMAGEFILE
or TMT_GLYPHIMAGEFILE.

Fix the size grip on status control not being painted when using builtin Light theme. The status
gripper part uses TMT_IMAGEFILE1~7 and doesn't have TMT_IMAGEFILE. So when UXTHEME_SelectImage()
tries to query TMT_IMAGEFILE for status gripper, it falls back to using status class TMT_IMAGEFILE.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-25 09:27:59 +01:00
Zhiyi Zhang 3e467a133f uxtheme: Allow EnableThemeDialogTexture() to set flags in multiple steps.
For example, set ETDT_USETABTEXTURE first and then set ETDT_ENABLE to activate dialog theming.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-24 10:18:18 +01:00
Zhiyi Zhang 85de3a4e16 uxtheme: Make IsThemeDialogTextureEnabled() return TRUE for all valid flags without ETDT_DISABLE.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:25:00 +01:00
Zhiyi Zhang 2adb11dd61 uxtheme: Do not call SetWindowTheme() in EnableThemeDialogTexture().
It's no longer necessary to call SetWindowTheme() in EnableThemeDialogTexture() because dialog
theming doesn't need to open theme handles associated with the dialog. Calling SetWindowTheme() also
sends extra messages.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-01-21 09:24:56 +01:00
Zhiyi Zhang bcbe1bcff3 uxtheme: Use StretchBlt() when resizing a source image for tiling.
For example, when a theme part has a source image with 0xff00ff as transparent pixels and the sizing
margin is larger than the destination, the source image is first resized to fit the destination,
during which, StretchBlt() should be used instead of TransparentBlt() because the image should not
be blended with the temporary memory device context.

Fix group box background may be drawn in black.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-01 18:13:54 +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 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 ea430bf2b7 uxtheme: Implement DrawThemeIcon().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51589
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-25 10:40:08 +02:00
Zhiyi Zhang 877d12f879 uxtheme: Support more HiDPI properties.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:35 +02:00
Zhiyi Zhang 4b2777db4b uxtheme: Support TrueSizeStretchMark property.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:27 +02:00
Zhiyi Zhang 0d96bf1f38 uxtheme: Support TrueSizeScalingType property.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:23 +02:00
Zhiyi Zhang 399ebdf893 uxtheme: Remove useless calculation.
rcDst is not used after it is used for getting destination rectangle width and height.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 12:13:18 +02:00
Zhiyi Zhang 6414726f57 uxtheme: Fix a typo in comment.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-09 11:40:15 +02:00
Zhiyi Zhang 300ecff145 uxtheme: Support DTT_FONTPROP for DrawThemeTextEx().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 20:20:08 +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 ce50a7ff4d uxtheme: Properly initialize text drawing options.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:05:57 +01:00
Hadrien Boizard 3155079e41 uxtheme: Use straight assignments instead of CopyRect().
Signed-off-by: Hadrien Boizard <h.boizard@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-11-08 19:22:50 +01:00
Nikolay Sivov 456211e307 uxtheme: Remove stub message for implemented functions.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-10-25 11:53:52 +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
Michael Stefaniuc 74a03b1adc uxtheme: Use straight assignments instead of CopyRect().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-02 16:18:05 -05:00
Michael Stefaniuc 3c3fccacf0 uxtheme: Use wine_dbgstr_rect() to trace RECTs.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 18:42:21 +09:00
Nikolay Sivov 2bb581b9b7 uxtheme: Partial implementation of DrawThemeTextEx. 2015-07-02 13:43:43 +09:00
Mark Harmstone 2b650fa6db uxtheme: Resize source image if destination smaller than margins. 2015-04-15 22:21:57 +09:00
Mark Harmstone c6b4b4b93e uxtheme: Fix colour errors in UXTHEME_StretchBlt. 2015-04-09 14:56:34 +09:00
Mark Harmstone 8fa8a23684 uxtheme: Support images in GetThemeBackgroundRegion. 2015-03-17 00:20:01 +09:00
Mark Harmstone b12f73a591 uxtheme: Assume imagecount to be 1 if unspecified. 2015-03-06 20:31:57 +09:00
Frédéric Delanoy 5181b1c4b8 uxtheme: Use BOOL type where appropriate. 2013-10-14 10:44:37 +02:00
Alexandre Julliard 74f528eb28 uxtheme: Use the correct alpha for theme gradients. 2011-11-30 14:33:54 +01:00
Alexandre Julliard de3e06a745 uxtheme: Fix some pointer cast warnings on 64-bit. 2009-12-09 12:04:08 +01:00
Reece Dunn 5bc2785b72 uxtheme: Draw the correct part of the themed parent background to the DC. 2008-11-12 11:49:12 +01:00
Michael Stefaniuc 373f8ff103 uxtheme: Remove superflous casts. 2008-11-03 13:42:23 +01:00
Rob Shearman 739bdaeb86 uxtheme: SetPropW returns a BOOL not an HRESULT.
Therefore fix the code to handle SetPropW failing with this in mind.
(Found by PreFast.)
2008-09-30 10:20:10 -05:00
Andrew Talbot 471fb146a4 uxtheme: Remove unused variable. 2008-04-30 10:25:42 +02:00
Alex Villacís Lasso 4165a1f696 uxtheme: Skip creation of temporary bitmap when painting a single tile. 2008-04-24 11:49:08 +02:00
Alex Villacís Lasso 6a42264053 uxtheme: Fix nasty regression with painting of themed progress bar. 2008-04-24 11:48:58 +02:00
Austin English 6e59cd2c34 Spelling fixes. 2008-04-22 12:20:12 +02:00
Alex Villacís Lasso 1706d0d63e uxtheme: Speed up UXTHEME_SizedBlt in the ST_TILE by building an appropriately-sized memory bitmap out of the tile instead of iterating with UXTHEME_Blt() directly. 2008-04-22 12:03:14 +02:00
Andrew Talbot 7abeb20490 uxtheme: Assign to structs instead of using memcpy. 2008-03-20 14:27:34 +01:00
Marcus Meissner 3f726d3167 uxtheme: Fixed wrong index in draw.c. 2007-03-02 11:54:12 +01: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
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
Jonathan Ernst 360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00
Francois Gouget 6d442aeb34 Assorted spelling fixes. 2005-11-23 20:14:43 +01:00
Frank Richter a18042e77f More elaborate IsThemeBackgroundPartiallyTransparent() implementation;
also returns TRUE for theme parts with 32bpp images.
2005-08-30 09:58:41 +00:00