Page 1 of 1

[Solved] Panel overlap

Posted: Sat Oct 27, 2018 1:58 am
by keewee

I'm running Mint 19 with Cinnamon 3.8.9 and have two panels. One runs along the top and has the clock and system tray. The second runs down the left side of the screen and I have the Menu positioned at the top of this panel with the window list below it.

What I would like to do is have the vertical panel run all the way to the top of the screen so the menu icon can be hit by placing my mouse pointer in the top left corner. At the moment the left panel stops where it touches the top panel but I would like to reverse this situation and have the top panel end where it hits the left panel.

The obvious solution was to place the menu in the top panel but you can't use a large icon without enlarging the entire panel. So as a work around I have placed a menu with a transparent icon in the top left but I'd still be interested if anyone can point me to a better solution.

Re: Panel overlap

Posted: Sat Oct 27, 2018 2:22 am
by smurphos
There is a bit of a revamp of the panel code on the cards with Cinnamon 4.0 Mint 19.1 which may help you find a better solution as there will be more versatility in theming different panel zones....but in the meantime you'll probably need to undertake a fairly major re-write of /usr/share/cinnamon/js/ui/panel.js to change the current behaviour of basing the vertical panel dimensions on the horizontal panel height.

Re: Panel overlap

Posted: Sat Oct 27, 2018 3:34 am
by keewee
Thank you very much for the pointer. Believe it or not it only took one tiny change to that file to get the behaviour I wanted, albeit that it probably only suits this specific arrangement.

All I needed to change was in the function _moveResizePanel I simply commented out "- this.toppanelHeight - this.bottompanelHeight" from the line

Code: Select all

let newVertPanelHeight = this.monitor.height - this.toppanelHeight - this.bottompanelHeight
and it allows the vertical panel height to stretch the full height of the screen. This places the menu icon at the top left corner which is what I wanted.

It does leave the two panels overlapping but, fortunately, this doesn't seem to affect the behaviour of the menu button.


Re: Panel overlap

Posted: Sat Oct 27, 2018 3:42 am
by smurphos
LOL - easier than I thought it might be. I was looking at what would be needed to set the horizontal panel width based on the vertical panel width. Still if it works Ok with the overlap all is good. Glad you've got it working as you like.