Rework QML font sizing to be more consistent across platforms

This commit is contained in:
David Rowe 2015-06-02 14:48:11 -07:00
parent a8a3c677ad
commit ec1cb72dd5
8 changed files with 10 additions and 11 deletions

View file

@ -58,7 +58,6 @@ Item {
}
font.pointSize: 15
helperText: "Go to: place, @user, /path, network address"
onAccepted: {

View file

@ -9,7 +9,7 @@ Original.SpinBox {
style: SpinBoxStyle {
HifiConstants { id: hifi }
font.family: hifi.fonts.fontFamily
font.pointSize: hifi.fonts.fontSize
font.pixelSize: hifi.fonts.pixelSize
}
}

View file

@ -4,6 +4,6 @@ import "../styles"
Original.Text {
HifiConstants { id: hifi }
font.family: hifi.fonts.fontFamily
font.pointSize: hifi.fonts.fontSize
font.pixelSize: hifi.fonts.pixelSize
}

View file

@ -4,6 +4,6 @@ import "../styles"
Original.TextArea {
HifiConstants { id: hifi }
font.family: hifi.fonts.fontFamily
font.pointSize: hifi.fonts.fontSize
font.pixelSize: hifi.fonts.pixelSize
}

View file

@ -4,6 +4,6 @@ import "../styles"
Original.TextEdit {
HifiConstants { id: hifi }
font.family: hifi.fonts.fontFamily
font.pointSize: hifi.fonts.fontSize
font.pixelSize: hifi.fonts.pixelSize
}

View file

@ -4,6 +4,6 @@ import "../styles"
Text {
HifiConstants { id: hifi }
color: hifi.colors.hifiBlue
font.pointSize: hifi.fonts.headerPointSize
font.pixelSize: hifi.fonts.headerPixelSize
font.bold: true
}

View file

@ -11,7 +11,7 @@ Original.TextInput {
color: hifi.colors.text
verticalAlignment: Original.TextInput.AlignVCenter
font.family: hifi.fonts.fontFamily
font.pointSize: hifi.fonts.fontSize
font.pixelSize: hifi.fonts.pixelSize
/*
Original.Rectangle {
@ -23,7 +23,7 @@ Original.TextInput {
*/
Text {
anchors.fill: parent
font.pointSize: parent.font.pointSize
font.pixelSize: parent.font.pixelSize
font.family: parent.font.family
verticalAlignment: parent.verticalAlignment
horizontalAlignment: parent.horizontalAlignment

View file

@ -36,9 +36,9 @@ Item {
QtObject {
id: fonts
readonly property real headerPointSize: 24
readonly property string fontFamily: "Helvetica"
readonly property real fontSize: 18
readonly property string fontFamily: "Arial" // Available on both Windows and OSX
readonly property real pixelSize: 22 // Logical pixel size; works on Windows and OSX at varying physical DPIs
readonly property real headerPixelSize: 32
}
QtObject {