The removed tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These tests are covered by test_EnableThemeDialogTexture() in uxtheme/tests/system.c. These tests
are also misleading because a WM_ERASEBKGND message is needed to actually activate dialog theming.
Without the message, they give the impression that EnableThemeDialogTexture() does nothing and
DefDlgProcA/W() are not hooked.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
DrawStatusTextW() always draws the text background, so it's unfit to use it directly to draw status
text because status control draws its own background.
Fix status control text having wrong background when themed.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
The part background is already painted in STATUSBAR_Refresh().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fix check boxes in the list items of 7-zip options dialog not being themed even when theming is on.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fixes a testbot failure on Windows 10 Hebrew.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
WinSCP uses image list margin to adjust image position on a button when theming is on.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52076
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fix a regression from 7c9cacd, in which a ExcludeClipRect() call was removed by mistake.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52080
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Fix a regression from 2f1bbd8 that makes the static control for DPI sample text in winecfg not
refreshing its background when moving the DPI slider.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Currently there is no need to hook DefDlgProc(). Tests show that dialog theming shouldn't be
implemented in DefDlgProc().
Also fix a double free bug because WM_DESTROY in UXTHEME_DefDlgProc() calls CloseThemeData() even
when the theme handle is not opened when handling WM_CREATE in UXTHEME_DefDlgProc(). The bug can
be demonstrated by running comctl32/tests/propsheet.c tests with Light theme.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Handle WM_ERASEBKGND in the property sheet page window procedure and use a pattern brush created
from theme parts to fill background instead of calling DrawThemeBackground() directly.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Move themed WM_CTLCOLORSTATIC handling from UXTHEME_DefDlgProc() to the property sheet page window
procedure.
Fix a regression from 2f1bbd8 that makes the static controls in file open dialog to have black
background when using some themes.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51987
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
These tests show that it's the themed property sheet page window procedure that sets device contexts
transparent and return a pattern brush created from the tab body part in a theme. Combined with
test_WM_CTLCOLORSTATIC() in dlls/comctl32/tests/static.c, we can conclude that UXTHEME_DefDlgProc()
shouldn't handle WM_CTLCOLORSTATIC.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Mostly to test that even when theme texture is enabled for a dialog, the default dialog procedure
still returns the stock COLOR_BTNFACE brush in response to WM_CTLCOLORSTATIC.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Themed group boxes always use client rectangle as content rectangle regardless of group box content
margin specified by theme files.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52028
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Some applications subclass the combo box and handle WM_ERASEBKGND themselves,
without using WS_CLIPCHILDREN. This causes them to erase over the editbox
child, so it requires a refresh as well.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=22260
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
Parts in group boxes with BS_PUSHLIKE can be at the bottom, center and top when theming is off.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
BS_3STATE and BS_AUTO3STATE are check boxes. Fix BS_3STATE and BS_AUTO3STATE buttons drawing
indeterminate state as unchecked.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
WS_EX_RIGHT has the same effect as BS_RIGHT.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
get_box_rect() is introduced so that we don't need to duplicate the check box rectangle calculation
when painting themed check boxes.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>