[Gambas-user] Menubar background only changes to Form.Background on top level window (gtk3)

T Lee Davidson t.lee.davidson at gmail.com
Tue Jan 23 03:51:41 CET 2024


On 1/22/24 15:47, Bruce Steers wrote:
> I have a couple of issues in a GUi build...
> 
> Issue1
> I can set Form Background / Foreground colors but then I get the following behavior with gtk3...
> the Menubar background color changes to correct color only on the top level window but not other opened windows.
> While the Foreground color changes on all windows.
> Leaving a risk of having same color bg and fg on opened windows.
> 
> QT it all works as expected.
> 
> --------
> 
> The other issue is with various gui text rendering.
> If i set Form.Foreground = Color.White
> Then things like Labels,MenuButton and others change to white text. things like Buttons/TogleButtons do not.
> I have to add this code to make things render the correct text color...
> 
>    For Each c As Control In Me.Controls
>      c.Foreground = Me.Foreground
>    Next
> 
> But that's only a workaround and only viable if i have no explicit text colors set.

I find your description of the issue confusing.

When you refer to "other opened windows", do you mean other forms (which, of course, open in a new window)?

And, I'm not sure how you expect it to work. Because, with Qt:
1. I create Form1 which a button event handler in FMain calls with Form1.Show
2. FMain has foreground and background colors set to other than default
3. Form1 has default foreground/background colors.

Fmain shows its colors as it should including the button text. Form1 shows its default colors.

That is what I would expect.

Am I missing something?


-- 
Lee



More information about the User mailing list