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

Customizing KDE panels (1)

Tags: plasma, panel, customization, scripting, bug plasma, panel, customization, scripting, bug plasma, panel, customization, scripting, bug
(comma "," separated)
Tommy Vercetti
Registered Member
Posts
27
Karma
0
OS

Customizing KDE panels (1)

Sat Oct 05, 2013 6:45 pm
I try to customize Plasma desktop, in particular to add vertically-oriented panel using javascript below:
Code: Select all
// Side panel
var side_panel = new Panel;
side_panel.location = "right";
side_panel.length = 45;
side_panel.height = screenGeometry(side_panel.screen).height;
side_panel.addWidget("launcher").globalShortcut = "Meta+Home";
side_panel.addWidget("trash");

Though the panel's height is set equal to screen height (line #5), I get wrongly sized panel:
Image
Panel on the left is what I expect to get, panel on the right is what I get instead. Here (pre-penultimate comment) and even here people faced with the same problem, but no advices were given.
So what can you suggest me to solve this? It exists both in 4.10 and 4.11 KDE versions (and perhaps in earlier ones).
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Customizing KDE panels (1)

Sat Oct 12, 2013 9:05 am
You already appear to have a panel on the right - and you can only have one panel on each side of the screen for various reasons. In this case Plasma takes the only action it can and assigns the panel to the left side of the screen instead.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nowardev
Registered Member
Posts
244
Karma
0
OS

Re: Customizing KDE panels (1)

Sat Oct 19, 2013 8:40 pm
mm i guess it's a problem that can not be solved i have spoken one time with aseigo ... about this problem and at the end, if i am not remembering bad, this limitation has been made to avoid problem with horizontal panel ....

i have created the panels just horizontal then i move them manually .....

btw if you have interested here there is a little video about my stuff that maybe could help you to write down the code ....

http://www.youtube.com/watch?v=wAB1whqH9n8
Tommy Vercetti
Registered Member
Posts
27
Karma
0
OS

Sun Nov 17, 2013 8:39 pm
I've talked to Aaron Seigo. As far as I've understood, panel's property "height" has upper limit 255, and it can be changed via setting panel's max height equal to screen height. Max height property used to be inaccessible from plasma scripts, but recently Seigo has implemented it, so now the problem must be solvable.

nowardev, thank you for recommending Kate's snippets. Though they didn't contain what I've exactly needed, they seem to be really helpful.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: Customizing KDE panels (1)

Sun Nov 17, 2013 8:40 pm
Thanks for the update. If you believe the issue to be resolved, please mark the topic as solved.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Tommy Vercetti
Registered Member
Posts
27
Karma
0
OS

  Topic is solved

Sun Dec 08, 2013 4:59 pm
It's a pity, but only minLength/maxLength properties will come with scriptingVersion ≥ 7 (there's 6th in KDE 4.11/SC 4.12), nothing for "height".
For panels created by script "height" property refers to panel vertical size, and it's still can't be set greater than 256 via script. I have no ideas how to fix that problem.

UPD: In KDE 4.12 release there's plasma scriptingVersion 7 available. Also now "height" refers to panel's thickness and "length" to length/height in horizontal/vertical panels, so vertical panels work fine too.


Bookmarks



Who is online

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