Bug 123175 - BackgroundColor property of UnoControlButtonModel is ignored with native widgets framework implementations
Summary: BackgroundColor property of UnoControlButtonModel is ignored with native widg...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-05 10:36 UTC by Andras Timar
Modified: 2019-08-06 14:48 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Basic macro that displays a button (399 bytes, text/plain)
2019-02-05 10:36 UTC, Andras Timar
Details
Dialog definition (xdl) (751 bytes, application/xml)
2019-02-05 10:37 UTC, Andras Timar
Details
Screenshot of good case (1.81 KB, image/png)
2019-02-05 10:37 UTC, Andras Timar
Details
Screenshot of bad case (4.64 KB, image/png)
2019-02-05 10:38 UTC, Andras Timar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Timar 2019-02-05 10:36:57 UTC
Created attachment 148895 [details]
Basic macro that displays a button

Import the attached Basic macro and dialog into Basic IDE and run the macro. A dialog will be displayed with a button. The button's background color property is set to yellow.

With SAL_USE_VCLPLUGIN=gen the button is yellow. However, with native widgets (e.g. GTK2, GTK3, Windows 10) the button is gray. The BackgroundColor property should be honored.
Comment 1 Andras Timar 2019-02-05 10:37:27 UTC
Created attachment 148896 [details]
Dialog definition (xdl)
Comment 2 Andras Timar 2019-02-05 10:37:56 UTC
Created attachment 148897 [details]
Screenshot of good case
Comment 3 Andras Timar 2019-02-05 10:38:46 UTC
Created attachment 148898 [details]
Screenshot of bad case

It's bad since OOo times.
Comment 4 Xisco Faulí 2019-03-21 14:31:48 UTC
Reproduced in

Version: 6.3.0.0.alpha0+
Build ID: 7c7a4675ad5d61add70dd073f680ea37012962ce
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

but not in

Version: 6.3.0.0.alpha0+
Build ID: 7c7a4675ad5d61add70dd073f680ea37012962ce
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, I thought you could be interested in this issue...
Comment 5 Caolán McNamara 2019-04-01 13:43:23 UTC
well, I can make this example work, not sure if there are knock on consequences though
Comment 6 Commit Notification 2019-04-01 19:28:28 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/c8df6f7bfc358a730705eeaf409968b6c457052b%5E%21

Resolves: tdf#123175 don't use NWF to draw buttons with an overridden bg

It will be available in 6.3.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 7 Caolán McNamara 2019-04-01 20:41:48 UTC
seems fixed in master
Comment 8 Cor Nouws 2019-06-07 14:35:28 UTC
verified in Version: 6.3.0.0.alpha1+
Build ID: 77ae0abe21f672cf4b7d2e069f1d40d20edc49a7
CPU threads: 4; OS: Linux 5.0; UI render: default; VCL: gtk3;