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:
parent
7f815c4c51
commit
5020e4655e
9 changed files with 17 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ Item {
|
|||
|
||||
horizontalAlignment: Text.AlignRight
|
||||
text: root.title + ":"
|
||||
font.pixelSize: Style.baseFontPixelSize
|
||||
}
|
||||
|
||||
Row {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -20,6 +20,7 @@ Rectangle {
|
|||
anchors.centerIn: parent
|
||||
color: "white"
|
||||
text: (mouse.containsMouse && hoverText != "") ? root.hoverText : root.text
|
||||
font.pixelSize: Style.baseFontPixelSize
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
|
@ -20,6 +20,7 @@ Item {
|
|||
id: labelText
|
||||
width: parent.width - (emptyTrack.width + Style.margin)
|
||||
horizontalAlignment: Text.AlignRight
|
||||
font.pixelSize: Style.baseFontPixelSize
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
|
|
|
@ -18,5 +18,7 @@ QtObject
|
|||
readonly property string inactiveThemeColor: "#9f9f9f"
|
||||
|
||||
readonly property string baseTextColor: "#3f3f3f"
|
||||
|
||||
readonly property int baseFontPixelSize: 12
|
||||
}
|
||||
|
||||
|
|
|
@ -45,6 +45,7 @@ Item {
|
|||
anchors.left: track.right
|
||||
anchors.leftMargin: Style.margin
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pixelSize: Style.baseFontPixelSize
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
|
|
Loading…
Reference in a new issue