Round placement sizes of TopBar.qml

I was having really ugly fonts here and I actually blamed
QML for that (while I still think it is it's fault), but we
where using pixel fractions. So every time we may hit a pixel
fraction, round that.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2016-01-26 14:55:23 -02:00 committed by Dirk Hohndel
parent 1773f5e447
commit 7a682770ef

View file

@ -14,7 +14,7 @@ Rectangle {
property bool goBack: (stackView.depth > 1) property bool goBack: (stackView.depth > 1)
color: subsurfaceTheme.accentColor color: subsurfaceTheme.accentColor
Layout.minimumHeight: MobileComponents.Units.gridUnit * 2.5 Layout.minimumHeight: Math.round(MobileComponents.Units.gridUnit * 2.5)
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: 0 Layout.margins: 0
RowLayout { RowLayout {
@ -32,7 +32,7 @@ Rectangle {
Image { Image {
id: mainMenuIcon id: mainMenuIcon
source: "qrc:/qml/main-menu.png" source: "qrc:/qml/main-menu.png"
width: MobileComponents.Units.gridUnit * 1.5 width: Math.round(MobileComponents.Units.gridUnit * 1.5)
height: width height: width
anchors { anchors {
top: parent.top top: parent.top
@ -60,17 +60,17 @@ Rectangle {
topMargin: MobileComponents.Units.smallSpacing * -1 topMargin: MobileComponents.Units.smallSpacing * -1
left: parent.left left: parent.left
} }
width: MobileComponents.Units.gridUnit * 1.7 width: Math.round(MobileComponents.Units.gridUnit * 1.7)
height: width height: width
} }
MobileComponents.Label { MobileComponents.Label {
text: qsTr("Subsurface-mobile") text: qsTr("Subsurface-mobile")
font.pointSize: MobileComponents.Theme.defaultFont.pointSize * 1.3 font.pointSize: Math.round(MobileComponents.Theme.defaultFont.pointSize * 1.3)
height: subsurfaceLogo.height * 2 height: subsurfaceLogo.height * 2
anchors { anchors {
left: subsurfaceLogo.right left: subsurfaceLogo.right
bottom: subsurfaceLogo.bottom bottom: subsurfaceLogo.bottom
leftMargin: MobileComponents.Units.gridUnit / 2 leftMargin: Math.round(MobileComponents.Units.gridUnit / 2)
} }
font.weight: Font.Light font.weight: Font.Light
verticalAlignment: Text.AlignBottom verticalAlignment: Text.AlignBottom
@ -91,7 +91,7 @@ Rectangle {
Image { Image {
id: contextMenuIcon id: contextMenuIcon
source: "qrc:/qml/context-menu.png" source: "qrc:/qml/context-menu.png"
width: MobileComponents.Units.gridUnit * 1.5 width: Math.round(MobileComponents.Units.gridUnit * 1.5)
height: width height: width
anchors { anchors {
top: parent.top top: parent.top