Bug 153287 - Dark mode: Combo box and Edit box look and feel inconsistent on Windows
Summary: Dark mode: Combo box and Edit box look and feel inconsistent on Windows
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
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: topicUI
Depends on:
Blocks: Windows-Dark-Mode
  Show dependency treegraph
 
Reported: 2023-01-31 07:19 UTC by Mike Kaganski
Modified: 2023-02-15 16:06 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screencast of hovering over LO edit boxes and comboboxes in dark mode (116.13 KB, image/gif)
2023-01-31 07:19 UTC, Mike Kaganski
Details
Screencast of similar controls behavior in Visual Studio 2022 (191.42 KB, image/gif)
2023-01-31 07:24 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-01-31 07:19:38 UTC
Created attachment 185019 [details]
Screencast of hovering over LO edit boxes and comboboxes in dark mode

In current master (toward 7.6), the look and feel of Edit box and of Combobox is inconsistent in dark mode on Windows.

1. The border of combobox is brighter (or maybe just "colder"?) than that of edit box.
2. On hover, they behave differently: combobox does not react, edit box gets a *dark* border (and basically "disappears" visually, instead of becoming highlighted).
Comment 1 Mike Kaganski 2023-01-31 07:24:22 UTC
Created attachment 185020 [details]
Screencast of similar controls behavior in Visual Studio 2022

For comparison: this is how similar controls behave in MS Visual Studio.

They have the same outer decoration. On hover, edit box gets much brighter border; and comboboxes behave in one of two ways: either get the same bright border as edit box (see the zoom box in the bottom), or don't change the border, but slightly change the area (see the process selector). Likely the difference depends on editability of the combobox' edit control.
Comment 2 Mike Kaganski 2023-01-31 07:34:49 UTC
Maybe a better reference behavior could be seen in system file dialogs, featuring an edit box and comboboxes.
Comment 3 Caolán McNamara 2023-01-31 10:13:50 UTC
For these we are using EP_EDITBORDER_NOSCROLL in vcl/win/gdi/salnativewidgets-luna.cxx with EPSN_HOT for our ROLLOVER from the various options from:
https://learn.microsoft.com/en-us/windows/win32/controls/parts-and-states

But it gets murky fast, SetWindowTheme(..., "Explorer", ...) tends to work, and when it doesn't using "CFD" gives decent results, except when it doesn't.
Comment 4 Caolán McNamara 2023-01-31 10:21:44 UTC
If I use "CFD" for Edit then I get a working "HOT" which brightens on rollover, but I don't get a distinguishable focused state, and the current focus is agreeable. Lets try a combination of the two hammers I seem to have.
Comment 5 Caolán McNamara 2023-01-31 15:14:38 UTC
izbot seems down, but trunk looks acceptable to me now with:

Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/64b8057a6cd2fbaed6167e2be912914e9569796c

tdf#153287 rollover in dark mode with "Explorer" is incongruous

It will be available in 7.6.0.

backports to 7-5 and 7-4 in gerrit
Comment 6 Commit Notification 2023-02-01 01:58:36 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/c85107bc4ab93e2cdc9db1700577ec3f462d9fe9

tdf#153287 rollover in dark mode with "Explorer" is incongruous

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 7 Commit Notification 2023-02-15 16:06:21 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/64c400a67db8441fdc5597782c5270cd5028e0fd

tdf#153287 rollover in dark mode with "Explorer" is incongruous

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.