[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [plasmashell] [Bug 362511] New: Javascript API binding for (widget)geometry is broken
From:       via KDE Bugzilla <bugzilla_noreply () kde ! org>
Date:       2016-04-30 18:32:40
Message-ID: bug-362511-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=362511

            Bug ID: 362511
           Summary: Javascript API binding for (widget)geometry is broken
           Product: plasmashell
           Version: 5.4.2
          Platform: Kubuntu Packages
                OS: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: NOR
         Component: general
          Assignee: kde@davidedmundson.co.uk
          Reporter: C.P.A.vanrun@uu.nl
                CC: bhush94@gmail.com, plasma-bugs@kde.org

While trying to create a custom desktop layout via desktop scripting
(Javascript API) I failed to set any of the geometry for widgets. It works for
panel objects. I tried the org.kde.plasma.folder plasmoid and several others
but to no avail. Somehow setting the geometry for widgets has zero effect. An
example script is given below.

This is a major problem because it is preventing me from setting up kubuntu for
a small set of computers I am reconfiguring with certain settings. And without
geometries the shell scripting is pretty limited to panels.

Note: new qdbus to open Desktop Console for test scripting:
qdbus org.kde.plasmashell /PlasmaShell
org.kde.PlasmaShell.showInteractiveConsole

// Example script:
// Save as <something>.js and use above desktop console to test it.
print(scriptingVersion) //20
print(applicationVersion)// 5.4.2

var desktopsArray = desktops();
for( var j = 0; j < desktopsArray.length; j++) {
    var clock = desktopsArray[j].addWidget("org.kde.plasma.digitalclock");
    print("Height before setting height: " + clock.geometry.height)
    clock.geometry.height=400;
    print("Height after setting height: " + clock.geometry.height)
    print("Height before replacing geometry: " + clock.geometry.height);
    clock.geometry = new QRectF(0,0,400,400);
    print("Height before replacing geometry: " + clock.geometry.height);
}


Reproducible: Always

Steps to Reproduce:
1. Test above mentioned script or adjust
plasma/shells/org.kde.plasma.desktop/contents/layout.js
2. Run the Interactive Console or restart plasmashell (removing
~/.config/plasma-org.kde.plasma.desktop-appletrc)
3. Make a sad face because a plasmoid is very small.

Actual Results:  
Geometry settings are not picked up, plasmoids autosize.

Expected Results:  
Plasmoids get the geometry as specified in the desktop shell script.

Running kubuntu 15.04 (but I can confirm the problem also occurs in kubuntu
16.04).

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic