Bug 164969 - GTK: colors in native widgets are different
Summary: GTK: colors in native widgets are different
Status: ASSIGNED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
25.8.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Sahil Gautam (allotropia)
URL:
Whiteboard: target:25.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: GTK3
  Show dependency treegraph
 
Reported: 2025-01-31 10:01 UTC by Xisco Faulí
Modified: 2025-02-26 10:42 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
comparison (56.30 KB, image/png)
2025-01-31 10:01 UTC, Xisco Faulí
Details
Screenshot of function wizard (12.51 KB, image/png)
2025-02-11 12:04 UTC, Buovjaga
Details
Screenshots showing change in behavior for Qt-based VCL plugins (72.52 KB, application/pdf)
2025-02-19 07:04 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2025-01-31 10:01:40 UTC
Created attachment 198900 [details]
comparison

Steps to reproduce:
1. Open writer
2. Modify the document
3. Close the document. The save document dialog is displayed

-> The colors are different from other applications. See the comparison between gerit and LibreOffice

Reproduced in

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7cd00ca413da8d29f54749c04493e85937a2fa38
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: es-ES (es_ES.UTF-8); UI: en-US
Calc: threaded
Comment 1 Xisco Faulí 2025-01-31 10:02:19 UTC
Regression introduced by:

commit 924c7de80afa47a93705e5d073c35f2d81f4ed5a	[log]
author	Sahil Gautam <sahil.gautam.extern@allotropia.de>	Wed Dec 25 23:13:47 2024 +0530
committer	Sahil Gautam <sahil.gautam.extern@allotropia.de>	Tue Jan 28 14:02:56 2025 +0100
tree 61084397109d550da648c4a0f2ebfaa4eb89ef15
parent 795e6f6f3e5ab8201dabde65e9b3b939293d34a4 [diff]

tdf#164393 [API CHANGE] Make the "Automatic" theme Customizable

Bisected with linux64-25.8
Comment 2 Buovjaga 2025-02-09 15:05:25 UTC
Tab rows in dialogs now have a white background. I noticed this while looking at Calc's function wizard (click the "fx" icon in the formula toolbar). Quite noticeable in that particular dialog as the white colour bleeds to the main dialog area as a narrow strip.

The tabs themselves look different - the indicator colour strip for the active tab is gone and when you hover over the non-active tabs, they rise a little bit.

In the Function list, the expander icons are now very light grey on white until you hover over them.

The function Help, Back and Next buttons have a white background.
Comment 3 Buovjaga 2025-02-10 08:32:31 UTC
(In reply to Buovjaga from comment #2)
> Tab rows in dialogs now have a white background. I noticed this while
> looking at Calc's function wizard (click the "fx" icon in the formula
> toolbar). Quite noticeable in that particular dialog as the white colour
> bleeds to the main dialog area as a narrow strip.

Dialog .ui file is formula/uiconfig/ui/formuladialog.ui

You can see commit dc77629b31423b4df553b7e63579f15445ddeab1 for what I was testing.
Comment 4 Commit Notification 2025-02-11 09:56:03 UTC
Sahil Gautam committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/2ebefc61f48b13456de7b45597e64ca5f4d9f729

tdf#164969 fix widget theming/styling in gtk

It will be available in 25.8.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 5 Buovjaga 2025-02-11 12:04:03 UTC
Created attachment 199139 [details]
Screenshot of function wizard

Remaining issues after commit 2ebefc61f48b13456de7b45597e64ca5f4d9f729
Comment 6 Michael Weghorn 2025-02-12 19:53:57 UTC
The problem that style colors aren't properly applied when no customization was done also affects Qt-based VCL plugins, and I bibisected that to the same commit  924c7de80afa47a93705e5d073c35f2d81f4ed5a with the kf5 VCL plugin.

(One case is that buttons, e.g. in the "Save Document?" dialog are too dark with the Breeze style that is default in KDE Plasma.)

I think it would be good to return to the previous state of not interfering with style colors at all unless any modifications were actually done.
Comment 7 Buovjaga 2025-02-13 05:23:17 UTC
(In reply to Michael Weghorn from comment #6)
> The problem that style colors aren't properly applied when no customization
> was done also affects Qt-based VCL plugins, and I bibisected that to the
> same commit  924c7de80afa47a93705e5d073c35f2d81f4ed5a with the kf5 VCL
> plugin.
> 
> (One case is that buttons, e.g. in the "Save Document?" dialog are too dark
> with the Breeze style that is default in KDE Plasma.)
> 
> I think it would be good to return to the previous state of not interfering
> with style colors at all unless any modifications were actually done.

Indeed, there seems to be a huge number of details affected. For example, with kf6, the vertical separator lines of button groups in toolbars are no longer visible. Calc's column and row header borders are lighter grey now.

With gtk3, the text for the active column and row header in Calc is now black when it used to be white.
Comment 8 Sahil Gautam (allotropia) 2025-02-19 04:44:41 UTC
(In reply to Michael Weghorn from comment #6)
> (One case is that buttons, e.g. in the "Save Document?" dialog are too dark
> with the Breeze style that is default in KDE Plasma.)
> 
> I think it would be good to return to the previous state of not interfering
> with style colors at all unless any modifications were actually done.

I wasn't able to reproduce the "buttons too dark" issue, can you please share some more details like appearance mode both of the system and the application (I tried all the combinations I could think of). Some pictures of the dark buttons would help.
Comment 9 Michael Weghorn 2025-02-19 07:04:52 UTC
Created attachment 199301 [details]
Screenshots showing change in behavior for Qt-based VCL plugins
Comment 10 Michael Weghorn 2025-02-19 07:08:16 UTC
(In reply to Sahil Gautam (allotropia) from comment #8)
> (In reply to Michael Weghorn from comment #6)
> > (One case is that buttons, e.g. in the "Save Document?" dialog are too dark
> > with the Breeze style that is default in KDE Plasma.)
> > 
> > I think it would be good to return to the previous state of not interfering
> > with style colors at all unless any modifications were actually done.
> 
> I wasn't able to reproduce the "buttons too dark" issue, can you please
> share some more details like appearance mode both of the system and the
> application (I tried all the combinations I could think of). Some pictures
> of the dark buttons would help.

See screenshots in attachment 199301 [details]. Note how the button color is lighter before the change and in other Qt/KDE applications.
Similar slightly wrong colors are also seen in other places of the UI.

I'd suggest to check why the "use our own colors instead of letting the style do its job" logic gets triggered at all (when it shouldn't in my opinion because no custom colors were set).
Comment 11 Buovjaga 2025-02-26 10:32:38 UTC
Another one from 924c7de80afa47a93705e5d073c35f2d81f4ed5a - launch with SAL_RTL_ENABLED=1 SAL_USE_VCLPLUGIN=gtk3 and observe the window control buttons (hide, maximize, close). At least for me they are like blank squares with rounded corners (close button is the leftmost one). Without the RTL option they are styled normally (for me they are round). Only seen with gtk3.
Comment 12 Michael Weghorn 2025-02-26 10:42:05 UTC
For the record, my thoughts on the topic and a potential approach to address this are in https://gerrit.libreoffice.org/c/core/+/182154/comment/d6f91cfe_ea06b46e/