Page 1 of 1

Menu location ...

Posted: Thu Jun 07, 2018 12:44 pm
by HarrysLad
I've noticed that in Ubuntu 16 my app's main menu is located on the desktop's main menu (like macOS) but, in Ubuntu 18 it's on the app itself (like Windows).

No doubt just more stupid Linux/newbie questions but ...

Can I code to position the app's menu in the desktop's bar when using Ubuntu 18?
Can I program the location of the app's menu - desktop or app?
If not, can I determine (programmatically) where the menu is located ... and also, if its in the app, discover its height so that I can resize the app appropriately?

TIA
Dave

Re: Menu location ...

Posted: Thu Jun 07, 2018 2:32 pm
by Trond
This depends on the desktop environment. Try MenuHeight(), it should return 0 when the menu isn't inside the the application window.

Re: Menu location ...

Posted: Fri Jun 08, 2018 2:01 pm
by HarrysLad
Trond wrote:This depends on the desktop environment. Try MenuHeight(), it should return 0 when the menu isn't inside the the application window.
Thanks for that. I read about the MenuHeight() function in the PB help-file ...

"Linux & MacOS X: This command will always returns 0, as the menu bar isn't part of the window (it is always located on the main bar at the very top of the screen). Therefore MenuHeight() can be used seamlessly on every OS to adjust the window size depending on the actual menu height."

... and believed it! :oops: It may be true of MacOS but not necessarily true of all flavours of Linux.
Now we know better.

Problem sorted now so thanks again,
Dave