[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: playground/base/plasma/declarative-applets/replacements/news/package
From: Marco Martin <notmart () gmail ! com>
Date: 2011-03-26 16:14:14
Message-ID: 20110326161414.B2124AC8CA () svn ! kde ! org
[Download RAW message or body]
SVN commit 1226080 by mart:
imove the toolbar in another import
A contents/ui/ComplexComponents (directory)
A contents/ui/ComplexComponents/Toolbar.qml [License: LGPL (v2+)]
A contents/ui/ComplexComponents/qmldir
M +8 -34 contents/ui/main.qml
M +9 -38 platformcontents/application/tablet/ui/main.qml
--- trunk/playground/base/plasma/declarative-applets/replacements/news/package/contents/ui/main.qml \
#1226079:1226080 @@ -23,13 +23,14 @@
import org.kde.plasma.graphicslayouts 4.7 as GraphicsLayouts
import "plasmapackage:/ui/BasicComponents"
+import "plasmapackage:/ui/ComplexComponents"
import "plasmapackage:/code/utils.js" as Utils
import "plasmapackage:/code/bookkeeping.js" as BookKeeping
-QGraphicsWidget {
+Item {
id: mainWindow;
- preferredSize: "250x600"
- minimumSize: "200x200"
+ width: 250
+ height: 400
property string source
signal unreadCountChanged();
@@ -49,7 +50,7 @@
feedSource.connectedSources = source
}
- Item {
+
PlasmaCore.DataSource {
id: feedSource
engine: "rss"
@@ -77,39 +78,12 @@
}
}
}
- }
- layout: GraphicsLayouts.QGraphicsLinearLayout {
- orientation: "Vertical"
- PlasmaWidgets.Frame {
- maximumSize: maximumSize.width+"x"+minimumSize.height
- frameShadow: "Raised"
- layout: GraphicsLayouts.QGraphicsLinearLayout {
- PlasmaWidgets.PushButton {
- id: backButton
- text: i18n("Back")
- maximumSize: minimumSize
- onClicked: {
- if (!bodyView.customUrl) {
- mainView.currentIndex = mainView.currentIndex -1
- } else {
- bodyView.html = "<body \
style=\"background:#fff;\">"+feedSource.data['items'][list.currentIndex].description+"</body>";
+ Column {
+ Toolbar {
+ id: toolbarFrame
}
- }
- }
- QGraphicsWidget {
- GraphicsLayouts.QGraphicsLinearLayout.stretchFactor: 2
- }
- PlasmaWidgets.LineEdit {
- id: searchBox
- clearButtonShown: true
- onTextEdited: {
- searchTimer.running = true
- }
- }
- }
- }
PlasmaWidgets.TabBar {
id : mainView
--- trunk/playground/base/plasma/declarative-applets/replacements/news/package/platformcontents/application/tablet/ui/main.qml \
#1226079:1226080 @@ -23,13 +23,14 @@
import org.kde.plasma.graphicslayouts 4.7 as GraphicsLayouts
import "plasmapackage:/ui/BasicComponents"
+import "plasmapackage:/ui/ComplexComponents"
import "plasmapackage:/code/utils.js" as Utils
import "plasmapackage:/code/bookkeeping.js" as BookKeeping
-QGraphicsWidget {
- id: mainWindow;
- preferredSize: "250x600"
- minimumSize: "200x200"
+Item {
+ id: mainWindow
+ width: 250
+ height: 400
property string source
signal unreadCountChanged();
@@ -49,7 +50,6 @@
feedSource.connectedSources = source
}
- Item {
PlasmaCore.DataSource {
id: feedSource
engine: "rss"
@@ -77,46 +77,18 @@
}
}
}
- }
- layout: GraphicsLayouts.QGraphicsLinearLayout {
- orientation: "Vertical"
- PlasmaWidgets.Frame {
- maximumSize: maximumSize.width+"x"+minimumSize.height
- frameShadow: "Raised"
- layout: GraphicsLayouts.QGraphicsLinearLayout {
- PlasmaWidgets.PushButton {
- id: backButton
- text: i18n("Back")
- maximumSize: minimumSize
- visible: false
- onClicked: {
- if (!bodyView.customUrl) {
- mainView.currentIndex = mainView.currentIndex -1
- } else {
- bodyView.html = "<body \
style=\"background:#fff;\">"+feedSource.data['items'][list.currentIndex].description+"</body>";
+ Column {
+ Toolbar {
+ id: toolbarFrame
}
- }
- }
- QGraphicsWidget {
- GraphicsLayouts.QGraphicsLinearLayout.stretchFactor: 2
- }
- PlasmaWidgets.LineEdit {
- id: searchBox
- clearButtonShown: true
- onTextEdited: {
- searchTimer.running = true
- }
- }
- }
- }
PlasmaWidgets.TabBar {
id : mainView
width : mainWindow.width
- height: mainWindow.height
+ height: mainWindow.height - toolbarFrame.height
tabBarShown: false
onCurrentChanged: {
@@ -124,7 +96,6 @@
searchBox.visible = currentIndex < 1
}
-
QGraphicsWidget {
id: listContainer
Component.onCompleted: {
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic