This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Exact panel height in numbers/pixels?

Tags: None
(comma "," separated)
molecule-eye
Registered Member
Posts
402
Karma
0
OS
Is there any way to determine the exact panel height and/or set the panel height by exact numbers e.g. of pixels? Gnome has this ability.

I need to do so for two reasons: (i) it's more precise (fine adjusting with a trackpad is a pain), and (ii) I have two panels set at the top (one left aligned, the other right aligned) that need to be the exact same height and doing it by eye is not exactly ideal.
User avatar
TheBlackCat
Registered Member
Posts
2945
Karma
8
OS
When you drag the height controller it changes to a number, showing the height. Match these numbers in the two panels to get them the same height.

Unfortunately you cannot set the height numerically without editing the plasma config files.


Man is the lowest-cost, 150-pound, nonlinear, all-purpose computer system which can be mass-produced by unskilled labor.
-NASA in 1965
User avatar
einar
Administrator
Posts
3402
Karma
7
OS
The indication in pixels when dragging is IIRC an openSUSE patch. I don't recall if that's the case upstream.


"Violence is the last refuge of the incompetent."
Image
Plasma FAQ maintainer - Plasma programming with Python
molecule-eye
Registered Member
Posts
402
Karma
0
OS
In KDE 4.6 RC2 the height controller doesn't show a number when I drag it. That's why I asked. I thought it did this in earlier versions but I've noticed it hasn't done some for at least all of 4.6 and I think even earlier as well.

What are the panel config files would allow me to do it manually?
User avatar
CraigPaleo
Registered Member
Posts
73
Karma
0
OS
There is a way to edit the hight of the default panel but it will only work when you add a new default panel. It won't work with a blank panel or grouping panel. (just because I can't find them)

In a terminal, enter
Code: Select all
kdesudo kate


With Kate, navigate to:
/usr/share/kde4/apps/plasma/layout-templates/org.kde.plasma-desktop.defaultPanel/contents/

Open layout.js

You'll see an entry for panel height. Change that number to your preferred height.

It should look like:
Code: Select all
var panel = new Panel
if (panelIds.length == 1) {
    // we are the only panel, so set the location for the user
    panel.location = 'bottom'
}

panel.height = 27
panel.addWidget("launcher")
panel.addWidget("pager")
panel.addWidget("tasks")
panel.addWidget("systemtray")
panel.addWidget("digital-clock")


Image


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]