Review Request 117606: Make sure that the panel is not hidden when a plasmoid is expanded

Marco Martin notmart at gmail.com
Tue Apr 22 18:47:46 UTC 2014



> On April 17, 2014, 11:30 a.m., Marco Martin wrote:
> > If it's for the panel, it shouldn't be done in AppletQuickItem.
> > also using AcceptingInputStatus seems a tad arbitrary?
> 
> Aleix Pol Gonzalez wrote:
>     I don't think it's arbitrary, having an expanded plasmoid requires input (or interaction), at least to close it.
>     
>     Also if it shouldn't be in AppletQuickItem, where should it go? Applet?
> 
> Aleix Pol Gonzalez wrote:
>     Marco?
> 
> Marco Martin wrote:
>     hmm, AcceptingInputStatus was intended at the beginning for keyboard input (to force the panel to accept focus in cases of textboxes inside the panel)
>     so would make so that if an applet is always expanded it can only be acceptinginput, and a panel with a taskbar would always accept focus.
>     
>
> 
> Aleix Pol Gonzalez wrote:
>     So what's your suggestion?
>     Should we move the expanded property to Plasma::Applet, so panel can take it into account?
> 
> Marco Martin wrote:
>     since there is not real distinction between an applet that is always expanded and an applet in a popup that is open, i think it should be in the qml part that has actually the Dialog of the popupapplets that does a plasmoid.setStatus (and restoring the old one)
>     (that is plasma-desktop/desktoppackage/contents/applet/Compactapplet.qml)
> 
> Aleix Pol Gonzalez wrote:
>     So we want another status that is not AcceptingInput but also makes the panel to be shown?
> 
> Marco Martin wrote:
>     NeedsAttentionStatus or even ActiveStatus should be fine
>     in that enum, the bigger is the value, the more "serious" is the requesting attention level

I think this should be ~ok
--- a/desktoppackage/contents/applet/CompactApplet.qml
+++ b/desktoppackage/contents/applet/CompactApplet.qml
@@ -112,6 +112,8 @@ PlasmaCore.ToolTipArea {
         location: plasmoid.location
         hideOnWindowDeactivate: plasmoid.hideOnWindowDeactivate
 
+        property int oldStatus: 0
+
         mainItem: Item {
             id: appletParent
             Layout.minimumWidth: (fullRepresentation && fullRepresentation.Layout) ? fullRepresentation.Layout.minimumWidth : 0
@@ -122,8 +124,13 @@ PlasmaCore.ToolTipArea {
 
         onVisibleChanged: {
             if (!visible) {
-                plasmoid.expanded = false
+                plasmoid.expanded = false;
+                if (oldStatus > 0) {
+                    plasmoid.status = oldStatus;
+                }
             } else {
+                oldStatus = plasmoid.status;
+                plasmoid.status = PlasmaCore.Types.RequestingAttention;
                 // This call currently fails and complains at runtime:
                 // QWindow::setWindowState: QWindow::setWindowState does not accept Qt::WindowActive
                 popupWindow.requestActivate();


- Marco


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/117606/#review55951
-----------------------------------------------------------


On April 17, 2014, 11:45 a.m., Aleix Pol Gonzalez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/117606/
> -----------------------------------------------------------
> 
> (Updated April 17, 2014, 11:45 a.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-framework
> 
> 
> Description
> -------
> 
> This patch makes sure that the panel containing a plasmoid won't hide when the plasmoid display is open.
> 
> To do so, it sets a AcceptingInputState while caching the last state, to restore it when the plasmoid is contracted back.
> 
> 
> Diffs
> -----
> 
>   src/plasmaquick/appletquickitem.cpp fbdc88d 
>   src/plasmaquick/private/appletquickitem_p.h 784899a 
> 
> Diff: https://git.reviewboard.kde.org/r/117606/diff/
> 
> 
> Testing
> -------
> 
> Manual testing.
> 
> 
> Thanks,
> 
> Aleix Pol Gonzalez
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20140422/ed3746eb/attachment-0001.html>


More information about the Plasma-devel mailing list