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

            Bug ID: 478489
           Summary: Plasma 6 Panel - Unable to set property "Length"
                    through API Scripting
    Classification: Plasma
           Product: plasma-integration
           Version: 5.90.0
          Platform: Arch Linux
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: plasma-b...@kde.org
          Reporter: frankeba...@gmail.com
  Target Milestone: ---

Created attachment 164151
  --> https://bugs.kde.org/attachment.cgi?id=164151&action=edit
How to from GUI

SUMMARY
***
In Plasma 6 with new very much improved Panel, I am unable to set property
"Length" through API Scripting.
I am also unable to find documentation on all of the Plasma 6 Panel's
properties that can be used through API Scripting.

Tried the following documentation:
https://userbase.kde.org/Plasma/Create_a_Global_Theme_Package
https://userbase.kde.org/Plasma/How_to_create_a_Unity-like_look_and_feel_theme_using_Plasma%E2%80%99s_Desktop_Scripting_API
https://develop.kde.org/docs/plasma/
***


STEPS TO REPRODUCE
1. Use org.kde.plasma.desktop-layout.js to create a Global Theme, which
creates, among other things, a bottom Panel ("Floating Dock" to be more
precise).
2. From the following section:

    // Create bottom panel (Dock)
    const dock = new Panel

    // Basic Dock Geometry
    dock.alignment = “center”
    dock.height = Math.round(gridUnit * 2.8);
    dock.hiding = “windowscover”
    dock.location = “bottom”
    dock.panelLength = 1
    dock.maximumLenth = 1000
    dock.minimumLength = 250

Try various possibilities for the line "dock.panelLength = 1" (panelLengthMode,
length, lengthMode, etc…).

3. Remove the Max and Min length lines (last 2) from the script above and try
step 2 again.

OBSERVED RESULT
The Panel does not Fit Content and remain "Fill Width" in all 8 tries.


EXPECTED RESULT
File  ~/.config/plasmashellrc should have a line with "panelLengthMode = 1"
under [PlasmaViews][Panel nnn] section, where "nnn" is a number.

See attached screenshot for what I am trying to achieve, which is extremely
easy through GUI, but I need to set it through API.

Thank you very much for your guidance!

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Yes, it's the best!
KDE Plasma Version: 5.90.90
KDE Frameworks Version: 5.247.0
Qt Version: 6.6.1

ADDITIONAL INFORMATION

I don't believe there is a bug here, at least not at this moment judging how
not far I went with it. :)

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to