Bug 167812 - Dark mode: font dropdown shows white rectangles (GTK3)
Summary: Dark mode: font dropdown shows white rectangles (GTK3)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0 target:25.8.1
Keywords: bibisected, bisected, regression
: 168026 168069 168173 (view as bug list)
Depends on:
Blocks: Linux-Dark-Mode
  Show dependency treegraph
 
Reported: 2025-08-05 11:39 UTC by Timur
Modified: 2025-08-30 09:47 UTC (History)
9 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot with patch applied (44.88 KB, image/png)
2025-08-22 08:02 UTC, Heiko Tietze
Details
Compare old and new rendering (14.79 KB, image/png)
2025-08-22 11:52 UTC, Regina Henschel
Details
Font-family dropdown (font selection combobox) remains bright / white under dark GTK theme (81.15 KB, image/png)
2025-08-23 10:45 UTC, BobBau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Timur 2025-08-05 11:39:03 UTC
When using Calc in Dark mode (which is from OS dark mode), font dropdown shows white rectangles instead of font previews, and font name only can be seen when scrolling the dropdown.

This is own build, I did not reproduce in last 26.2 bibisect repo I had. 
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 937b5e61975a8cde1cd200e54fbe540f2122e237
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Comment 1 nobu 2025-08-05 14:07:38 UTC
Reproducible with
Version: 25.8.0.2 (X86_64)
Build ID: 80a8bc2ef75d415a197e282da0ebf917315d5e24
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded
Comment 2 Timur 2025-08-05 14:20:43 UTC
commit e0d4d178caff1414a9a21fa57f06bc8d4d2c389a	[log]
author	Noel Grandin <noel.grandin@collabora.co.uk>	Mon Jan 13 15:03:05 2025 
Change alpha behavour of OutputDevice::SetFillColor

CC Noel, can you please see
Comment 3 V Stuart Foote 2025-08-05 18:57:10 UTC
No issues on Win builds. Its os/DE Dark color theme, in scalc the listbox of of fonts (Format toolbar, Sidebar Properties deck, Character dialog's Font tab).

Version: 25.8.0.2 (X86_64)
Build ID: 80a8bc2ef75d415a197e282da0ebf917315d5e24
CPU threads: 28; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 4 Xisco Faulí 2025-08-20 18:25:14 UTC
*** Bug 168026 has been marked as a duplicate of this bug. ***
Comment 5 Xisco Faulí 2025-08-20 18:26:17 UTC
Increasing importance
Comment 6 Heiko Tietze 2025-08-21 14:49:45 UTC
Same happens for the font name dropdown in Writer. But only gtk3, not kf6/gen/gtk4.
Comment 7 Commit Notification 2025-08-21 17:07:44 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/3275aca2e8eb44d7c167541e86455f50dae204b3

tdf#167812 Calc in Dark mode: font dropdown shows white rectangles (GTK3)

It will be available in 26.2.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 8 Commit Notification 2025-08-21 20:01:19 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/68ea22378d5db5d2c51193a7d9771d4569d4e5aa

tdf#167812 Calc in Dark mode: font dropdown shows white rectangles (GTK3)

It will be available in 25.8.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 Heiko Tietze 2025-08-22 08:02:23 UTC
Created attachment 202445 [details]
Screenshot with patch applied

Transparent background does not work, at least with kf6. Made the screenshot with latest master (and some orange customized doc background). Same issue for gen, of course, but not gtk3/gtk4.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2ecfde9b84a0f548871815327d7ce628de93edad
CPU threads: 32; OS: Linux 6.16; UI render: default; VCL: kf6 (cairo+xcb)
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 10 Noel Grandin 2025-08-22 08:19:22 UTC
Cannot currently debug this. 

Go complain at the Wayland people for deciding to break everything in their pursuit of frame perfection.
Comment 11 Heiko Tietze 2025-08-22 08:43:18 UTC
Not Wayland but X.
Comment 12 Noel Grandin 2025-08-22 08:50:23 UTC
Yes, but I use Wayland on my desktop, and it locks up my entire desktop when I debug this.
Comment 13 Xisco Faulí 2025-08-22 09:58:28 UTC
(In reply to Heiko Tietze from comment #9)
> Created attachment 202445 [details]
> Screenshot with patch applied
> 
> Transparent background does not work, at least with kf6. Made the screenshot
> with latest master (and some orange customized doc background). Same issue
> for gen, of course, but not gtk3/gtk4.
> 
> Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: 2ecfde9b84a0f548871815327d7ce628de93edad
> CPU threads: 32; OS: Linux 6.16; UI render: default; VCL: kf6 (cairo+xcb)
> Locale: en-US (en_US.UTF-8); UI: en-US
> Calc: threaded

Hi Heiko,
Can you explain under which circumstances the issue is reproduced ?
- Is it reproduced with a clean profile with the default appearance ?
- Is it reproduced with dark mode ?
Comment 14 Noel Grandin 2025-08-22 10:00:29 UTC
Noting that I have a fix for this, still testing: https://gerrit.libreoffice.org/c/core/+/190057
Comment 15 Heiko Tietze 2025-08-22 10:40:36 UTC
Using a color fixes the issue for me

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 83e45b132d71..9df628bab74d 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -832,7 +832,8 @@ OutputDevice& FontNameBox::CachePreview(size_t nIndex, Point* pTopLeft,
 
             VirtualDevice& rDevice = *rVirtualDevs.back();
             rDevice.SetOutputSizePixel(Size(gUserItemSz.Width(), gUserItemSz.Height() * gPreviewsPerDevice));
-            rDevice.SetBackground(Wallpaper(COL_TRANSPARENT));
+            const Color aColor = Application::GetSettings().GetStyleSettings().GetFieldColor();
+            rDevice.SetBackground(Wallpaper(aColor));
             rDevice.Erase();
             if (bIsLOK)
             {
Comment 16 Xisco Faulí 2025-08-22 11:20:00 UTC
(In reply to Noel Grandin from comment #14)
> Noting that I have a fix for this, still testing:
> https://gerrit.libreoffice.org/c/core/+/190057

it works great in GTK3
Comment 17 Regina Henschel 2025-08-22 11:52:02 UTC
Created attachment 202448 [details]
Compare old and new rendering

It works in principle, but the old kind has 1 pixel line thickness and the new one has 2 pixel line thickness. The font names look more blurry in the new version.

Tested on Windows 11 with 120 dpi.
Comment 18 nobu 2025-08-23 00:50:24 UTC
*** Bug 168069 has been marked as a duplicate of this bug. ***
Comment 19 BobBau 2025-08-23 10:45:30 UTC
Created attachment 202467 [details]
Font-family dropdown (font selection combobox) remains bright / white under dark GTK theme
Comment 20 Commit Notification 2025-08-23 11:59:04 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4bdcccaedb5f1be85784dffd70fc017d1ed2fc5b

tdf#167812 font dropdown broken (2)

It will be available in 26.2.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 21 Commit Notification 2025-08-24 19:23:29 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/b7d54ddc548f9df7058c8a1dc4df00691b74c35d

tdf#167812 font dropdown broken (2)

It will be available in 25.8.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 22 Hossein 2025-08-29 12:28:59 UTC
*** Bug 168173 has been marked as a duplicate of this bug. ***