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

List:       kde-commits
Subject:    [declarative-plasmoids] news/package: start to port to components
From:       Marco Martin <notmart () gmail ! com>
Date:       2011-11-30 20:55:23
Message-ID: 20111130205523.4BCA0A60B9 () git ! kde ! org
[Download RAW message or body]

Git commit 44251579d4e2472437a6809ec34d265461a34efe by Marco Martin.
Committed on 30/11/2011 at 21:54.
Pushed by mart into branch 'master'.

start to port to components

M  +6    -9    news/package/contents/ui/ComplexComponents/Toolbar.qml
M  +6    -6    news/package/platformcontents/application/tablet/ui/MainUi/ConfigWidget.qml
 M  +2    -3    news/package/platformcontents/application/tablet/ui/MainUi/MainUi.qml
M  +7    -9    news/package/platformcontents/application/tablet/ui/MainUi/TabletToolbar.qml


http://commits.kde.org/declarative-plasmoids/44251579d4e2472437a6809ec34d265461a34efe

diff --git a/news/package/contents/ui/ComplexComponents/Toolbar.qml \
b/news/package/contents/ui/ComplexComponents/Toolbar.qml index 67d99c9..f9ea848 \
                100644
--- a/news/package/contents/ui/ComplexComponents/Toolbar.qml
+++ b/news/package/contents/ui/ComplexComponents/Toolbar.qml
@@ -18,7 +18,7 @@
  */
 
 import Qt 4.7
-import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
+import org.kde.plasma.components 0.1 as PlasmaComponents
 import org.kde.plasma.core 0.1 as PlasmaCore
 import org.kde.plasma.graphicslayouts 4.7 as GraphicsLayouts
 
@@ -28,8 +28,7 @@ PlasmaCore.FrameSvgItem {
     height: backButton.height + margins.top + margins.bottom
     clip: true
 
-    imagePath: "widgets/frame"
-    prefix: "raised"
+    imagePath: "widgets/toolbar"
 
     signal openOriginalRequested
     signal backRequested
@@ -52,10 +51,9 @@ PlasmaCore.FrameSvgItem {
         }
     }
 
-    PlasmaWidgets.PushButton {
+    PlasmaComponents.Button {
         id: backButton
         text: i18n("Back")
-        maximumSize: minimumSize
 
         x: toolbarFrame.margins.left
         y: backEnabled?toolbarFrame.margins.top:-height-5
@@ -76,10 +74,9 @@ PlasmaCore.FrameSvgItem {
         }
     }
 
-    PlasmaWidgets.PushButton {
+    PlasmaComponents.Button {
         id: openOriginalButton
         text: i18n("Open original")
-        maximumSize: minimumSize
 
         anchors.left: backButton.right
         y: (mainUi.state == "item")?toolbarFrame.margins.top:-height-5
@@ -93,7 +90,7 @@ PlasmaCore.FrameSvgItem {
         }
     }
 
-    PlasmaWidgets.LineEdit {
+    PlasmaComponents.TextField {
         id: searchBox
         clearButtonShown: true
         anchors.right: parent.right
@@ -101,7 +98,7 @@ PlasmaCore.FrameSvgItem {
         y: searchEnabled?toolbarFrame.margins.top:-height-5
         anchors.rightMargin: toolbarFrame.margins.right
         anchors.topMargin: toolbarFrame.margins.top
-        onTextEdited: {
+        onTextChanged: {
             searchTimer.running = true
         }
         Behavior on y {
diff --git a/news/package/platformcontents/application/tablet/ui/MainUi/ConfigWidget.qml \
b/news/package/platformcontents/application/tablet/ui/MainUi/ConfigWidget.qml index \
                520ca03..3fef0ba 100644
--- a/news/package/platformcontents/application/tablet/ui/MainUi/ConfigWidget.qml
+++ b/news/package/platformcontents/application/tablet/ui/MainUi/ConfigWidget.qml
@@ -19,7 +19,7 @@
 
 import QtQuick 1.0
 import org.kde.plasma.core 0.1 as PlasmaCore
-import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
+import org.kde.plasma.components 0.1 as PlasmaComponents
 import org.kde.qtextracomponents 0.1 as QtExtraComponents
 
 Rectangle {
@@ -117,10 +117,10 @@ Rectangle {
                         text: i18n("Feed URL:")
                         color: theme.color
                     }
-                    PlasmaWidgets.LineEdit {
+                    PlasmaComponents.TextField {
                         id: feedUrlEdit
                     }
-                    PlasmaWidgets.PushButton {
+                    PlasmaComponents.Button {
                         text: i18n("Add")
                         onClicked: {
                             feedsModel.append({'url': feedUrlEdit.text})
@@ -147,7 +147,7 @@ Rectangle {
                             text: url
                             anchors.verticalCenter: parent.verticalCenter
                         }
-                        PlasmaWidgets.PushButton {
+                        PlasmaComponents.Button {
                             id: removeButton
                             anchors.right: parent.right
                             anchors.verticalCenter: parent.verticalCenter
@@ -165,7 +165,7 @@ Rectangle {
                     anchors {
                         horizontalCenter: parent.horizontalCenter
                     }
-                    PlasmaWidgets.PushButton {
+                    PlasmaComponents.Button {
                         text: i18n("Ok")
                         onClicked: {
                             var feeds
@@ -183,7 +183,7 @@ Rectangle {
                             disappearAnimation.running = true
                         }
                     }
-                    PlasmaWidgets.PushButton {
+                    PlasmaComponents.Button {
                         text: i18n("Cancel")
                         onClicked: {
                             disappearAnimation.running = true
diff --git a/news/package/platformcontents/application/tablet/ui/MainUi/MainUi.qml \
b/news/package/platformcontents/application/tablet/ui/MainUi/MainUi.qml index \
                8703a43..75b984f 100644
--- a/news/package/platformcontents/application/tablet/ui/MainUi/MainUi.qml
+++ b/news/package/platformcontents/application/tablet/ui/MainUi/MainUi.qml
@@ -79,8 +79,7 @@ Image {
         spacing: -toolbarFrame.margins.bottom/2
         TabletToolbar {
             id: toolbarFrame
-            imagePath: "widgets/frame"
-            prefix: "raised"
+            imagePath: "widgets/toolbar"
             enabledBorders: "BottomBorder"
             z: mainView.z+1
             onOpenOriginalRequested: bodyView.url = Url(bodyView.articleUrl)
@@ -113,7 +112,7 @@ Image {
                 height: mainFlickable.height
 
                 Image {
-                    source: "plasmapackage:/images/sidebarbackground.png"
+                    source: "image://appbackgrounds/contextarea"
                     fillMode: Image.Tile
                     anchors.top: mainView.top
                     anchors.bottom: mainView.bottom
diff --git a/news/package/platformcontents/application/tablet/ui/MainUi/TabletToolbar.qml \
b/news/package/platformcontents/application/tablet/ui/MainUi/TabletToolbar.qml index \
                f9db068..efe0e98 100644
--- a/news/package/platformcontents/application/tablet/ui/MainUi/TabletToolbar.qml
+++ b/news/package/platformcontents/application/tablet/ui/MainUi/TabletToolbar.qml
@@ -18,7 +18,7 @@
  */
 
 import Qt 4.7
-import org.kde.plasma.graphicswidgets 0.1 as PlasmaWidgets
+import org.kde.plasma.components 0.1 as PlasmaComponents
 import org.kde.plasma.core 0.1 as PlasmaCore
 import org.kde.plasma.graphicslayouts 4.7 as GraphicsLayouts
 import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
@@ -26,11 +26,10 @@ import org.kde.plasma.mobilecomponents 0.1 as MobileComponents
 PlasmaCore.FrameSvgItem {
     id: toolbarFrame
     width: mainUi.width
-    height: childrenRect.height + margins.top + margins.bottom
+    height: Math.max(backButton.height, configButton.height) + margins.top + \
margins.bottom  clip: true
 
-    imagePath: "widgets/frame"
-    prefix: "raised"
+    imagePath: "widgets/toolbar"
 
     signal openOriginalRequested
     signal backRequested
@@ -39,10 +38,9 @@ PlasmaCore.FrameSvgItem {
     property bool searchEnabled: true
     property string searchQuery
 
-    PlasmaWidgets.PushButton {
+    PlasmaComponents.Button {
         id: backButton
         text: i18n("Back")
-        maximumSize: minimumSize
 
         x: toolbarFrame.margins.left + 8
         y: backEnabled?toolbarFrame.height/2-height/2:-height-5
@@ -63,11 +61,10 @@ PlasmaCore.FrameSvgItem {
         }
     }
 
-    PlasmaWidgets.PushButton {
+    PlasmaComponents.Button {
         id: openOriginalButton
         text: i18n("Website")
         width: 128
-        maximumSize: minimumSize
 
         anchors {
             left: backButton.right
@@ -87,7 +84,7 @@ PlasmaCore.FrameSvgItem {
     MobileComponents.ViewSearch {
         id: searchBox
         anchors {
-            horizontalCenter: parent.horizontalCenter
+            centerIn: parent
             top:parent.top
         }
         onSearchQueryChanged: {
@@ -100,6 +97,7 @@ PlasmaCore.FrameSvgItem {
     }
 
     MobileComponents.ActionButton {
+        id: configButton
         iconSize: 22
         svg: PlasmaCore.Svg {
             imagePath: "widgets/configuration-icons"


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

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