1
0
Fork 0

Launcher: explicit sizes in aircraft list

Fix some scaling issues when mixing pixel- and point- sized fonts,
especially on Windows
This commit is contained in:
James Turner 2018-03-02 21:09:10 +00:00
parent 7f815c4c51
commit 5020e4655e
9 changed files with 17 additions and 3 deletions

View file

@ -95,6 +95,7 @@ Item {
width: parent.width
text: root.__showAlternateText ? root.alternateText()
: model.description
font.pixelSize: Style.baseFontPixelSize
maximumLineCount: 3
wrapMode: Text.WordWrap
elide: Text.ElideRight

View file

@ -100,7 +100,7 @@ Rectangle {
width: parent.width
wrapMode: Text.WordWrap
visible: aircraft.description != ""
font.pixelSize: 14
font.pixelSize: Style.baseFontPixelSize
}
Text {
@ -110,7 +110,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
wrapMode: Text.WordWrap
visible: (aircraft.authors != undefined)
font.pixelSize: Style.baseFontPixelSize
}
}
@ -146,6 +146,7 @@ Rectangle {
Text {
id: ratingsLabel
text: qsTr("Ratings:")
font.pixelSize: Style.baseFontPixelSize
}
@ -192,6 +193,7 @@ Rectangle {
width: parent.width
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
visible: aircraft.pathOnDisk != undefined
font.pixelSize: Style.baseFontPixelSize
}
} // main layout column

View file

@ -1,5 +1,6 @@
import QtQuick 2.0
import FlightGear.Launcher 1.0
import "." // -> forces the qmldir to be loaded
Item {
id: root
@ -143,6 +144,7 @@ Item {
anchors.leftMargin: 6
anchors.verticalCenter: button.verticalCenter
text: "Size: " + (root.packageSize / 0x100000).toFixed(1) + "MB"
font.pixelSize: Style.baseFontPixelSize
}
Column {
@ -185,6 +187,7 @@ Item {
visible: false
text: (compact ? "" : "Downloaded ") + (root.downloadedBytes / 0x100000).toFixed(1) +
"MB of " + (root.packageSize / 0x100000).toFixed(1) + "MB";
font.pixelSize: Style.baseFontPixelSize
}
} // item container for progress bar and text
}

View file

@ -18,6 +18,7 @@ Item {
horizontalAlignment: Text.AlignRight
text: root.title + ":"
font.pixelSize: Style.baseFontPixelSize
}
Row {

View file

@ -1,5 +1,6 @@
import QtQuick 2.0
import QtQuick.Window 2.0
import "." // -> forces the qmldir to be loaded
import FlightGear.Launcher 1.0
@ -37,8 +38,9 @@ Rectangle {
anchors.rightMargin: 4
horizontalAlignment: Text.AlignHCenter
font.pixelSize: 24
font.pixelSize: Style.baseFontPixelSize * 2
text: aircraftInfo.name
fontSizeMode: Text.Fit
elide: Text.ElideRight
maximumLineCount: 1

View file

@ -20,6 +20,7 @@ Rectangle {
anchors.centerIn: parent
color: "white"
text: (mouse.containsMouse && hoverText != "") ? root.hoverText : root.text
font.pixelSize: Style.baseFontPixelSize
}
MouseArea {

View file

@ -20,6 +20,7 @@ Item {
id: labelText
width: parent.width - (emptyTrack.width + Style.margin)
horizontalAlignment: Text.AlignRight
font.pixelSize: Style.baseFontPixelSize
}
Rectangle {

View file

@ -18,5 +18,7 @@ QtObject
readonly property string inactiveThemeColor: "#9f9f9f"
readonly property string baseTextColor: "#3f3f3f"
readonly property int baseFontPixelSize: 12
}

View file

@ -45,6 +45,7 @@ Item {
anchors.left: track.right
anchors.leftMargin: Style.margin
anchors.verticalCenter: parent.verticalCenter
font.pixelSize: Style.baseFontPixelSize
}
MouseArea {