Menu location ...

Linux specific forum
HarrysLad
User
User
Posts: 57
Joined: Fri Jun 04, 2010 9:29 pm
Location: Sunny Spain

Menu location ...

Post 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
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Re: Menu location ...

Post by Trond »

This depends on the desktop environment. Try MenuHeight(), it should return 0 when the menu isn't inside the the application window.
HarrysLad
User
User
Posts: 57
Joined: Fri Jun 04, 2010 9:29 pm
Location: Sunny Spain

Re: Menu location ...

Post 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
Post Reply