MenuHeight() always reports 0 on the qt subsytem. Fine on GTK3.
Ubuntu 18.04 LTS.
MenuHeight() / QT
MenuHeight() / QT
I may look like a mule, but I'm not a complete ass.
Re: MenuHeight() / QT
The menu is not part of the accessible client area of the window, so you do not have to calculate space for it. This is why the result is 0. This is the same on OSX too for example.
quidquid Latine dictum sit altum videtur
Re: [Done] MenuHeight() / QT
Under Ubuntu 18.04 menus are attached to the top of a window just like Windows as opposed to the top of the screen as with OSX. Consequently, there now seems to be no way of positioning a gadget at the bottom of a window with a menu (at least under Ubuntu 18.04 and the qt subsystem) since WindowHeight() remains unchanged whether there is a menu attached or not.
Either MenuHeight() needs to be non-zero or WindowHeight() needs to be altered unless I am missing something?
Code: Select all
If OpenWindow(0, 200, 200, 200, 100, "Menu Example", #PB_Window_SystemMenu)
If CreateMenu(0, WindowID(0)) ; menu creation starts....
MenuTitle("Project")
MenuItem(1, "Open" +Chr(9)+"Ctrl+O")
MenuItem(2, "Save" +Chr(9)+"Ctrl+S")
MenuItem(3, "Save as"+Chr(9)+"Ctrl+A")
MenuItem(4, "Close" +Chr(9)+"Ctrl+C")
EndIf
ButtonGadget(1, 0, 80-MenuHeight(), 80, 20, "CLICK")
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
EndIf
I may look like a mule, but I'm not a complete ass.
Re: MenuHeight() / QT
Removed the done, for more investigation