ui improvements first part.

This commit is contained in:
George Yatsev 2018-07-16 18:32:20 +03:00
parent 465d0755c2
commit 02f751eba5
7 changed files with 17 additions and 8 deletions

View File

@ -16,6 +16,7 @@ ApplicationWindow {
property int margins: 14 property int margins: 14
property int bigMargins: 20 property int bigMargins: 20
property int extraSmallFont: 10
property int smallFont: 13 property int smallFont: 13
property int mediumFont: 16 property int mediumFont: 16
property int largeFont: 20 property int largeFont: 20

View File

@ -113,7 +113,7 @@ ToolBar {
elide: Text.ElideRight elide: Text.ElideRight
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter verticalAlignment: Text.AlignVCenter
font.pixelSize: app.smallFont - 2 font.pixelSize: app.extraSmallFont
} }
} }
} }

View File

@ -19,7 +19,7 @@ Page {
header: GuhHeader { header: GuhHeader {
text: { text: {
if (subPage.shownInterfaces.length === 1) { if (subPage.shownInterfaces.length === 1) {
return qsTr("My %1 things").arg(interfaceToString(subPage.filterInterface)) return qsTr("My %1 things").arg(app.interfaceToString(subPage.shownInterfaces[0]))
} else if (subPage.shownInterfaces.length > 1 || subPage.hiddenInterfaces.length > 0) { } else if (subPage.shownInterfaces.length > 1 || subPage.hiddenInterfaces.length > 0) {
return qsTr("My things") return qsTr("My things")
} }

View File

@ -24,7 +24,7 @@ Item {
devices: Engine.deviceManager.devices devices: Engine.deviceManager.devices
} }
cellWidth: width / tilesPerRow cellWidth: width / tilesPerRow
cellHeight: Math.max(cellWidth, minTileHeight) cellHeight: cellWidth
delegate: DevicesPageDelegate { delegate: DevicesPageDelegate {
width: interfacesGridView.cellWidth width: interfacesGridView.cellWidth
height: interfacesGridView.cellHeight height: interfacesGridView.cellHeight

View File

@ -18,7 +18,7 @@ Item {
anchors.verticalCenterOffset: -app.iconSize anchors.verticalCenterOffset: -app.iconSize
spacing: app.margins spacing: app.margins
ColorIcon { ColorIcon {
height: app.iconSize * 2 height: app.iconSize * 1.3
width: height width: height
color: app.guhAccent color: app.guhAccent
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
@ -27,6 +27,9 @@ Item {
Label { Label {
text: interfaceToString(model.name).toUpperCase() text: interfaceToString(model.name).toUpperCase()
font.pixelSize: app.extraSmallFont
font.bold: true
font.letterSpacing: 1
width: parent.width width: parent.width
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WrapAtWordBoundaryOrAnywhere wrapMode: Text.WrapAtWordBoundaryOrAnywhere
@ -69,7 +72,6 @@ Item {
color: "black" color: "black"
opacity: .05 opacity: .05
} }
Loader { Loader {
id: inlineControlLoader id: inlineControlLoader
anchors { anchors {

View File

@ -128,7 +128,10 @@ Item {
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
text: delegateRoot.device.name text: delegateRoot.device.name.toUpperCase()
font.pixelSize: app.extraSmallFont
font.bold: true
font.letterSpacing: 1
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
} }

View File

@ -24,7 +24,7 @@ Item {
filterExecutable: true filterExecutable: true
} }
cellWidth: width / tilesPerRow cellWidth: width / tilesPerRow
cellHeight: Math.max(cellWidth, minTileHeight) cellHeight: cellWidth
delegate: Item { delegate: Item {
id: scenesDelegate id: scenesDelegate
width: interfacesGridView.cellWidth width: interfacesGridView.cellWidth
@ -67,7 +67,10 @@ Item {
Label { Label {
Layout.fillWidth: true Layout.fillWidth: true
text: model.name text: model.name.toUpperCase()
font.pixelSize: app.extraSmallFont
font.bold: true
font.letterSpacing: 1
wrapMode: Text.WordWrap wrapMode: Text.WordWrap
horizontalAlignment: Text.AlignHCenter horizontalAlignment: Text.AlignHCenter
maximumLineCount: 2 maximumLineCount: 2