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 bigMargins: 20
property int extraSmallFont: 10
property int smallFont: 13
property int mediumFont: 16
property int largeFont: 20

View File

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

View File

@ -19,7 +19,7 @@ Page {
header: GuhHeader {
text: {
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) {
return qsTr("My things")
}

View File

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

View File

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

View File

@ -128,7 +128,10 @@ Item {
Label {
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
horizontalAlignment: Text.AlignHCenter
}

View File

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