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

List:       kde-commits
Subject:    [kde-workspace] plasma/generic/applets/batterymonitor/contents/ui: Update set focus on expanded
From:       David Edmundson <kde () davidedmundson ! co ! uk>
Date:       2014-02-06 14:55:28
Message-ID: E1WBQMS-0003yy-Ps () scm ! kde ! org
[Download RAW message or body]

Git commit 806d493549d426df58bc878fa2918e19fcd7b754 by David Edmundson.
Committed on 06/02/2014 at 14:55.
Pushed by davidedmundson into branch 'master'.

Update set focus on expanded

Component will only be created when expanded, we can set active focus
when that happens

M  +4    -8    plasma/generic/applets/batterymonitor/contents/ui/batterymon=
itor.qml

http://commits.kde.org/kde-workspace/806d493549d426df58bc878fa2918e19fcd7b7=
54

diff --git a/plasma/generic/applets/batterymonitor/contents/ui/batterymonit=
or.qml b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.q=
ml
index aa2a9e2..bc6054d 100755
--- a/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
+++ b/plasma/generic/applets/batterymonitor/contents/ui/batterymonitor.qml
@@ -112,14 +112,6 @@ Item {
         Layout.minimumHeight: dialogItem.implicitHeight
         Layout.maximumHeight: dialogItem.implicitHeight
 =

-        Connections {
-            target: plasmoid
-            onExpandedChanged: {
-                if (popped) {
-                    dialogItem.forceActiveFocus();
-                }
-            }
-        }
         model: batteries
         anchors.fill: parent
         focus: true
@@ -134,6 +126,10 @@ Item {
 =

         pluggedIn: pmSource.data["AC Adapter"]["Plugged in"]
 =

+        Component.onCompleted: {
+            dialogItem.forceActiveFocus();
+        }
+
         onBrightnessChanged: {
             if (disableBrightnessUpdate) {
                 return;
[prev in list] [next in list] [prev in thread] [next in thread] 

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