Commit 945900fc authored by eekkelund's avatar eekkelund

[Fix][Scaling] Change for correct Theme.sizes after controls scaling update....

[Fix][Scaling] Change for correct Theme.sizes after controls scaling update. Fixes to make homescreen more usable
parent 7ee89154
...@@ -55,7 +55,7 @@ GridView { ...@@ -55,7 +55,7 @@ GridView {
clip: true clip: true
onContentYChanged: { onContentYChanged: {
if( contentY < -140 ) { if( contentY < -Theme.itemHeightHuge*2 ) {
headerItem.visible = true; headerItem.visible = true;
timer.running = true; timer.running = true;
} }
......
...@@ -171,14 +171,14 @@ Item { ...@@ -171,14 +171,14 @@ Item {
} }
Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } } Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } }
z: 202 z: 202
height:Theme.itemHeightExtraLarge + 2 * toolBar.padding height:Theme.itemHeightLarge + 2 * toolBar.padding
Rectangle { Rectangle {
anchors.fill: parent anchors.fill: parent
color: Theme.fillDarkColor color: Theme.fillDarkColor
opacity: 0.3 opacity: 0.3
border { border {
width: 1 width: size.ratio(1)
color: Theme.backgroundColor color: Theme.backgroundColor
} }
} }
...@@ -204,20 +204,6 @@ Item { ...@@ -204,20 +204,6 @@ Item {
switcherRoot.closeMode = false; switcherRoot.closeMode = false;
} }
text: qsTr("Done") text: qsTr("Done")
//Untill fontSizes are fixed
style: ButtonStyle {
label: Text {
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: control.text
color: Theme.textColor
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeMedium
font.weight: control.primary ? Theme.fontWeightLarge : Theme.fontWeightMedium
opacity: control.enabled ? 1.0 : 0.3
}
}
} }
Button { Button {
...@@ -234,20 +220,7 @@ Item { ...@@ -234,20 +220,7 @@ Item {
} }
} }
text: qsTr("Close All") text: qsTr("Close All")
//Untill fontSizes are fixed primary: true
style: ButtonStyle {
label: Text {
renderType: Text.NativeRendering
verticalAlignment: Text.AlignVCenter
horizontalAlignment: Text.AlignHCenter
text: control.text
color: Theme.textColor
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeMedium
font.weight: control.primary ? Theme.fontWeightLarge : Theme.fontWeightMedium
opacity: control.enabled ? 1.0 : 0.3
}
}
} }
} }
} }
......
...@@ -94,7 +94,7 @@ Flickable { ...@@ -94,7 +94,7 @@ Flickable {
top: daterow.bottom top: daterow.bottom
topMargin: Theme.itemHeightLarge*1.5 topMargin: Theme.itemHeightLarge*1.5
} }
spacing: Theme.itemSpacingMedium spacing: Theme.itemSpacingExtraSmall
Repeater { Repeater {
model: NotificationListModel { model: NotificationListModel {
id: notifmodel id: notifmodel
......
...@@ -89,8 +89,8 @@ Item { ...@@ -89,8 +89,8 @@ Item {
Spinner { Spinner {
id: spinnerr id: spinnerr
anchors.centerIn: iconImage anchors.centerIn: iconImage
width: iconWrapper.width width: height
height: width height: parent.height - Theme.itemSpacingHuge
enabled: (modelData.object.type === LauncherModel.Application) ? modelData.object.isLaunching ? switcher.switchModel.getWindowIdForTitle(modelData.object.title) == 0 : false : false enabled: (modelData.object.type === LauncherModel.Application) ? modelData.object.isLaunching ? switcher.switchModel.getWindowIdForTitle(modelData.object.title) == 0 : false : false
Connections { Connections {
......
...@@ -88,6 +88,7 @@ Image { ...@@ -88,6 +88,7 @@ Image {
} }
clip:true clip:true
delegate: NotificationItem { delegate: NotificationItem {
height: Theme.itemHeightLarge
enabled:DeviceLock.state !== DeviceLock.Locked enabled:DeviceLock.state !== DeviceLock.Locked
scale: notificationColumn.opacity scale: notificationColumn.opacity
transformOrigin: Item.Left transformOrigin: Item.Left
......
...@@ -288,11 +288,9 @@ Item { ...@@ -288,11 +288,9 @@ Item {
id: spinner id: spinner
anchors { anchors {
centerIn: iconImage centerIn: iconImage
top: iconImage.top
topMargin: Theme.itemSpacingExtraSmall
} }
width: iconImage.width width: height
height: width height: parent.height - Theme.itemSpacingHuge
enabled: { enabled: {
if(searchLauncherModel.get(model.id).type === LauncherModel.Application) { if(searchLauncherModel.get(model.id).type === LauncherModel.Application) {
if(searchLauncherModel.get(model.id).isLaunching) if(searchLauncherModel.get(model.id).isLaunching)
......
...@@ -42,7 +42,7 @@ import "statusbar" ...@@ -42,7 +42,7 @@ import "statusbar"
Item { Item {
id: root id: root
z: 201 z: 201
height: Theme.itemHeightLarge height: Theme.itemHeightMedium
width: parent.width width: parent.width
anchors.bottom: parent.bottom anchors.bottom: parent.bottom
enabled: !lockscreenVisible() enabled: !lockscreenVisible()
...@@ -54,6 +54,7 @@ Item { ...@@ -54,6 +54,7 @@ Item {
opacity: 0.5 opacity: 0.5
z: 200 z: 200
} }
MouseArea { MouseArea {
property int oldX property int oldX
property int oldY property int oldY
...@@ -194,10 +195,10 @@ Item { ...@@ -194,10 +195,10 @@ Item {
RowLayout { RowLayout {
id:row id:row
anchors.fill: statusbar anchors.fill: statusbar
spacing: root.height/4 spacing: Theme.itemSpacingSmall
property var currentChild property var currentChild
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1" source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
MouseArea{ MouseArea{
...@@ -213,34 +214,44 @@ Item { ...@@ -213,34 +214,44 @@ Item {
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: root.height
Item {
anchors.centerIn: parent
width: parent.width
height: tech.font.pixelSize*2
Label { Label {
id: tech id: tech
width: root.height/4 horizontalAlignment: Text.AlignHCenter
height: root.height/4 verticalAlignment:Text.AlignBottom
font.pixelSize: root.height/4+root.height/5 width: parent.width
font.bold: true height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone elide:Text.ElideNone
maximumLineCount: 1
clip:true
text: (cellularNetworkName.value !== "") ? cellularNetworkName.value.substring(0,3).toUpperCase() : "NA" text: (cellularNetworkName.value !== "") ? cellularNetworkName.value.substring(0,3).toUpperCase() : "NA"
} }
Label { Label {
anchors.top: tech.bottom y: -contentHeight + font.pixelSize*2 + tech.y
anchors.topMargin: root.height/8 horizontalAlignment: Text.AlignHCenter
width: root.height/4 width: parent.width
height: root/height/4 height: paintedHeight
font.pixelSize: root.height/4+root.height/5 font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone elide:Text.ElideNone
maximumLineCount: 1
text: { text: {
var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"} var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"}
return techToG[cellularDataTechnology.value ? cellularDataTechnology.value : "unknown"] + "G" return techToG[cellularDataTechnology.value ? cellularDataTechnology.value : "unknown"] + "G"
} }
} }
}
panel: SimPanel {} panel: SimPanel {}
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 id:wifiStatus
iconSize: Theme.itemHeightExtraSmall
source: { source: {
if (wlan.connected) { if (wlan.connected) {
if (networkManager.defaultRoute.type !== "wifi") if (networkManager.defaultRoute.type !== "wifi")
...@@ -266,44 +277,52 @@ Item { ...@@ -266,44 +277,52 @@ Item {
} }
StatusbarItem { StatusbarItem {
id: bluetootIndicator id: bluetootIndicator
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
source: (bluetoothConnected.value) ? "image://theme/icon_bt_focused" : "image://theme/icon_bt_normal" source: (bluetoothConnected.value) ? "image://theme/icon_bt_focused" : "image://theme/icon_bt_normal"
visible: bluetoothEnabled.value visible: bluetoothEnabled.value
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_nfc_normal" source: "image://theme/icon_nfc_normal"
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_gps_normal" source: "image://theme/icon_gps_normal"
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_play_pause" source: "image://theme/icon_play_pause"
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: root.height
anchors.verticalCenter: parent.verticalCenter Item {
anchors.centerIn: parent
width: parent.width
height: hours.font.pixelSize*2
Label { Label {
id: hours id: hours
width: root.height/4 horizontalAlignment: Text.AlignHCenter
height: root.height/4 verticalAlignment:Text.AlignBottom
font.pixelSize: root.height/4+root.height/5 width: parent.width
height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone elide:Text.ElideNone
maximumLineCount: 1
text: Qt.formatDateTime(wallClock.time, "hh") text: Qt.formatDateTime(wallClock.time, "hh")
} }
Label { Label {
id: minutes id: minutes
anchors.top: hours.bottom y: -contentHeight + font.pixelSize*2 + hours.y
anchors.topMargin: root.height/8 horizontalAlignment: Text.AlignHCenter
width: root.height/4 width: parent.width
height: root.height/4 height: paintedHeight
font.pixelSize: root.height/4+root.height/5 font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone elide:Text.ElideNone
maximumLineCount: 1
text: Qt.formatDateTime(wallClock.time, "mm") text: Qt.formatDateTime(wallClock.time, "mm")
} }
} }
}
BatteryIndicator{ BatteryIndicator{
id:batteryIndicator id:batteryIndicator
......
...@@ -5,7 +5,7 @@ import QtQuick.Controls.Styles.Nemo 1.0 ...@@ -5,7 +5,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
MouseArea { MouseArea {
id: notifyArea id: notifyArea
height: Theme.itemHeightExtraLarge*1.2 height: Theme.itemHeightExtraLarge
width: parent.width width: parent.width
property alias appIcon: appIcon property alias appIcon: appIcon
...@@ -137,12 +137,17 @@ MouseArea { ...@@ -137,12 +137,17 @@ MouseArea {
} }
source: { source: {
if (modelData.icon) if (modelData.icon) {
if(modelData.icon.indexOf("/") == 0)
return "file://" + modelData.icon
else
return "image://theme/" + modelData.icon return "image://theme/" + modelData.icon
else if (modelData.appIcon) { } else if (modelData.appIcon) {
if(modelData.appIcon.indexOf("/") == 0)
return "file://" + modelData.appIcon
else
return "image://theme/" + modelData.appIcon return "image://theme/" + modelData.appIcon
} else } else return defaultIcon
return defaultIcon
} }
onStatusChanged: { onStatusChanged: {
if (appIcon.status == Image.Error) { if (appIcon.status == Image.Error) {
...@@ -193,7 +198,6 @@ MouseArea { ...@@ -193,7 +198,6 @@ MouseArea {
font.pixelSize: Theme.fontSizeTiny font.pixelSize: Theme.fontSizeTiny
anchors{ anchors{
left: parent.left left: parent.left
// topMargin: Theme.itemSpacingSmall
} }
maximumLineCount: 1 maximumLineCount: 1
elide: Text.ElideRight elide: Text.ElideRight
......
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
// Copyright (C) 2012 Jolla Ltd. // Copyright (C) 2012 Jolla Ltd.
// Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com> // Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com>
import QtQuick 2.0 import QtQuick 2.6
import org.nemomobile.lipstick 0.1 import org.nemomobile.lipstick 0.1
import QtQuick.Controls.Nemo 1.0 import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
...@@ -43,7 +43,7 @@ Item { ...@@ -43,7 +43,7 @@ Item {
MouseArea { MouseArea {
id: notificationArea id: notificationArea
property int notificationHeight: Theme.itemHeightExtraLarge property int notificationHeight: Theme.itemHeightLarge
property int notificationMargin: Theme.itemSpacingExtraSmall property int notificationMargin: Theme.itemSpacingExtraSmall
property int notificationIconSize: Theme.itemHeightMedium property int notificationIconSize: Theme.itemHeightMedium
anchors.top: parent.top anchors.top: parent.top
...@@ -132,12 +132,17 @@ Item { ...@@ -132,12 +132,17 @@ Item {
width: notificationArea.notificationIconSize width: notificationArea.notificationIconSize
height: width height: width
source: { source: {
if (notificationPreviewPresenter.notification.icon) if (notificationPreviewPresenter.notification.icon) {
if (notificationPreviewPresenter.notification.icon.indexOf("/") == 0)
return "file://" + notificationPreviewPresenter.notification.icon
else
return "image://theme/" + notificationPreviewPresenter.notification.icon return "image://theme/" + notificationPreviewPresenter.notification.icon
else if (notificationPreviewPresenter.notification.appIcon) { }else if (notificationPreviewPresenter.notification.appIcon) {
if (notificationPreviewPresenter.notification.appIcon.indexOf("/") == 0)
return "file://" + notificationPreviewPresenter.notification.appIcon
else
return "image://theme/" + notificationPreviewPresenter.notification.appIcon return "image://theme/" + notificationPreviewPresenter.notification.appIcon
} else } else return defaultIcon
return defaultIcon
} }
onStatusChanged: { onStatusChanged: {
if (icon.status == Image.Error) { if (icon.status == Image.Error) {
...@@ -156,7 +161,6 @@ Item { ...@@ -156,7 +161,6 @@ Item {
topMargin: notificationArea.notificationMargin topMargin: notificationArea.notificationMargin
leftMargin: notificationArea.notificationMargin*2 leftMargin: notificationArea.notificationMargin*2
rightMargin: notificationArea.notificationMargin rightMargin: notificationArea.notificationMargin
//bottomMargin: notificationArea.notificationMargin
} }
height: if(!text) 0 height: if(!text) 0
font.pixelSize: Theme.fontSizeTiny font.pixelSize: Theme.fontSizeTiny
......
...@@ -38,9 +38,9 @@ StatusbarItem { ...@@ -38,9 +38,9 @@ StatusbarItem {
} }
} }
iconSize: root.height/2 iconSize: Theme.itemHeightExtraSmall
panel: BatteryPanel {} panel: BatteryPanel {}
source: "/usr/share/lipstick-glacier-home-qt5/qml/images/battery"+chargeValue+".png" source: "/usr/share/lipstick-glacier-home-qt5/qml/images/battery"+chargeValue+".png" //+ (chargeValue === 0 ? "?red" : "")
Timer{ Timer{
id: chargingTimer id: chargingTimer
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
** **
****************************************************************************************/ ****************************************************************************************/
import QtQuick 2.0 import QtQuick 2.6
import QtQuick.Controls 1.0 import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0 import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0 import QtQuick.Controls.Styles.Nemo 1.0
...@@ -46,6 +46,7 @@ Rectangle { ...@@ -46,6 +46,7 @@ Rectangle {
onClick: { onClick: {
panel_loader.sourceComponent = parent.panel panel_loader.sourceComponent = parent.panel
panel_loader.visible = !panel_loader.visible panel_loader.visible = !panel_loader.visible
row.currentChild._reopenTimer.start()
row.currentChild=null row.currentChild=null
} }
...@@ -59,20 +60,16 @@ Rectangle { ...@@ -59,20 +60,16 @@ Rectangle {
opacity: 0.3 opacity: 0.3
} }
InverseMouseArea { InverseMouseArea {
anchors.fill: parent anchors.fill: parent
enabled: parent.visible enabled: parent.visible
parent:commonPanel
onPressed: { onPressed: {
parent.click() parent.click()
} }
} }
MouseArea {
id:mouseArea
anchors.fill:parent
onClicked: parent.click()
}
clip: true clip: true
default property alias contentItem: dataColumn.children default property alias contentItem: dataColumn.children
...@@ -94,7 +91,6 @@ Rectangle { ...@@ -94,7 +91,6 @@ Rectangle {
} }
wrapMode: Text.Wrap wrapMode: Text.Wrap
font.pixelSize: Theme.fontSizeMedium font.pixelSize: Theme.fontSizeMedium
font.bold: true
color: Theme.textColor color: Theme.textColor
} }
...@@ -119,7 +115,7 @@ Rectangle { ...@@ -119,7 +115,7 @@ Rectangle {
topMargin: Theme.itemSpacingMedium topMargin: Theme.itemSpacingMedium
} }
} }
//Just placeholder until IconButton will get merged
Image { Image {
id:settingsIcon id:settingsIcon
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
......
import QtQuick 2.0 import QtQuick 2.6
import QtQuick.Layouts 1.0 import QtQuick.Layouts 1.0
Item { Item {
property alias source: icon.source property alias source: icon.source
property alias pressed: mouse.pressed property alias pressed: mouse.pressed
property alias _reopenTimer: reopenTimer
property string panel_source property string panel_source
property Component panel property Component panel
property double iconSize property double iconSize
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
function clicked() { function clicked() {
if(reopenTimer.running){
panel_loader.visible = false
row.currentChild = null
} else {
if (panel_source !== "" && !panel) { if (panel_source !== "" && !panel) {
panel_loader.source = panel_source panel_loader.source = panel_source
panel_loader.visible = !panel_loader.visible panel_loader.visible = !panel_loader.visible
...@@ -19,6 +24,7 @@ Item { ...@@ -19,6 +24,7 @@ Item {
panel_loader.visible = !panel_loader.visible panel_loader.visible = !panel_loader.visible
} }
} }
}
Rectangle{ Rectangle{
anchors.fill:parent anchors.fill:parent
...@@ -30,6 +36,7 @@ Item { ...@@ -30,6 +36,7 @@ Item {
Image { Image {
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
height: iconSize height: iconSize
width: iconSize
id: icon id: icon
anchors.centerIn: parent anchors.centerIn: parent
} }
...@@ -41,5 +48,10 @@ Item { ...@@ -41,5 +48,10 @@ Item {
enabled: !lockscreenVisible() enabled: !lockscreenVisible()
onClicked: parent.clicked() onClicked: parent.clicked()
} }
Timer {
id: reopenTimer
interval: 300
running: false
}
} }
...@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2 ...@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
Component { Component {
CommonPanel { CommonPanel {
id: wifiPanel id: wifiPanel
name: "Wifi" name: qsTr("Wifi")
switcherEnabled: true switcherEnabled: true
switcherChecked: wifimodel.powered switcherChecked: wifimodel.powered
...@@ -53,9 +53,12 @@ Component { ...@@ -53,9 +53,12 @@ Component {
} }
] ]
Repeater { ListView {
anchors.top: parent.top anchors.top: parent.top
model: wifimodel model: wifimodel
width: parent.width
height: wifiPanel.height
clip: true
delegate: Item { delegate: Item {
width: wifiPanel.width width: wifiPanel.width
height: Theme.itemHeightSmall height: Theme.itemHeightSmall
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment