Bug 148109 - Setting background color Combobox doesn't work
Summary: Setting background color Combobox doesn't work
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Ilhan Yesil
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-21 12:18 UTC by Ilhan Yesil
Modified: 2023-02-08 11:55 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstrates different behaviour between combobox and listbox (12.50 KB, application/vnd.oasis.opendocument.text)
2022-03-22 07:55 UTC, Ilhan Yesil
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilhan Yesil 2022-03-21 12:18:28 UTC
Description:
If the background color of a combobox ist set (class is VCLXListBox), only the drop down part of the combobox part is paint with the color, but not when only the selected item is shown and also not when the combobox has no focus.

Steps to Reproduce:
To reproduce, you need an extension, where the background color of the combobox is set via XPropertyState. In our company, we need this to indicate missing input.

Actual Results:
Background color is not shown

Expected Results:
Background color is shown


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.4.8.0.0+ (x64)
Build-ID: 2277
CPU-Threads: 12; BS: Windows 10.0 Build 19043; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL
Comment 1 Ilhan Yesil 2022-03-21 12:19:05 UTC
Self confirming according to https://wiki.documentfoundation.org/QA/Guidelines_for_public_and_private_sector_deployments. Issue has originally been reported by another user in our internal issue tracker.
Comment 2 Ilhan Yesil 2022-03-22 07:55:31 UTC
Created attachment 179026 [details]
Demonstrates different behaviour between combobox and listbox

The attached file shows, that it is in fact a problem with the listbox and not the combobox, as the combobox paints the background also in the selected state, while the listbox doesn't.
Open the dialog with pressing on "Demonstrate BackgroundColor" and play around with both types of control, there are some minor differences, but the colors are equal.
The press "Set background color", the combobox is painted immediately with red background, the listbox remains it's color. Only if the drop down list of the listbox is opened, the background color is painted.
Comment 3 Michael Weghorn 2022-03-22 13:06:18 UTC
Also reproducible with current master on Linux with the gtk3 and kf5 VCL plugins:

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 06d132333deeb1580b7cc106dfb3ff4bc454178d
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded

Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 06d132333deeb1580b7cc106dfb3ff4bc454178d
CPU threads: 12; OS: Linux 5.16; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 4 Commit Notification 2023-01-03 07:04:04 UTC
Ilhan Yesil committed a patch related to this issue.
It has been pushed to "master":

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

tdf#148109 Paint background color in listbox

It will be available in 7.6.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 2023-02-07 15:57:55 UTC
Can this be closed as fixed?