layout-templates/defaultPanel: round panel height up, not down

Rounds up to the next highest even integer, which, with the current 18px grid unit, gives you a 46px panel, compared to the 44px yielded by rounding down. This is aligned with the height of the top and bottom bars of Kickoff, both of which are 46px.
This commit is contained in:
Thomas Duckworth 2025-11-10 19:19:59 +11:00
parent c36e873ca8
commit 509f5b3fa0

View file

@ -4,9 +4,9 @@ var panelScreen = panel.screen
// No need to set panel.location as ShellCorona::addPanel will automatically pick one available edge
// For an Icons-Only Task Manager on the bottom, *3 is too much, *2 is too little
// Round down to next highest even number since the Panel size widget only displays
// Round up to next highest even number since the Panel size widget only displays
// even numbers
panel.height = 2 * Math.floor(gridUnit * 2.5 / 2)
panel.height = 2 * Math.ceil(gridUnit * 2.5 / 2)
// Restrict horizontal panel to a maximum size of a 21:9 monitor
const maximumAspectRatio = 21/9;