Commit graph

57 commits

Author SHA1 Message Date
Zhiyi Zhang
77b6cf56c1 light.msstyles: Don't draw a border for progress fill parts.
These parts were supposed to contain a solid fill background without a border. If BorderSize is not
set, they will use the border size of 1 from the inherited progress class.
2023-04-07 13:27:35 +02:00
Zhiyi Zhang
2960cf2e06 light.msstyles: Use border fill background for progress parts.
These parts only contain simple images that can be achieved with border fill backgrounds as well.
So visually, this change is a no-op. The reason for using image file backgrounds is that I tend
to use the same background type as the theme files for Windows. However, drawing border fill
background is much more efficient.

Pro Evolution Soccer 2008 demo is buggy and generates ~570,000 WM_PAINT messages for the progress
control. On Windows, it's ~1,140,000 WM_PAINT messages. DrawThemeBackground() on Wine is 10x more
expensive than that of Windows and I found little room for optimization. 60% of the time in
DrawThemeBackground() is spend for CreateCompatibleDC() and other 30% for actually drawing. So I
decided to change light.msstyles instead.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=54728
2023-04-07 13:27:33 +02:00
Zhiyi Zhang
81976e5c3f light.msstyles: Add nonclient metrics. 2023-03-15 17:43:46 +01:00
Alexandre Julliard
4281cb497b Revert "light.msstyles: Add nonclient metrics.".
This reverts commit 9f3138b0ea.
It causes test failures on the Gitlab CI.
2022-11-10 22:00:34 +01:00
Zhiyi Zhang
9f3138b0ea light.msstyles: Add nonclient metrics. 2022-11-09 10:42:09 +01:00
Zhiyi Zhang
cb254cb5f4 light.msstyles: Use a darker color for inactive captions.
Fix invisible disabled menu item text in Subtitle Workshop Classic 6.1.4. The application happens to
use 0xF0F0F0 as the menu background and the inactive caption color to draw disabled menu item text.
In Light theme, the inactive caption color is very close to 0xF0F0F0, thus causing the invisible
text. So use a darker color for inactive captions to avoid this issue. The inactive caption text
color is also adjusted accordingly.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53575
2022-09-26 11:36:50 +02:00
Zhiyi Zhang
914b1246d3 light.msstyles: Add window parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:55:02 +02:00
Zhiyi Zhang
fe944b26f1 light.msstyles: Add Vista+ trackbar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:55:01 +02:00
Zhiyi Zhang
4c292e773f light.msstyles: Add Vista+ tooltip parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:54:59 +02:00
Zhiyi Zhang
b1ac164257 light.msstyles: Add Vista+ toolbar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:54:58 +02:00
Zhiyi Zhang
c894d9a41c light.msstyles: Add taskdialog class.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53066
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:54:56 +02:00
Zhiyi Zhang
b5301fb147 light.msstyles: Add Vista+ tab parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-30 10:54:54 +02:00
Zhiyi Zhang
8e12b359f7 light.msstyles: Add Vista+ spin parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:58:28 +02:00
Zhiyi Zhang
4cb229a97c light.msstyles: Add Vista+ scrollbar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:58:19 +02:00
Zhiyi Zhang
7110384741 light.msstyles: Add Vista+ rebar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:58:11 +02:00
Zhiyi Zhang
9b3b64de85 light.msstyles: Add navigation class.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:58:02 +02:00
Zhiyi Zhang
51f488919d light.msstyles: Add Vista+ menu parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:57:51 +02:00
Zhiyi Zhang
5b563c21a9 light.msstyles: Add Vista+ listview parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-28 13:57:39 +02:00
Zhiyi Zhang
ab82ff093a light.msstyles: Add Vista+ header parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-27 11:23:31 +02:00
Zhiyi Zhang
d29ffcc402 light.msstyles: Add Explorer::TreeView subclass.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53066
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-27 11:23:31 +02:00
Zhiyi Zhang
24aa157516 light.msstyles: Add Vista+ edit parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-27 11:23:31 +02:00
Zhiyi Zhang
ed0b12b6b5 light.msstyles: Add Vista+ combobox parts.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53066
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-27 11:23:31 +02:00
Zhiyi Zhang
957b004c63 light.msstyles: Add Vista+ button parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
2022-06-27 11:23:31 +02:00
Zhiyi Zhang
b90662e695 light.msstyles: Add Menu parts.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53034
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-25 11:59:13 +02:00
Zhiyi Zhang
2b86208f8c light.msstyles: Add Menu stub class.
Fix DTS Master Audio Suite save file button can not be clicked. The application queries for Vista+
Menu class because Wine's default system version is set to Windows 7.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52667
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-24 23:22:06 +01:00
Zhiyi Zhang
ddadd8bd76 light.msstyles: Remove Classic Blue variant.
The Classic Blue theme has only system colors and doesn't contain bitmaps. Such classic themes
should be stored in a .theme file instead of a .msstyles file. While it looks mostly alright when
using the theme, some applications fail to draw elements because they consider theming active as
IsThemeActive() returns TRUE but OpenThemeData() fails.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-01 10:35:59 +01:00
Zhiyi Zhang
b96ec3bf41 light.msstyles: Do not use transparent edges for trackbar horizontal and vertical thumb.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:40 +01:00
Zhiyi Zhang
c4ffeff7cd light.msstyles: Fill combo box background with white pixels.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:40 +01:00
Zhiyi Zhang
cbc0d24f66 light.msstyles: Adjust scroll bar arrow width and height to 17 pixels.
Themed scroll bar width and height are 17 pixels on XP. Fix that Light theme scroll bar arrow glyphs look off by 1
pixel. The combo button glyphs also have to be moved by 1 pixel because it was designed against the old scroll bar
arrow button width and height.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:40 +01:00
Zhiyi Zhang
3acf12b867 light.msstyles: Use stretch sizing type for scroll bar arrow button background.
Scroll bar arrow button background within its sizing margins is all white, using stretch instead of
tile has no visual difference and is more efficient. On Windows, stretch sizing type is also used
for this part.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-02-11 11:21:40 +01:00
Zhiyi Zhang
7143c458f9 light.msstyles: Add more progress bar parts.
Fix Nokia SDK 2.0 for Java installer showing artifacts on its progress bar. The application queries
for these Vista+ progress bar parts because Wine's default system version is set to Windows 7.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:31:21 +01:00
Zhiyi Zhang
9cdb11dcd9 light.msstyles: Fix incorrect progress bar chunk color.
Fix Nokia SDK 2.0 for Java installer not showing progress chunks.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 15:31:21 +01:00
Zhiyi Zhang
36ed40e99f light.msstyles: Add TMT_TRANSITIONDURATIONS property.
Set all transition duration to 100ms for different states and 0ms for the same state.

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
760acf6c13 light.msstyles: Add scrollbar width and height.
Fix a bug that scrollbar width and height don't change when activating
Light theme. For example, when theming is inactive, change scrollbar
width from the default 16 pixels to 32 pixels, then activate Light theme.
Then scrollbar width should be changed to the theme specified scrollbar width.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-01 12:36:18 +02:00
Zhiyi Zhang
05fe57f58a light.msstyles: Add TrueSizeScalingType property to TrueSize sizing parts.
When SizingType property value is TrueSize, theme part images are scaled only when
TrueSizeScalingType property value is DPI or Size.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:53:40 +02:00
Zhiyi Zhang
4d6f1fe9ad light.msstyles: Add more TreeView HiDPI images.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:53:37 +02:00
Zhiyi Zhang
7bebabd998 light.msstyles: Add Tooltip HiDPI images.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:53:35 +02:00
Zhiyi Zhang
0a82fe4cfe light.msstyles: Add Scroll Bar gripper HiDPI images.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:53:32 +02:00
Zhiyi Zhang
db4604b4d5 light.msstyles: Add more Button HiDPI images.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-23 11:52:43 +02:00
Zhiyi Zhang
0d915de46d light.msstyles: Add Tooltip parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
3e4c5afeb2 light.msstyles: Add TrackBar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
ace01c30f8 light.msstyles: Add Tab parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
3dab0775c7 light.msstyles: Add Progress parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
a0debf126f light.msstyles: Add Header parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
5daeb032c7 light.msstyles: Add TreeView parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-28 19:43:27 +02:00
Zhiyi Zhang
ee7be6ea7c light.msstyles: Add ListView parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:21:46 +02:00
Zhiyi Zhang
c4d58096cd light.msstyles: Add Status parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:21:38 +02:00
Zhiyi Zhang
37e85d3a23 light.msstyles: Add Rebar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:21:19 +02:00
Zhiyi Zhang
28a08e90cb light.msstyles: Add Toolbar parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:21:17 +02:00
Zhiyi Zhang
4801f7b29f light.msstyles: Add Spin parts.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-25 10:21:14 +02:00