[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/CircularButton.qml
|
@@ -12,10 +12,12 @@
import QtQuick.Window 2.0
+import Sailfish.Silica 1.0
+
Item {
id: root
- readonly property int diameter: Screen.pixelDensity * 9
+ readonly property int diameter: Theme.itemSizeSmall
property alias iconSource: icon.source
property bool highlight: false
@@ -73,5 +75,4 @@
width: diameter
height: diameter
- Component.onCompleted: console.log("CircularButton! visible:"+root.visible+ " width:"+root.width+ " height:"+root.height + " Screen.pixelDensity:"+Screen.pixelDensity+ " diameter:"+root.diameter);
}
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/MainScreen.qml
^
|
@@ -13,7 +13,6 @@
import QtQuick 2.2
-import QtQuick.Window 2.0 as QWindow
import Sailfish.Silica 1.0
@@ -120,28 +119,6 @@
visible: false
marbleItem: marbleMaps
}
-
- BoxedText {
- id: quitHelper
- visible: false
- text: qsTr("Press again to close.")
- anchors.bottom: parent.bottom
- anchors.bottomMargin: QWindow.Screen.pixelDensity * 5
- anchors.horizontalCenter: parent.horizontalCenter
- onVisibleChanged: {
- if (visible) {
- quitTimer.restart()
- }
- }
-
- Timer {
- id: quitTimer
- interval: 3000;
- running: false;
- repeat: false
- onTriggered: itemStack.state = ""
- }
- }
}
BorderImage {
@@ -204,10 +181,9 @@
PositionButton {
id: zoomToPositionButton
anchors {
- right: parent.right
- rightMargin: 0.005 * root.width
+ horizontalCenter: routeEditorButton.horizontalCenter
bottom: routeEditorButton.top
- bottomMargin: 10
+ bottomMargin: Theme.paddingMedium
}
visible: true
@@ -229,11 +205,11 @@
CircularButton {
id: routeEditorButton
anchors {
+ right: parent.right
bottom: dialogContainer.height > 0 ? undefined : parent.bottom
verticalCenter: dialogContainer.height > 0 ? dialogContainer.top : undefined
- horizontalCenter: zoomToPositionButton.horizontalCenter
- margins: 0.01 * root.width
- bottomMargin: 25
+ rightMargin: Theme.horizontalPageMargin
+ bottomMargin: Theme.horizontalPageMargin
}
onClicked: {
@@ -283,7 +259,6 @@
states: [
State {
name: ""
- PropertyChanges { target: quitHelper; visible: false }
PropertyChanges { target: search; visible: true }
PropertyChanges { target: placemarkDialog; visible: false }
PropertyChanges { target: routeEditor; visible: false }
@@ -313,27 +288,10 @@
PropertyChanges { target: routeEditor; visible: false }
PropertyChanges { target: navigationManager; guidanceMode: true }
StateChangeScript { script: root.pageStack.push(navigationManager); }
- },
- State {
- name: "aboutToQuit"
- PropertyChanges { target: quitHelper; visible: true }
}
]
}
-// Keys.onBackPressed: {
-// if (itemStack.state === "aboutToQuit") {
-// event.accepted = false // we will quit
-// }
-// else if (itemStack.state === "") {
-// itemStack.state = "aboutToQuit"
-// event.accepted = true
-// }
-// else {
-// itemStack.state = ""
-// event.accepted = true
-// }
-// }
}
}
}
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/PlacemarkDialog.qml
^
|
@@ -10,7 +10,6 @@
import QtQuick 2.2
import QtQuick.Layouts 1.1
-import QtQuick.Window 2.0 as QWindow
import Sailfish.Silica 1.0
@@ -22,21 +21,16 @@
property var placemark: null
property string actionIconSource: rowLayout.currentItem === addDestinationButton ? routeEditor.currentProfileIcon : "qrc:///add.png"
- height: placemark === null ? 0 : QWindow.Screen.pixelDensity * 4 + Math.max(infoLayout.height, actionsLayout.height)
+ height: placemark === null ? 0 : Theme.paddingLarge * 2 + Math.max(infoLayout.height, actionsLayout.height)
function addToRoute() {
rowLayout.currentItem.execute()
itemStack.state = "routing"
}
- SystemPalette {
- id: palette
- colorGroup: SystemPalette.Active
- }
-
Rectangle {
anchors.fill: parent
- color: palette.base
+ color: "transparent"
}
Column {
@@ -46,9 +40,9 @@
top: parent.top
left: parent.left
right: actionsLayout.left
- margins: QWindow.Screen.pixelDensity * 2
+ margins: Theme.horizontalPageMargin
}
- height: nameLabel.height + (addressLabel.text == "" ? 0 : addressLabel.height)
+ height: nameLabel.height + (addressLabel.text === "" ? 0 : addressLabel.height)
Text {
id: nameLabel
@@ -57,7 +51,9 @@
wrapMode: Text.WordWrap
elide: Text.ElideRight
maximumLineCount: 2
- font.pointSize: 20
+ color: Theme.primaryColor
+ font.family: Theme.fontFamily
+ font.pixelSize: Theme.fontSizeMedium
}
Text {
@@ -67,24 +63,21 @@
wrapMode: Text.WordWrap
elide: Text.ElideRight
maximumLineCount: 4
- font.pointSize: 14
+ color: Theme.secondaryColor
+ font.family: Theme.fontFamily
+ font.pixelSize: Theme.fontSizeExtraSmall
}
}
Column {
id: actionsLayout
width: rowLayout.width
- height: spacer.height + rowLayout.height
- spacing: QWindow.Screen.pixelDensity * 2
+ height: rowLayout.height
+ spacing: Theme.paddingLarge
anchors {
right: parent.right
- rightMargin: QWindow.Screen.pixelDensity * 2
- }
-
- Item {
- id: spacer
- height: QWindow.Screen.pixelDensity * 5
- width: 1
+ rightMargin: Theme.horizontalPageMargin
+ bottom: parent.bottom
}
ComboBox {
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/RouteEditor.qml
^
|
@@ -11,7 +11,6 @@
import QtQuick 2.2
import QtQuick.Layouts 1.1
-import QtQuick.Window 2.0 as QWindow
import Sailfish.Silica 1.0
@@ -24,26 +23,21 @@
property alias currentProfileIcon: profileSelector.profileIcon
property alias currentIndex: waypointList.currentIndex
- height: visible ? QWindow.Screen.pixelDensity * 4 + column.height : 0
-
- SystemPalette{
- id: palette
- colorGroup: SystemPalette.Active
- }
+ height: visible ? Theme.paddingLarge + column.height : 0
Rectangle {
anchors.fill: parent
- color: palette.base
+ color: "transparent"
}
Column {
id: column
- spacing: QWindow.Screen.pixelDensity * 2
+ spacing: Theme.paddingMedium
anchors {
top: parent.top
left: parent.left
right: parent.right
- margins: QWindow.Screen.pixelDensity * 2
+ margins: Theme.paddingMedium
}
Item {
@@ -63,8 +57,10 @@
Text {
id: helpText
visible: waypointList.count < 2
- color: "gray"
+ color: Theme.secondaryColor
text: "Search for places to integrate them into a route."
+ font.family: Theme.fontFamily
+ font.pixelSize: Theme.fontSizeExtraSmall
}
SilicaListView {
@@ -74,14 +70,14 @@
right: parent.right
}
- height: Math.min(0.4 * QWindow.Screen.height, contentHeight)
clip: true
model: routing.routeRequestModel
delegate: Rectangle {
width: parent.width
- height: QWindow.Screen.pixelDensity * 2 + Math.max(text.height, image.height)
- color: touchArea.pressed || waypointList.currentIndex === index ? palette.highlight : palette.base
+ height: Theme.itemSizeExtraSmall
+ color: touchArea.pressed || waypointList.currentIndex === index ? Theme.rgba(Theme.highlightBackgroundColor, Theme.highlightBackgroundOpacity)
+ : "transparent"
WaypointImage {
id: image
@@ -98,13 +94,13 @@
anchors {
left: image.right
right: buttonsRow.left
- leftMargin: parent.width * 0.05
+ leftMargin: Theme.paddingSmall
verticalCenter: parent.verticalCenter
}
elide: Text.ElideMiddle
text: name
- font.pointSize: 18
- color: palette.text
+ font.pointSize: Theme.fontSizeMedium
+ color: Theme.primaryColor
}
MouseArea {
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/Search.qml
^
|
@@ -9,10 +9,13 @@
//
import QtQuick 2.2
-import QtQuick.Window 2.0
+
+import Sailfish.Silica 1.0
import org.kde.edu.marble 0.20
+import "." as Map
+
Item {
id: root
@@ -30,11 +33,6 @@
}
}
- SystemPalette{
- id: palette
- colorGroup: SystemPalette.Active
- }
-
SearchResults {
id: searchResults
anchors {
@@ -78,22 +76,19 @@
onSearchFinished: searchField.busy = false
}
- Rectangle {
-// SearchField {
+ Map.SearchField {
id: searchField
property string query : ""
property bool busy : false
- width: parent.width - 2 * anchors.margins <= Screen.pixelDensity * 70 ?
- parent.width - 2 * anchors.margins
- : Screen.pixelDensity * 50
+ width: Theme.buttonWidthLarge - 2 * anchors.margins
anchors {
top: parent.top
left: parent.left
- margins: Screen.pixelDensity * 3
+ margins: Theme.horizontalPageMargin
}
-// completionModel: backend.completionModel
-// onSearchRequested: backend.search(query)
-// onCompletionRequested: backend.setCompletionPrefix(query)
-// onCleared: searchResults.visible = false
+ completionModel: backend.completionModel
+ onSearchRequested: backend.search(query)
+ onCompletionRequested: backend.setCompletionPrefix(query)
+ onCleared: searchResults.visible = false
}
}
|
[-]
[+]
|
Changed |
marble-1.12.20_sfos_151119.tar.xz/src/apps/marble-maps-sailfishos/SearchField.qml
^
|
@@ -57,69 +57,57 @@
anchors.right: parent.right
placeholderText: qsTr("Search")
- font.pointSize: 18
- textColor: palette.text
+ labelVisible: false
+
+ font.pixelSize: Theme.fontSizeLarge
+ font.family: Theme.fontFamilyHeading
+ color: palette.text
+ placeholderColor: palette.mid // TODO: find correct color in palette
inputMethodHints: Qt.ImhNoPredictiveText
- onAccepted: root.search(text)
+
+ EnterKey.onClicked: root.search(text)
onTextChanged: root.completionRequested(text)
BusyIndicator {
id: searchBusyIndicator
anchors.verticalCenter: parent.verticalCenter
anchors.right: clearButton.visible ? clearButton.left : clearButton.right
- anchors.rightMargin: 10
- visible: running
+ anchors.rightMargin: Theme.paddingSmall
+ size: BusyIndicatorSize.ExtraSmall
height: 0.7 * field.height
width: height
- running: root.busy
-
- style: BusyIndicatorStyle {
- indicator: Image {
- visible: control.running
- source: "busy_indicator.png"
- RotationAnimator on rotation {
- running: control.running
- loops: Animation.Infinite
- duration: 1500
- from: 0 ; to: 360
- }
- }
- }
}
- FlatButton {
+ IconButton {
id: clearButton
anchors.verticalCenter: parent.verticalCenter
anchors.right: searchButton.visible ? searchButton.left : parent.right
- anchors.rightMargin: 10
+ anchors.rightMargin: Theme.paddingSmall
height: 0.7 * field.height
width: height
- visible: field.text !== ""
- imageSource: "qrc:///clear.png"
+ visible: field.text.length > 0
+ icon.source: "image://theme/icon-m-clear"
- MouseArea {
- anchors.fill: parent
- onClicked: {
- field.text = "";
- field.focus = true;
- placemarkDialog.placemark = null;
- itemStack.state = "";
- routing.clearSearchResultPlacemarks();
- cleared();
- }
+ onClicked: {
+ field.text = "";
+ field.focus = true;
+ placemarkDialog.placemark = null;
+ itemStack.state = "";
+ routing.clearSearchResultPlacemarks();
+ cleared();
}
}
- FlatButton {
+ IconButton {
id: searchButton
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
- anchors.rightMargin: 10
+ anchors.rightMargin: Theme.paddingSmall
height: 0.7 * field.height
width: height
visible: !root.busy
- enabled: field.text !== ""
- imageSource: "qrc:///search.png"
+ enabled: field.text.length > 0
+ icon.source: "image://theme/icon-m-search"
onClicked: root.search(field.text)
}
|