mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 01:59:59 +02:00
Specify font sizes in pixels instead of points
Makes the dialog layout and look consistent across different devices.
This commit is contained in:
parent
9dd1bfad2d
commit
128583660b
9 changed files with 24 additions and 24 deletions
|
@ -22,7 +22,7 @@ TextField {
|
|||
|
||||
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; }
|
||||
font.family: firaSansSemiBold.name
|
||||
font.pointSize: hifi.fontSizes.textFieldInput
|
||||
font.pixelSize: hifi.fontSizes.textFieldInput
|
||||
height: implicitHeight + 4 // Make surrounding box higher so that highlight is vertically centered.
|
||||
placeholderText: textField.label // Instead of separate label (see below).
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: anonymousProRegular; source: "../../fonts/AnonymousPro-Regular.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: anonymousProRegular.name
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: firaSansSemiBold; source: "../../fonts/FiraSans-SemiBold.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: firaSansSemiBold.name
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: hiFiGlyphs; source: "../../fonts/hifi-glyphs.ttf"; }
|
||||
property int size: 32
|
||||
font.pixelSize: size // Size this font in pixels because it's UI widgets.
|
||||
font.pixelSize: size
|
||||
width: size
|
||||
height: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
|
|
|
@ -80,22 +80,22 @@ Item {
|
|||
}
|
||||
|
||||
Item {
|
||||
id: fontSizes
|
||||
readonly property real overlayTitle: dimensions.largeScreen? 16 : 12
|
||||
readonly property real tabName: dimensions.largeScreen? 11 : 9
|
||||
readonly property real sectionName: dimensions.largeScreen? 11 : 9
|
||||
readonly property real inputLabel: dimensions.largeScreen? 13.5 : 9
|
||||
readonly property real textFieldInput: dimensions.largeScreen? 13.5 : 11
|
||||
readonly property real tableText: dimensions.largeScreen? 13.5 : 11
|
||||
readonly property real buttonLabel: dimensions.largeScreen? 12 : 8
|
||||
readonly property real iconButton: dimensions.largeScreen? 12: 8
|
||||
readonly property real listItem: dimensions.largeScreen? 13.5 : 9
|
||||
readonly property real tabularData: dimensions.largeScreen? 11 : 9
|
||||
readonly property real logs: dimensions.largeScreen? 15 : 10
|
||||
readonly property real code: dimensions.largeScreen? 15 : 10
|
||||
readonly property real rootMenu: dimensions.largeScreen? 13.5 : 9
|
||||
readonly property real menuItem: dimensions.largeScreen? 13.5 : 9
|
||||
readonly property real shortcutText: dimensions.largeScreen? 12 : 8
|
||||
id: fontSizes // In pixels
|
||||
readonly property real overlayTitle: dimensions.largeScreen? 18 : 14
|
||||
readonly property real tabName: dimensions.largeScreen? 12 : 10
|
||||
readonly property real sectionName: dimensions.largeScreen? 12 : 10
|
||||
readonly property real inputLabel: dimensions.largeScreen? 14 : 10
|
||||
readonly property real textFieldInput: dimensions.largeScreen? 15 : 12
|
||||
readonly property real tableText: dimensions.largeScreen? 15 : 12
|
||||
readonly property real buttonLabel: dimensions.largeScreen? 13 : 9
|
||||
readonly property real iconButton: dimensions.largeScreen? 13 : 9
|
||||
readonly property real listItem: dimensions.largeScreen? 15 : 11
|
||||
readonly property real tabularData: dimensions.largeScreen? 15 : 11
|
||||
readonly property real logs: dimensions.largeScreen? 16 : 12
|
||||
readonly property real code: dimensions.largeScreen? 16 : 12
|
||||
readonly property real rootMenu: dimensions.largeScreen? 15 : 11
|
||||
readonly property real menuItem: dimensions.largeScreen? 15 : 11
|
||||
readonly property real shortcutText: dimensions.largeScreen? 13 : 9
|
||||
}
|
||||
|
||||
Item {
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: ralewayBold; source: "../../fonts/Raleway-Bold.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: ralewayBold.name
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: ralewayLight; source: "../../fonts/Raleway-Light.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: ralewayLight.name
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: ralewayRegular; source: "../../fonts/Raleway-Regular.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: ralewayRegular.name
|
||||
|
|
|
@ -16,7 +16,7 @@ Text {
|
|||
id: root
|
||||
FontLoader { id: ralewaySemibold; source: "../../fonts/Raleway-Semibold.ttf"; }
|
||||
property real size: 32
|
||||
font.pointSize: size
|
||||
font.pixelSize: size
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
horizontalAlignment: Text.AlignLeft
|
||||
font.family: ralewaySemibold.name
|
||||
|
|
Loading…
Reference in a new issue