Page 1 of 1

No frame showing between GTK2 and GTK3...

Posted: Sun Jul 05, 2020 9:31 am
by Jimbob81
Hello,

I've got a simple bit of form code here as a test. With GTK2 subsystem everything is displayed as expected. While GTK3 will not show the frame around the button. Does this happen for anyone else?

Create a new form and paste the following code then compile with GTK2 and GTK3

Code: Select all

;
; This code is automatically generated by the FormDesigner.
; Manual modification is possible to adjust existing commands, but anything else will be dropped when the code is compiled.
; Event procedures needs to be put in another source file.
;

Global Window_0

Global Frame_0, Button_0


Procedure OpenWindow_0(x = 0, y = 0, width = 440, height = 380)
  Window_0 = OpenWindow(#PB_Any, x, y, width, height, "Window test", #PB_Window_SystemMenu)
  Frame_0 = FrameGadget(#PB_Any, 50, 110, 340, 170, "Test Jimmy")
  Button_0 = ButtonGadget(#PB_Any, 140, 190, 160, 25, "Button")
EndProcedure

Procedure Window_0_Events(event)
  Select event
    Case #PB_Event_CloseWindow
      ProcedureReturn #False

    Case #PB_Event_Menu
      Select EventMenu()
      EndSelect

    Case #PB_Event_Gadget
      Select EventGadget()
      EndSelect
  EndSelect
  ProcedureReturn #True
EndProcedure
my GTK2 screenshot:
https://photos.app.goo.gl/4N2X4xxix5iAB2P27

my GTK3 screenshot:
https://photos.app.goo.gl/AGLRb3zMh4XqxtJx9

And just for fun, here is the same code with QT
https://photos.app.goo.gl/kuAUqEs2eqLjB8kM7

I'm using PB 5.62 (x64) with Debian 9 Linux and MATE desktop

Re: No frame showing between GTK2 and GTK3...

Posted: Sun Jul 05, 2020 9:41 am
by mk-soft
It must be the setting of the Linux theme.
With Ubuntu 18.04 and 20.04 everything is displayed.

Re: No frame showing between GTK2 and GTK3...

Posted: Sun Jul 05, 2020 10:16 am
by Jimbob81
Thanks for checking the code for me.
mk-soft wrote:It must be the setting of the Linux theme.
Can you think of any setting in the theme that may cause this?

Re: No frame showing between GTK2 and GTK3...

Posted: Sun Jul 05, 2020 11:12 am
by Shardik
mk-soft wrote:It must be the setting of the Linux theme.
It doesn't necessarily have to be the theme. The many different desktop managers are a nightmare for Linux application developers! I assume that the policy of drawing a frame around a button is determined by the desktop manager of your distribution. For similar problems you may take a look into this thread (display of arrow buttons in a scroll bar) or this thread (display of icons in the window title).

Re: No frame showing between GTK2 and GTK3...

Posted: Sun Jul 05, 2020 11:53 am
by Jimbob81
So after testing multiple desktops and Linux installs as virtual machines, They all ran fine.
I've installed a few other desktops on my Debian install and narrowed my issue down to only MATE on Debian 9. I have yet to find the exact cause why MATE desktop is not displaying a GTK3 frame correctly....

I have an ISO image of Linux Mint with MATE desktop so will try that soon...

Slightly frustrating as I wrote a large program and forced everything to work with GTK2 because it wasn't displaying correctly with GTK3 but really it was the underlying OS! Could have saved myself some time but that's life I suppose.