Bug 164950 - InfoBar text background color isn't same as the InfoBar background color on GTK
Summary: InfoBar text background color isn't same as the InfoBar background color on GTK
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
25.2.0.1 rc
Hardware: All All
: medium normal
Assignee: Sahil Gautam (allotropia)
URL:
Whiteboard: target:25.8.0
Keywords:
Depends on:
Blocks: UI-Theming gtk3-themeing
  Show dependency treegraph
 
Reported: 2025-01-30 06:08 UTC by Sahil Gautam (allotropia)
Modified: 2025-01-31 08:00 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Info Bar text with different background compared to Info Bar (13.47 KB, image/png)
2025-01-30 06:10 UTC, Sahil Gautam (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sahil Gautam (allotropia) 2025-01-30 06:08:32 UTC
Description:
When LibreOffice theme is enabled, and when using the GTK vcl plugin, the infobar's text background color doesn't match the infobar background color.

Steps to Reproduce:
1. Start LibreOffice with GTK backend(vcl-plugin) and enable Themes (enabled by default on latest master)
2. Open a document such that it triggers the infobar (example: opening a document with a macro when running macros is restricted in the application settings)
3. The infobar text shows up in a rectangle which is colored differently compared to the rest of the infobar

Actual Results:
InfoBar text background color is different from the InfoBar color.

Expected Results:
Info Bar text background color should be same as the Info Bar background color.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 7d632a837870a128eff4375b6c2844b083cad793
CPU threads: 32; OS: Linux 6.12; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 1 Sahil Gautam (allotropia) 2025-01-30 06:10:43 UTC
Created attachment 198878 [details]
Info Bar text with different background compared to Info Bar
Comment 2 Heiko Tietze 2025-01-30 11:29:04 UTC
SfxInfoBarWindow::SetForeAndBackgroundColors() => GtkLabel->set_background() ignores the color apparently. In other words: this goes deeper and is not an issue of the infobar.

(Great example of what I hoped to figure out with the theming.)
Comment 3 Commit Notification 2025-01-31 07:59:36 UTC
Sahil Gautam committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/94eb08183ac2be67f11d45e6ad8e703d39115246

tdf#164950 Set GtkCssProvider at APPLICATION level, not USER

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.