David, thanks a lot for the quick reply...

How will that help your use case of the dock?
You control the containment in a panel, but you're not changing Panel.qml itself.

Everything should be exposed to the client already as the "user setting its value" is just the panel config, another QML file with access to the same panelview properties as panel does.

In terms of Panel dimensions  we refer to thickness and length.
When the panel is at the top or bottom of the screen, thickness is height and length is width. When the panel is on the left or right side, it's the opposite.

Thickness is self-explanatory

Length can be confusing:
- length should be the implicit size of the contents of the panel containment want to be.
 - min/max length are the

panelview will set the panel to length, but constrained to min/max length and then also bound to the size of the screen.



David, the Panel.qml file as I have understood it, is a layer between the panelview (c++ code) and the client (qml) implementation. From my dock I can not find any way to alter the the panel's thickness (the Layout.preferredHeight which corrresponds in some cases to thickness (horizontal) is not exposed). I need it because the user can set the icon size and the zoomfactor for the hovering animation, these two are used to calculate the thickness which is needed in order to not have animations that are not shown. Currently
the user must try to set the optimal thickness manually....

What I tried yesterday and it worked is the following, I added in Panel.qml the following but I dont know if this is going to be accepted in
the plasma source code:

.......
    property Item panelClient
.......
    onContainmentChanged: {
        if (!containment) {
            return;
        }
        containment.parent = containmentParent;
        containment.visible = true;
        containment.anchors.fill = containmentParent;
        containment.locationChanged.connect(adjustPrefix);
        adjustPrefix();

if (containment.children[0]) { //////With this I access the client's panel implementation
            panelClient = containment.children[0]
        }
    }
........
//// If the client's panel implementation has set a thickness variable then this binding is activated
   ////  e.g. property int thickness (for the client code)
    Binding {
        target: panel
        property: "thickness"
        when: panelClient && panelClient.thickness!==undefined
        value: {
            if (!panelClient || !panelClient.thickness) {
                return;
            }

            return panelClient.thickness;
        }
    }
.........

    3. "Real" Panel Transparency

    Docks are panels that not only have a visual transparent
    background but also they pass the mouse events to go underneath
    their transparent areas. This is also the way Plank is doing it.
    It creates a big window that for the transparent background leaves
    all the mouse events go underneath. I believe plasma panels are Qt
    windows managed from KWin, I think Qt is offering this feature by
    setting some flags for the window. Do you have any ideas for this?


Plasma panels are just normal windows, so a mask could be set. Would have to be on the C++ side in panelview

I have already the c++ code for this and I am using it!!! :) I have set a QRect maskArea for panelview which can be set and it works !!! :). I am sending from my dock the correct maskArea and everything works ok... but, in order to achieve the communication between my implementation and the panelview I added in the Panel.qml the following:

....
//// If the client's panel implementation has set a maskArea variable then this binding is activated
   ////  e.g. property rect  mouseArea (for the client code)

    Binding {
        target: panel
        property: "maskArea"
        when: panelClient && panelClient.maskArea!==undefined
        value: {
            if (!panelClient || !panelClient.maskArea) {
                return;
            }

            return panelClient.maskArea;
        }
    }
.....


what do you think?



Reply via email to