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
...@@ -65,7 +66,7 @@ Item { ...@@ -65,7 +66,7 @@ Item {
row.currentChild = row.childAt(mouseX, mouseY) row.currentChild = row.childAt(mouseX, mouseY)
row.currentChild.clicked() row.currentChild.clicked()
}else { }else {
row.currentChild = null row.currentChild = null
} }
} }
...@@ -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
Label { Item {
id: tech anchors.centerIn: parent
width: root.height/4 width: parent.width
height: root.height/4 height: tech.font.pixelSize*2
font.pixelSize: root.height/4+root.height/5 Label {
font.bold: true id: tech
elide:Text.ElideNone horizontalAlignment: Text.AlignHCenter
text: (cellularNetworkName.value !== "") ? cellularNetworkName.value.substring(0,3).toUpperCase() : "NA" verticalAlignment:Text.AlignBottom
} width: parent.width
height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone
maximumLineCount: 1
clip:true
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
text: { maximumLineCount: 1
var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"} text: {
return techToG[cellularDataTechnology.value ? cellularDataTechnology.value : "unknown"] + "G" var techToG = {gprs: "2", egprs: "2.5", umts: "3", hspa: "3.5", lte: "4", unknown: "0"}
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,42 +277,50 @@ Item { ...@@ -266,42 +277,50 @@ 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 {
Label { anchors.centerIn: parent
id: hours width: parent.width
width: root.height/4 height: hours.font.pixelSize*2
height: root.height/4 Label {
font.pixelSize: root.height/4+root.height/5 id: hours
elide:Text.ElideNone horizontalAlignment: Text.AlignHCenter
text: Qt.formatDateTime(wallClock.time, "hh") verticalAlignment:Text.AlignBottom
} width: parent.width
Label { height: paintedHeight
id: minutes font.pixelSize: Theme.fontSizeSmall
anchors.top: hours.bottom elide:Text.ElideNone
anchors.topMargin: root.height/8 maximumLineCount: 1
width: root.height/4 text: Qt.formatDateTime(wallClock.time, "hh")
height: root.height/4 }
font.pixelSize: root.height/4+root.height/5 Label {
elide:Text.ElideNone id: minutes
text: Qt.formatDateTime(wallClock.time, "mm") y: -contentHeight + font.pixelSize*2 + hours.y
horizontalAlignment: Text.AlignHCenter
width: parent.width
height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone
maximumLineCount: 1
text: Qt.formatDateTime(wallClock.time, "mm")
}
} }
} }
......
...@@ -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) {
return "image://theme/" + modelData.icon if(modelData.icon.indexOf("/") == 0)
else if (modelData.appIcon) { return "file://" + modelData.icon
return "image://theme/" + modelData.appIcon else
} else return "image://theme/" + modelData.icon
return defaultIcon } else if (modelData.appIcon) {
if(modelData.appIcon.indexOf("/") == 0)
return "file://" + modelData.appIcon
else
return "image://theme/" + modelData.appIcon
} else 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) {
return "image://theme/" + notificationPreviewPresenter.notification.icon if (notificationPreviewPresenter.notification.icon.indexOf("/") == 0)
else if (notificationPreviewPresenter.notification.appIcon) { return "file://" + notificationPreviewPresenter.notification.icon
return "image://theme/" + notificationPreviewPresenter.notification.appIcon else
} else return "image://theme/" + notificationPreviewPresenter.notification.icon
return defaultIcon }else if (notificationPreviewPresenter.notification.appIcon) {
if (notificationPreviewPresenter.notification.appIcon.indexOf("/") == 0)
return "file://" + notificationPreviewPresenter.notification.appIcon
else
return "image://theme/" + notificationPreviewPresenter.notification.appIcon
} else 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 (panel_source !== "" && !panel) { if(reopenTimer.running){
panel_loader.source = panel_source panel_loader.visible = false
panel_loader.visible = !panel_loader.visible row.currentChild = null
} } else {
if (panel && panel_source === "") { if (panel_source !== "" && !panel) {
panel_loader.sourceComponent = panel panel_loader.source = panel_source
panel_loader.visible = !panel_loader.visible panel_loader.visible = !panel_loader.visible
}
if (panel && panel_source === "") {
panel_loader.sourceComponent = panel
panel_loader.visible = !panel_loader.visible
}
} }
} }
...@@ -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,12 +38,12 @@ import MeeGo.Connman 0.2 ...@@ -38,12 +38,12 @@ 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
onSwitcherCheckedChanged: { onSwitcherCheckedChanged: {
wifimodel.setPowered(switcherChecked) wifimodel.setPowered(switcherChecked)
} }
property list<QtObject> _data: [ property list<QtObject> _data: [
...@@ -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
...@@ -76,7 +79,7 @@ Component { ...@@ -76,7 +79,7 @@ Component {
spacing: Theme.itemSpacingSmall spacing: Theme.itemSpacingSmall
Image { Image {
id: statusImage id: statusImage
source: (getStrengthIndex(modelData.strength) === "0")? "image://theme/icon_wifi_0" : (modelData.state === "online" ? "image://theme/icon_wifi_focused" : "image://theme/icon_wifi_normal")+ getStrengthIndex(modelData.strength) source: (getStrengthIndex(modelData.strength) === "0")? "image://theme/icon_wifi_0" : (modelData.state === "online" ? "image://theme/icon_wifi_focused" : "image://theme/icon_wifi_normal")+ getStrengthIndex(modelData.strength)
} }
Label { Label {
......
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