[Gambas-user] Theme Colors under QT5

Claus Dietrich claus.dietrich at freenet.de
Tue Apr 4 17:02:38 CEST 2023


Am 03.04.23 um 13:35 schrieb Benoit Minisini:
> Le 03/04/2023 à 13:04, Claus Dietrich a écrit :
>> Hi
>>
>> One motive to develop an own custom Control button was the 
>> unpredictable rendering of the background color of the native Gambas 
>> button under QT5. In order to obtain a default coloring which depends 
>> on the current theme, I use Color.ButtonBackground as background 
>> color for the new button. But to my surprise this color looks totally 
>> different than the background color of the native Gambas button. Must 
>> this also be seen as a problem of the themes (as claimed for the 
>> unpredictable background rendering at QT5)? Can a theme resp. QT 
>> provide a different (wrong?) color than the one its is actually 
>> using? How reliable are the other theme-dependent colors provided by 
>> the color-class?
>>
>> When I changed to gb.gtk3 the button background color of the native 
>> button and my custom control button look identical.
>>
>> Best regards
>>
>> Claus
>>
>
> Which theme gives you this result?
>
It is the default Mint-y theme on Mint 20.3 Cinnamon. It provides 
&H00F0F0F0 as ButtonBackground. I attached a screenshot which shows the 
difference between a very basic self-made button with backcolor 
$H00F0F0F0 and a native button under QT5.

Regards

Claus


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230404/1084fd43/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot_qt5.png
Type: image/png
Size: 3037 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230404/1084fd43/attachment.png>


More information about the User mailing list