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

List:       kde-commits
Subject:    [kscreen/sebas/osd] kded/qml: clean up qml code a bit
From:       Sebastian_Kügler <sebas () kde ! org>
Date:       2016-12-02 11:10:27
Message-ID: E1cCljX-0006KE-VH () code ! kde ! org
[Download RAW message or body]

Git commit da778ec97abb02dd018361d7159719ea5ef8a7ca by Sebastian K=C3=BCgle=
r.
Committed on 16/10/2016 at 22:11.
Pushed by sebas into branch 'sebas/osd'.

clean up qml code a bit

M  +1    -1    kded/qml/Osd.qml
M  +6    -21   kded/qml/OsdItem.qml
M  +0    -1    kded/qml/OutputIdentifier.qml

https://commits.kde.org/kscreen/da778ec97abb02dd018361d7159719ea5ef8a7ca

diff --git a/kded/qml/Osd.qml b/kded/qml/Osd.qml
index e19fc9f..030b9ee 100644
--- a/kded/qml/Osd.qml
+++ b/kded/qml/Osd.qml
@@ -35,7 +35,7 @@ PlasmaCore.Dialog {
 =

     property bool animateOpacity: false
 =

-    property string itemSource: "OsdItem.qml"
+    property string itemSource
 =

     property string outputName
     property string modeName
diff --git a/kded/qml/OsdItem.qml b/kded/qml/OsdItem.qml
index d05a196..1fc350b 100644
--- a/kded/qml/OsdItem.qml
+++ b/kded/qml/OsdItem.qml
@@ -23,8 +23,8 @@ import QtQuick.Window 2.2
 =

 Item {
     property QtObject rootItem
-    height: Math.min(units.gridUnit * 15, Screen.desktopAvailableHeight / =
5)
-    width: height
+    //height: Math.min(units.gridUnit * 15, Screen.desktopAvailableHeight =
/ 5)
+    //width: 1000//Screen.desktopAvailableHeight * 0.8//Math.min(height * =
10, Screen.desktopAvailableWidth * 0.8)
 //     height: rootItem.outputHeight + units.gridUnit
 //     width: rootItem.outputWidth + units.gridUnit
 //     objectName: "dialog"
@@ -45,29 +45,13 @@ Item {
     PlasmaCore.IconItem {
         id: icon
 =

-        height: parent.height - Math.max(progressBar.height, label.height)
+        height: parent.height - label.height
                               - ((units.smallSpacing/2) * 3) //it's an svg
         width: parent.width
 =

         source: rootItem.icon
     }
 =

-    PlasmaComponents.ProgressBar {
-        id: progressBar
-
-        anchors {
-            bottom: parent.bottom
-            left: parent.left
-            right: parent.right
-            margins: Math.floor(units.smallSpacing / 2)
-        }
-
-        visible: rootItem.showingProgress
-        minimumValue: 0
-        maximumValue: 100
-
-        value: Number(rootItem.osdValue)
-    }
     PlasmaExtra.Heading {
         id: label
         anchors {
@@ -77,8 +61,7 @@ Item {
             margins: Math.floor(units.smallSpacing / 2)
         }
 =

-        visible: !rootItem.showingProgress
-        text: rootItem.showingProgress ? "" : (rootItem.osdValue ? rootIte=
m.osdValue : "")
+        text: outputName
         horizontalAlignment: Text.AlignHCenter
         wrapMode: Text.WordWrap
         maximumLineCount: 2
@@ -88,5 +71,7 @@ Item {
     }
 =

     Component.onCompleted: {
+        print("Desktopw:" + Screen.desktopAvailableWidth)
+        print("Desktoph:" + Screen.desktopAvailableHeight)
     }
 }
diff --git a/kded/qml/OutputIdentifier.qml b/kded/qml/OutputIdentifier.qml
index a5a2454..6245928 100644
--- a/kded/qml/OutputIdentifier.qml
+++ b/kded/qml/OutputIdentifier.qml
@@ -21,7 +21,6 @@ import QtQuick.Window 2.2
 =

 import org.kde.plasma.core 2.0 as PlasmaCore
 import org.kde.plasma.components 2.0 as PlasmaComponents
-import org.kde.plasma.extras 2.0 as PlasmaExtra
 =

 ColumnLayout {
 =


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

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