Module: wine Branch: master Commit: 730b6c0162ad45bef59294f943c6ca2325d749d4 URL: https://gitlab.winehq.org/wine/wine/-/commit/730b6c0162ad45bef59294f943c6ca2...
Author: Zhiyi Zhang zzhang@codeweavers.com Date: Wed Apr 17 16:20:01 2024 +0800
light.msstyles: Use #fefefe instead of #ffffff for scrollbar parts.
Fix Imperium: Greek Wars (1183470) launcher scrollbar largely drawn as transparent.
The application sets a hardcoded #ffffff as the color key for transparency. On Windows, the scrollbar parts only have very few #ffffff pixels so the scrollbar is drawn as basically opaque. If a theme that have many 0xffffff pixels is being used, then the bug reproduces as well on Windows. I don't want to change the light theme style for this. So let's work around this by using #fefefe instead of #ffffff. This have little difference visually.
Based on investigation done by Santino Mazza.
---
dlls/light.msstyles/blue_scrollbar_arrows.bmp | Bin 17818 -> 17818 bytes dlls/light.msstyles/blue_scrollbar_arrows.svg | 12 ++++++------ .../blue_scrollbar_thumb_horizontal.bmp | Bin 5238 -> 5238 bytes .../blue_scrollbar_thumb_horizontal.svg | 4 ++-- .../blue_scrollbar_thumb_vertical.bmp | Bin 2998 -> 2998 bytes .../blue_scrollbar_thumb_vertical.svg | 4 ++-- dlls/uxtheme/tests/system.c | 1 - 7 files changed, 10 insertions(+), 11 deletions(-)
diff --git a/dlls/light.msstyles/blue_scrollbar_arrows.bmp b/dlls/light.msstyles/blue_scrollbar_arrows.bmp index b877407fbf4..b39c6cb91c4 100644 Binary files a/dlls/light.msstyles/blue_scrollbar_arrows.bmp and b/dlls/light.msstyles/blue_scrollbar_arrows.bmp differ diff --git a/dlls/light.msstyles/blue_scrollbar_arrows.svg b/dlls/light.msstyles/blue_scrollbar_arrows.svg index ed5587ba36a..c2e7093f481 100644 --- a/dlls/light.msstyles/blue_scrollbar_arrows.svg +++ b/dlls/light.msstyles/blue_scrollbar_arrows.svg @@ -8,9 +8,9 @@ </cc:Work> </rdf:RDF> </metadata> - <rect x="-1.875e-5" width="4.4979" height="89.959" fill="#fff"/> + <rect x="-1.875e-5" width="4.4979" height="89.959" fill="#fefefe"/> <g stroke-width=".26458"> - <g fill="#fff"> + <g fill="#fefefe"> <rect x=".13229" y=".13229" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <g stroke="#3096fa"> <rect x=".13229" y="4.6302" width="4.2334" height="4.2333" rx=".52917" ry=".52917"/> @@ -21,24 +21,24 @@ </g> </g> <rect x=".13229" y="9.1281" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#2979ff" stroke="#2979ff"/> - <g fill="#fff"> + <g fill="#fefefe"> <rect x=".13229" y="13.626" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="18.124" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="22.622" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#3096fa"/> </g> <rect x=".13229" y="27.12" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#2979ff" stroke="#2979ff"/> - <g fill="#fff"> + <g fill="#fefefe"> <rect x=".13229" y="31.618" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="36.116" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="40.614" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#3096fa"/> </g> <rect x=".13229" y="45.111" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#2979ff" stroke="#2979ff"/> - <g fill="#fff"> + <g fill="#fefefe"> <rect x=".13229" y="49.609" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="54.107" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#aeaeae"/> <rect x=".13229" y="58.605" width="4.2333" height="4.2333" rx=".52917" ry=".52917" stroke="#3096fa"/> </g> <rect x=".13229" y="63.103" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#2979ff" stroke="#2979ff"/> - <rect x=".13229" y="67.601" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#fff" stroke="#aeaeae"/> + <rect x=".13229" y="67.601" width="4.2333" height="4.2333" rx=".52917" ry=".52917" fill="#fefefe" stroke="#aeaeae"/> </g> </svg> diff --git a/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.bmp b/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.bmp index 50a98885b3f..34ef504c929 100644 Binary files a/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.bmp and b/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.bmp differ diff --git a/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.svg b/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.svg index c4c3adcffa3..d05b9b11b46 100644 --- a/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.svg +++ b/dlls/light.msstyles/blue_scrollbar_thumb_horizontal.svg @@ -8,8 +8,8 @@ </cc:Work> </rdf:RDF> </metadata> - <g fill="#fff"> - <rect x="-7.0588e-5" width="5.2918" height="22.49" fill="#fff" stroke-width=".070005"/> + <g fill="#fefefe"> + <rect x="-7.0588e-5" width="5.2918" height="22.49" fill="#fefefe" stroke-width=".070005"/> <g stroke-width=".26458"> <rect x=".13229" y=".13229" width="5.0272" height="4.2333" rx=".52918" ry=".52918" stroke="#aeaeae"/> <rect x=".13229" y="4.6302" width="5.0272" height="4.2333" rx=".52918" ry=".52918" stroke="#3096fa"/> diff --git a/dlls/light.msstyles/blue_scrollbar_thumb_vertical.bmp b/dlls/light.msstyles/blue_scrollbar_thumb_vertical.bmp index 95fdd8d150c..e9d05452c94 100644 Binary files a/dlls/light.msstyles/blue_scrollbar_thumb_vertical.bmp and b/dlls/light.msstyles/blue_scrollbar_thumb_vertical.bmp differ diff --git a/dlls/light.msstyles/blue_scrollbar_thumb_vertical.svg b/dlls/light.msstyles/blue_scrollbar_thumb_vertical.svg index d42f84082a2..61f0bde183c 100644 --- a/dlls/light.msstyles/blue_scrollbar_thumb_vertical.svg +++ b/dlls/light.msstyles/blue_scrollbar_thumb_vertical.svg @@ -8,8 +8,8 @@ </cc:Work> </rdf:RDF> </metadata> - <rect y="-.00012353" width="4.4979" height="14.552" fill="#fff" stroke-width=".26458"/> - <g fill="#fff" stroke-width=".26458"> + <rect y="-.00012353" width="4.4979" height="14.552" fill="#fefefe" stroke-width=".26458"/> + <g fill="#fefefe" stroke-width=".26458"> <rect transform="rotate(90)" x=".13229" y="-4.3656" width="2.6458" height="4.2333" rx=".52916" ry=".52916" stroke="#aeaeae"/> <rect transform="rotate(90)" x="3.0426" y="-4.3656" width="2.6458" height="4.2333" rx=".52916" ry=".52916" stroke="#3096fa"/> <rect transform="rotate(90)" x="11.774" y="-4.3656" width="2.6458" height="4.2333" rx=".52916" ry=".52916" stroke="#3096fa"/> diff --git a/dlls/uxtheme/tests/system.c b/dlls/uxtheme/tests/system.c index c2da0af7853..9a6739e1c16 100644 --- a/dlls/uxtheme/tests/system.c +++ b/dlls/uxtheme/tests/system.c @@ -2699,7 +2699,6 @@ static void test_theme(BOOL v6)
white_percent = white_count * 100 / (scrollbar_width * scrollbar_height); if (v6) - todo_wine ok(white_percent < 4, "Expected #ffffff pixels less than 4%%.\n"); else ok(white_percent < 50, "Expected #ffffff pixels less than 50%%.\n");