Bug 123175

Summary: BackgroundColor property of UnoControlButtonModel is ignored with native widgets framework implementations
Product: LibreOffice Reporter: Andras Timar <timar74>
Component: BASICAssignee: Caolán McNamara <caolan.mcnamara>
Status: VERIFIED FIXED    
Severity: normal CC: caolan.mcnamara, cno, xiscofauli
Priority: medium    
Version: Inherited From OOo   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=124735
Whiteboard: target:6.3.0
Crash report or crash signature: Regression By:
Attachments: Basic macro that displays a button
Dialog definition (xdl)
Screenshot of good case
Screenshot of bad case

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;