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 {
clip: true
onContentYChanged: {
if( contentY < -140 ) {
if( contentY < -Theme.itemHeightHuge*2 ) {
headerItem.visible = true;
timer.running = true;
}
......
......@@ -171,14 +171,14 @@ Item {
}
Behavior on anchors.bottomMargin { PropertyAnimation { duration: 100 } }
z: 202
height:Theme.itemHeightExtraLarge + 2 * toolBar.padding
height:Theme.itemHeightLarge + 2 * toolBar.padding
Rectangle {
anchors.fill: parent
color: Theme.fillDarkColor
opacity: 0.3
border {
width: 1
width: size.ratio(1)
color: Theme.backgroundColor
}
}
......@@ -204,20 +204,6 @@ Item {
switcherRoot.closeMode = false;
}
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 {
......@@ -234,20 +220,7 @@ Item {
}
}
text: qsTr("Close All")
//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
}
}
primary: true
}
}
}
......
......@@ -94,7 +94,7 @@ Flickable {
top: daterow.bottom
topMargin: Theme.itemHeightLarge*1.5
}
spacing: Theme.itemSpacingMedium
spacing: Theme.itemSpacingExtraSmall
Repeater {
model: NotificationListModel {
id: notifmodel
......
......@@ -89,8 +89,8 @@ Item {
Spinner {
id: spinnerr
anchors.centerIn: iconImage
width: iconWrapper.width
height: width
width: height
height: parent.height - Theme.itemSpacingHuge
enabled: (modelData.object.type === LauncherModel.Application) ? modelData.object.isLaunching ? switcher.switchModel.getWindowIdForTitle(modelData.object.title) == 0 : false : false
Connections {
......
......@@ -88,6 +88,7 @@ Image {
}
clip:true
delegate: NotificationItem {
height: Theme.itemHeightLarge
enabled:DeviceLock.state !== DeviceLock.Locked
scale: notificationColumn.opacity
transformOrigin: Item.Left
......
......@@ -288,11 +288,9 @@ Item {
id: spinner
anchors {
centerIn: iconImage
top: iconImage.top
topMargin: Theme.itemSpacingExtraSmall
}
width: iconImage.width
height: width
width: height
height: parent.height - Theme.itemSpacingHuge
enabled: {
if(searchLauncherModel.get(model.id).type === LauncherModel.Application) {
if(searchLauncherModel.get(model.id).isLaunching)
......
......@@ -42,7 +42,7 @@ import "statusbar"
Item {
id: root
z: 201
height: Theme.itemHeightLarge
height: Theme.itemHeightMedium
width: parent.width
anchors.bottom: parent.bottom
enabled: !lockscreenVisible()
......@@ -54,6 +54,7 @@ Item {
opacity: 0.5
z: 200
}
MouseArea {
property int oldX
property int oldY
......@@ -194,10 +195,10 @@ Item {
RowLayout {
id:row
anchors.fill: statusbar
spacing: root.height/4
spacing: Theme.itemSpacingSmall
property var currentChild
StatusbarItem {
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
source: (cellularSignalBars.value > 0) ? "image://theme/icon_cell" + cellularSignalBars.value : "image://theme/icon_cell1"
MouseArea{
......@@ -213,34 +214,44 @@ Item {
}
StatusbarItem {
iconSize: root.height/2
iconSize: root.height
Item {
anchors.centerIn: parent
width: parent.width
height: tech.font.pixelSize*2
Label {
id: tech
width: root.height/4
height: root.height/4
font.pixelSize: root.height/4+root.height/5
font.bold: true
horizontalAlignment: Text.AlignHCenter
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 {
anchors.top: tech.bottom
anchors.topMargin: root.height/8
width: root.height/4
height: root/height/4
font.pixelSize: root.height/4+root.height/5
y: -contentHeight + font.pixelSize*2 + tech.y
horizontalAlignment: Text.AlignHCenter
width: parent.width
height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone
maximumLineCount: 1
text: {
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 {}
}
StatusbarItem {
iconSize: root.height/2
id:wifiStatus
iconSize: Theme.itemHeightExtraSmall
source: {
if (wlan.connected) {
if (networkManager.defaultRoute.type !== "wifi")
......@@ -266,44 +277,52 @@ Item {
}
StatusbarItem {
id: bluetootIndicator
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
source: (bluetoothConnected.value) ? "image://theme/icon_bt_focused" : "image://theme/icon_bt_normal"
visible: bluetoothEnabled.value
}
StatusbarItem {
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_nfc_normal"
}
StatusbarItem {
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_gps_normal"
}
StatusbarItem {
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
source: "image://theme/icon_play_pause"
}
StatusbarItem {
iconSize: root.height/2
anchors.verticalCenter: parent.verticalCenter
iconSize: root.height
Item {
anchors.centerIn: parent
width: parent.width
height: hours.font.pixelSize*2
Label {
id: hours
width: root.height/4
height: root.height/4
font.pixelSize: root.height/4+root.height/5
horizontalAlignment: Text.AlignHCenter
verticalAlignment:Text.AlignBottom
width: parent.width
height: paintedHeight
font.pixelSize: Theme.fontSizeSmall
elide:Text.ElideNone
maximumLineCount: 1
text: Qt.formatDateTime(wallClock.time, "hh")
}
Label {
id: minutes
anchors.top: hours.bottom
anchors.topMargin: root.height/8
width: root.height/4
height: root.height/4
font.pixelSize: root.height/4+root.height/5
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")
}
}
}
BatteryIndicator{
id:batteryIndicator
......
......@@ -5,7 +5,7 @@ import QtQuick.Controls.Styles.Nemo 1.0
MouseArea {
id: notifyArea
height: Theme.itemHeightExtraLarge*1.2
height: Theme.itemHeightExtraLarge
width: parent.width
property alias appIcon: appIcon
......@@ -137,12 +137,17 @@ MouseArea {
}
source: {
if (modelData.icon)
if (modelData.icon) {
if(modelData.icon.indexOf("/") == 0)
return "file://" + modelData.icon
else
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
} else
return defaultIcon
} else return defaultIcon
}
onStatusChanged: {
if (appIcon.status == Image.Error) {
......@@ -193,7 +198,6 @@ MouseArea {
font.pixelSize: Theme.fontSizeTiny
anchors{
left: parent.left
// topMargin: Theme.itemSpacingSmall
}
maximumLineCount: 1
elide: Text.ElideRight
......
......@@ -22,7 +22,7 @@
// Copyright (C) 2012 Jolla Ltd.
// Contact: Vesa Halttunen <vesa.halttunen@jollamobile.com>
import QtQuick 2.0
import QtQuick 2.6
import org.nemomobile.lipstick 0.1
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -43,7 +43,7 @@ Item {
MouseArea {
id: notificationArea
property int notificationHeight: Theme.itemHeightExtraLarge
property int notificationHeight: Theme.itemHeightLarge
property int notificationMargin: Theme.itemSpacingExtraSmall
property int notificationIconSize: Theme.itemHeightMedium
anchors.top: parent.top
......@@ -132,12 +132,17 @@ Item {
width: notificationArea.notificationIconSize
height: width
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
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
} else
return defaultIcon
} else return defaultIcon
}
onStatusChanged: {
if (icon.status == Image.Error) {
......@@ -156,7 +161,6 @@ Item {
topMargin: notificationArea.notificationMargin
leftMargin: notificationArea.notificationMargin*2
rightMargin: notificationArea.notificationMargin
//bottomMargin: notificationArea.notificationMargin
}
height: if(!text) 0
font.pixelSize: Theme.fontSizeTiny
......
......@@ -38,9 +38,9 @@ StatusbarItem {
}
}
iconSize: root.height/2
iconSize: Theme.itemHeightExtraSmall
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{
id: chargingTimer
......
......@@ -30,7 +30,7 @@
**
****************************************************************************************/
import QtQuick 2.0
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
......@@ -46,6 +46,7 @@ Rectangle {
onClick: {
panel_loader.sourceComponent = parent.panel
panel_loader.visible = !panel_loader.visible
row.currentChild._reopenTimer.start()
row.currentChild=null
}
......@@ -59,20 +60,16 @@ Rectangle {
opacity: 0.3
}
InverseMouseArea {
anchors.fill: parent
enabled: parent.visible
parent:commonPanel
onPressed: {
parent.click()
}
}
MouseArea {
id:mouseArea
anchors.fill:parent
onClicked: parent.click()
}
clip: true
default property alias contentItem: dataColumn.children
......@@ -94,7 +91,6 @@ Rectangle {
}
wrapMode: Text.Wrap
font.pixelSize: Theme.fontSizeMedium
font.bold: true
color: Theme.textColor
}
......@@ -119,7 +115,7 @@ Rectangle {
topMargin: Theme.itemSpacingMedium
}
}
//Just placeholder until IconButton will get merged
Image {
id:settingsIcon
fillMode: Image.PreserveAspectFit
......
import QtQuick 2.0
import QtQuick 2.6
import QtQuick.Layouts 1.0
Item {
property alias source: icon.source
property alias pressed: mouse.pressed
property alias _reopenTimer: reopenTimer
property string panel_source
property Component panel
property double iconSize
Layout.fillWidth: true
Layout.fillHeight: true
function clicked() {
if(reopenTimer.running){
panel_loader.visible = false
row.currentChild = null
} else {
if (panel_source !== "" && !panel) {
panel_loader.source = panel_source
panel_loader.visible = !panel_loader.visible
......@@ -19,6 +24,7 @@ Item {
panel_loader.visible = !panel_loader.visible
}
}
}
Rectangle{
anchors.fill:parent
......@@ -30,6 +36,7 @@ Item {
Image {
fillMode: Image.PreserveAspectFit
height: iconSize
width: iconSize
id: icon
anchors.centerIn: parent
}
......@@ -41,5 +48,10 @@ Item {
enabled: !lockscreenVisible()
onClicked: parent.clicked()
}
Timer {
id: reopenTimer
interval: 300
running: false
}
}
......@@ -38,7 +38,7 @@ import MeeGo.Connman 0.2
Component {
CommonPanel {
id: wifiPanel
name: "Wifi"
name: qsTr("Wifi")
switcherEnabled: true
switcherChecked: wifimodel.powered
......@@ -53,9 +53,12 @@ Component {
}
]
Repeater {
ListView {
anchors.top: parent.top
model: wifimodel
width: parent.width
height: wifiPanel.height
clip: true
delegate: Item {
width: wifiPanel.width
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