https://bugs.documentfoundation.org/show_bug.cgi?id=170048

Hossein <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #3 from Hossein <[email protected]> ---
(In reply to Buovjaga from comment #1)
> It's dark for me.
> 
> Version: 26.8.0.0.alpha0+ (X86_64)
> Build ID: 680(Build:0)
> CPU threads: 2; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster
The issue of light title bar in dark mode happens on my system in the sample
provided by MS article. But, the above Github project gives a dark title bar
anyway!

Searching for DWMWA_USE_IMMERSIVE_DARK_MODE gives no result, but it turned out
that the magic value 20 is used directly:

$ git grep -n DwmSetWindowAttribute
vcl/win/window/salframe.cxx:301:    DwmSetWindowAttribute(hWnd,
DWMWA_USE_IMMERSIVE_DARK_MODE, &bDarkMode, sizeof(bDarkMode));

I have created a patch for using symbolic constant instead, although it should
be improved to handle the old value 19 (instead of 20) for previous Windows
versions:

tdf#145759 Use DWMWA_USE_IMMERSIVE_DARK_MODE
https://gerrit.libreoffice.org/c/core/+/195910

Then, I searched for the cause of difference on my system, and I found that
this is actually a Windows option:

Settings > Personalization > Colors > Show accent color on title bars and
window borders [x]

Deactivating this option makes LibreOffice title bar dark in dark mode. Having
the the option activated prevents DWMWA_USE_IMMERSIVE_DARK_MODE to work. On the
other hand, it is possible to override that by setting the title bar color
manually:

  COLORREF dark = RGB(32, 32, 32);
  DwmSetWindowAttribute(hWnd, DWMWA_CAPTION_COLOR, &dark, sizeof(dark));

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to