Bug 153273 - Scroll bar not in dark mode when system dark mode enabled
Summary: Scroll bar not in dark mode when system dark mode enabled
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.4.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.6.0 target:7.5.1 target:7.4.6
Keywords:
Depends on:
Blocks: Windows-Dark-Mode
  Show dependency treegraph
 
Reported: 2023-01-30 08:01 UTC by Faisal
Modified: 2023-02-15 16:05 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot showing a light theme scroll bar (31.38 KB, image/jpeg)
2023-01-30 08:02 UTC, Faisal
Details
scrollbar in similar popdown in visual studio has the same issue (47.66 KB, image/png)
2023-01-31 09:34 UTC, Caolán McNamara
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Faisal 2023-01-30 08:01:57 UTC
Description:
Scroll bars in the font selection drop-down and font size drop-down of the formatting toolbar are displayed in light mode when Windows's dark mode is enabled.



Steps to Reproduce:
Click to open drop down for font and font size selection.

Actual Results:
Scroll bar displayed in light theme.

Expected Results:
Scroll bar displayed in dark theme.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.4.4.2 (x64) / LibreOffice Community
Build ID: 85569322deea74ec9134968a29af2df5663baa21
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_US); UI: en-US
Calc: CL

(experimental features enabled)
Comment 1 Faisal 2023-01-30 08:02:26 UTC
Created attachment 185008 [details]
Screenshot showing a light theme scroll bar
Comment 2 V Stuart Foote 2023-01-30 16:10:37 UTC
Confirmed with current master against 7.6, the "thumb" fg and the "scroll bar"  bg of the scroll bar widget of the Toolbar listboxes and the Sidebar listboxes do not receive the same color handling as the scroll bar widget on the document canvas.

Examples: scroll bar for the Page deck's Format -> Size listbox
the scroll bar for Font Name, and Font Size listbox

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5e193d854596db714ca786c2a676b5ac9684d5eb
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 3 Caolán McNamara 2023-01-30 19:52:30 UTC
I can see it, but I don't know why that is. It's the same code that renders it in either case; (ImplDrawNativeControl in vcl/win/gdi/salnativewidgets-luna.cxx)
Comment 4 Caolán McNamara 2023-01-31 09:34:42 UTC
Created attachment 185023 [details]
scrollbar in similar popdown in visual studio has the same issue

We're not the only application where this oddity occurs, similar happens in the default Windows file dialog as well, e.g. from notepad or visual studio I get a light scrollbar in drop downs where its is dark in the parent dialog.
Comment 5 Caolán McNamara 2023-01-31 10:45:16 UTC
stumbled on a workaround
Comment 6 Commit Notification 2023-01-31 16:49:48 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4332c58eca7df7a30e8f11b9193d7d0727c2a36c

tdf#153273 bodge dark scrollbar into drop downs

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Caolán McNamara 2023-01-31 16:51:00 UTC
looks good for me in trunk now, backports to 7-5 and 7-4 in gerrit
Comment 8 Commit Notification 2023-01-31 16:52:51 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/5b64ac83cdbab98052c478d5bb6954b324a36171

tdf#153273 bodge dark scrollbar into drop downs

It will be available in 7.5.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 V Stuart Foote 2023-02-01 19:01:19 UTC
The scrollbar and thumb (unfocused and focused) are getting color assignment more inline with Windows os/DE in a Dark theme mode. 

Thanks Caolán

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: d8e6b488ceaff7c88856ebcfcfec14d2d8cd7652
CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
Comment 10 Commit Notification 2023-02-15 16:05:15 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/165dce050b41c1268a56905986f97263717f1184

tdf#153273 bodge dark scrollbar into drop downs

It will be available in 7.4.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.