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

List:       kde-commits
Subject:    [plasma-mobile/mart/themeunits] components/mobilecomponents: remove some plasmacore deps
From:       Marco Martin <notmart () gmail ! com>
Date:       2015-11-10 10:27:52
Message-ID: E1Zw69Y-0006Yo-BZ () scm ! kde ! org
[Download RAW message or body]

Git commit 2ba80e407e11bc8980990fb7eb88dc66feed6e85 by Marco Martin.
Committed on 10/11/2015 at 10:19.
Pushed by mart into branch 'mart/themeunits'.

remove some plasmacore deps

M  +1    -3    components/mobilecomponents/plasmatheme/Theme.qml
M  +1    -1    components/mobilecomponents/qml/ContextDrawer.qml
M  +4    -5    components/mobilecomponents/qml/GlobalDrawer.qml
M  +2    -1    components/mobilecomponents/qml/Heading.qml
M  +3    -9    components/mobilecomponents/qml/OverlayDrawer.qml
M  +2    -1    components/mobilecomponents/qml/PageRow.qml
M  +5    -8    components/mobilecomponents/qml/SplitDrawer.qml
M  +1    -1    components/mobilecomponents/qml/private/ActionButton.qml

http://commits.kde.org/plasma-mobile/2ba80e407e11bc8980990fb7eb88dc66feed6e85

diff --git a/components/mobilecomponents/plasmatheme/Theme.qml \
b/components/mobilecomponents/plasmatheme/Theme.qml index 9a92a7f..c61d520 100644
--- a/components/mobilecomponents/plasmatheme/Theme.qml
+++ b/components/mobilecomponents/plasmatheme/Theme.qml
@@ -32,10 +32,8 @@ import org.kde.plasma.core 2.0 as PlasmaCore
    details about choosing a color scheme for your application.
  */
 QtObject {
-    id: theme
 
     property color textColor: theme.textColor
-    
     property color highlightColor: theme.highlightColor
     property color backgroundColor: theme.backgroundColor
     property color linkColor: theme.linkColor
@@ -56,5 +54,5 @@ QtObject {
     property color complementaryHoverColor: theme.complementaryHoverColor
     property color complementaryFocusColor: theme.complementaryFocusColor
 
-    property var defaultFont: theme.defaultFont
+    property variant defaultFont: theme.defaultFont
 }
diff --git a/components/mobilecomponents/qml/ContextDrawer.qml \
b/components/mobilecomponents/qml/ContextDrawer.qml index f7d9ba3..cfd72d7 100644
--- a/components/mobilecomponents/qml/ContextDrawer.qml
+++ b/components/mobilecomponents/qml/ContextDrawer.qml
@@ -69,7 +69,7 @@ OverlayDrawer {
                         left: parent.left
                         margins: units.largeSpacing
                     }
-                    PlasmaCore.IconItem {
+                    Icon {
                         height: parent.height
                         width: height
                         source: modelData.iconName
diff --git a/components/mobilecomponents/qml/GlobalDrawer.qml \
b/components/mobilecomponents/qml/GlobalDrawer.qml index eccd8ef..262d64f 100644
--- a/components/mobilecomponents/qml/GlobalDrawer.qml
+++ b/components/mobilecomponents/qml/GlobalDrawer.qml
@@ -20,7 +20,6 @@
 import QtQuick 2.1
 import QtQuick.Controls 1.0
 import QtQuick.Layouts 1.3
-import org.kde.plasma.core 2.0 as PlasmaCore
 import org.kde.kquickcontrolsaddons  2.0
 
 OverlayDrawer {
@@ -43,7 +42,7 @@ OverlayDrawer {
             anchors {
                 left: parent.left
             }
-            PlasmaCore.IconItem {
+            Icon {
                 id: headingIcon
                 height: parent.height
                 width: height
@@ -87,7 +86,7 @@ OverlayDrawer {
                         anchors {
                             left: parent.left
                         }
-                        PlasmaCore.IconItem {
+                        Icon {
                             Layout.maximumWidth: height
                             Layout.fillHeight: true
                             source: "go-previous"
@@ -105,7 +104,7 @@ OverlayDrawer {
                             left: parent.left
                             right: parent.right
                         }
-                        PlasmaCore.IconItem {
+                        Icon {
                             Layout.maximumWidth: height
                             Layout.fillHeight: true
                             source: modelData.iconName
@@ -114,7 +113,7 @@ OverlayDrawer {
                             Layout.fillWidth: true
                             text: modelData.text
                         }
-                        PlasmaCore.IconItem {
+                        Icon {
                             Layout.maximumWidth: height
                             Layout.fillHeight: true
                             source: "go-next"
diff --git a/components/mobilecomponents/qml/Heading.qml \
b/components/mobilecomponents/qml/Heading.qml index 9127b17..ca80f0c 100644
--- a/components/mobilecomponents/qml/Heading.qml
+++ b/components/mobilecomponents/qml/Heading.qml
@@ -18,6 +18,7 @@
 */
 
 import QtQuick 2.0
+import org.kde.plasma.mobilecomponents 0.2
 
 /**
  * A heading label used for subsections of texts.
@@ -61,7 +62,7 @@ Label {
     opacity: 0.8
 
     function headerPointSize(l) {
-        var n = theme.defaultFont.pointSize;
+        var n = Theme.defaultFont.pointSize;
         var s;
         if (l > 4) {
             s = n
diff --git a/components/mobilecomponents/qml/OverlayDrawer.qml \
b/components/mobilecomponents/qml/OverlayDrawer.qml index c38f78c..99f34f2 100644
--- a/components/mobilecomponents/qml/OverlayDrawer.qml
+++ b/components/mobilecomponents/qml/OverlayDrawer.qml
@@ -19,19 +19,13 @@
 
 import QtQuick 2.1
 import QtGraphicalEffects 1.0
-import org.kde.plasma.components 2.0 as PlasmaComponents
-import org.kde.plasma.core 2.0 as PlasmaCore
 import org.kde.kquickcontrolsaddons  2.0
-
+import org.kde.plasma.mobilecomponents 0.2
 
 /**Documented API
-Inherits:
-        Page from org.kde.plasmacomponents
 
 Imports:
-        org.kde.plasma.core
-        org.kde.plasma.components
-        QtQuick 1.1
+        QtQuick 2.1
 
 Description:
         Overlay Drawers are used to expose additional UI elements needed for small \
secondary tasks for which the main UI elements are not needed. For example in Okular \
Active, an Overlay Drawer is used to display thumbnails of all pages within a \
document along with a search field. This is used for the distinct task of navigating \
to another page. @@ -178,7 +172,7 @@ Item {
         Rectangle {
             id: browserFrame
             z: 100
-            color: PlasmaCore.ColorScope.backgroundColor
+            color: Theme.backgroundColor
             anchors {
                 top: parent.top
                 bottom: parent.bottom
diff --git a/components/mobilecomponents/qml/PageRow.qml \
b/components/mobilecomponents/qml/PageRow.qml index d3e0091..35f5713 100644
--- a/components/mobilecomponents/qml/PageRow.qml
+++ b/components/mobilecomponents/qml/PageRow.qml
@@ -43,6 +43,7 @@
 import QtQuick 2.0
 import QtQuick.Controls 1.0
 import org.kde.plasma.components 2.0
+import org.kde.plasma.mobilecomponents 0.2
 
 import "private/PageStack.js" as Engine
 
@@ -58,7 +59,7 @@ Item {
     property ToolBar toolBar
     property variant initialPage
     //A column is wide enough for 30 characters
-    property int columnWidth: \
Math.round(parent.width/(theme.mSize(theme.defaultFont).width*30)) > 0 ? \
parent.width/Math.round(parent.width/(theme.mSize(theme.defaultFont).width*30)) : \
width +    property int columnWidth: Math.round(parent.width/(Units.gridUnit*30)) > 0 \
? parent.width/Math.round(parent.width/(Units.gridUnit*30)) : width  property alias \
clip: scrollArea.clip  
     // Indicates whether there is an ongoing page transition.
diff --git a/components/mobilecomponents/qml/SplitDrawer.qml \
b/components/mobilecomponents/qml/SplitDrawer.qml index f737871..eb672bf 100644
--- a/components/mobilecomponents/qml/SplitDrawer.qml
+++ b/components/mobilecomponents/qml/SplitDrawer.qml
@@ -19,17 +19,14 @@
 
 import QtQuick 2.1
 import QtGraphicalEffects 1.0
-import org.kde.plasma.components 2.0 as PlasmaComponents
-import org.kde.plasma.core 2.0 as PlasmaCore
+import org.kde.plasma.mobilecomponents 0.2
 
 /**Documented API
 Inherits:
-        Page from org.kde.plasmacomponents
+        Item
 
 Imports:
-        org.kde.plasma.core
-        org.kde.plasma.components
-        QtQuick 1.1
+        QtQuick 2.1
 
 Description:
         Split Drawers are used to expose additional UI elements which are optional \
and can be used in conjunction with the main UI elements. For example the Resource \
Browser uses a Split Drawer to select different kinds of filters for the main view. \
@@ -46,7 +43,7 @@ Properties:  
         int visibleDrawerWidth: the width of the visible portion of the drawer: it \
                updates while dragging or animating
 **/
-PlasmaComponents.Page {
+Item {
     id: root
     anchors {
         fill: parent
@@ -112,7 +109,7 @@ PlasmaComponents.Page {
     Rectangle {
         id: browserFrame
         z: 100
-        color: PlasmaCore.ColorScope.backgroundColor
+        color: Theme.backgroundColor
         state: "Closed"
         onStateChanged: sidebar.open = (state != "Closed")
 
diff --git a/components/mobilecomponents/qml/private/ActionButton.qml \
b/components/mobilecomponents/qml/private/ActionButton.qml index b94904f..d7dc64b \
                100644
--- a/components/mobilecomponents/qml/private/ActionButton.qml
+++ b/components/mobilecomponents/qml/private/ActionButton.qml
@@ -33,7 +33,7 @@ MouseArea {
         id: background
         radius: width/2
         anchors.fill: parent
-        color: mouse.pressed ? theme.highlightColor : theme.backgroundColor
+        color: mouse.pressed ? Theme.highlightColor : Theme.backgroundColor
         Icon {
             id: icon
             anchors {


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

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