Skip to content

Commit

Permalink
use pixel instead point for font size
Browse files Browse the repository at this point in the history
  • Loading branch information
janbar committed Aug 25, 2024
1 parent fc83109 commit 514d39b
Show file tree
Hide file tree
Showing 29 changed files with 148 additions and 162 deletions.
10 changes: 5 additions & 5 deletions gui/controls2_515/ConfigureMap.qml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PopOver {
maximumLineCount: 4
wrapMode: Text.Wrap
color: foregroundColor
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
font.weight: Font.Normal
}
}
Expand All @@ -76,7 +76,7 @@ PopOver {
maximumLineCount: 4
wrapMode: Text.Wrap
color: foregroundColor
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
font.weight: Font.Normal
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@ PopOver {
Label {
text: qsTr("Font name")
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("small")
font.pixelSize: units.fs("small")
}
ComboBox {
id: fontName
Expand Down Expand Up @@ -151,7 +151,7 @@ PopOver {
Label {
text: qsTr("Font size")
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("small")
font.pixelSize: units.fs("small")
}
ComboBox {
id: fontSize
Expand Down Expand Up @@ -185,7 +185,7 @@ PopOver {
Label {
text: qsTr("Style")
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("small")
font.pixelSize: units.fs("small")
}
ComboBox {
id: mapStyleSheet
Expand Down
8 changes: 4 additions & 4 deletions gui/controls2_515/ConfigureVoice.qml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ MapPage {
Label {
anchors.verticalCenter: parent.verticalCenter
color: "red"
font.pointSize: units.fs("large")
font.pixelSize: units.fs("large")
text: availableVoicesModel.msg
}

Expand Down Expand Up @@ -123,18 +123,18 @@ MapPage {
anchors.verticalCenter: parent.verticalCenter
Label {
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
font.bold: true
text: name
elide: Text.ElideRight
}
Label {
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
text: qsTranslate("resource", lang) + " , " + qsTranslate("resource", gender)
}
Label {
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
color: styleMap.view.secondaryColor
text: qsTr("Author: %1").arg(author)
}
Expand Down
8 changes: 4 additions & 4 deletions gui/controls2_515/DialogAbout.qml
Original file line number Diff line number Diff line change
Expand Up @@ -46,25 +46,25 @@ DialogBase {
width: dialog.availableWidth
text: qsTr("OSMin is a GPS Navigator based on a fork of OSMScout. It allows on-road routing and off-road navigation with OpenStreetMap® data.")
wrapMode: Label.Wrap
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
}
Text {
color: styleMap.dialog.foregroundColor
width: dialog.availableWidth
text: qsTr("Author: %1").arg("Jean-Luc Barriere")
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
}
Text {
color: styleMap.dialog.foregroundColor
width: dialog.availableWidth
text: qsTr("Version: %1").arg(VersionString)
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
}
Text {
id: donate
color: styleMap.dialog.foregroundColor
width: dialog.availableWidth
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
text: "<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=jlbarriere68%40gmail%2ecom&lc=US&item_name=OSMin&currency_code=EUR&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted'>Donate with Paypal</a>"
onLinkHovered: {
if (hoveredLink)
Expand Down
14 changes: 7 additions & 7 deletions gui/controls2_515/Favorites.qml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ MapPage {
Label {
width: parent.width
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
font.bold: true
wrapMode: Text.WordWrap
maximumLineCount: 2
text: label
}
Label {
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
color: styleMap.view.secondaryColor
text: Converter.readableCoordinatesGeocaching(lat, lon)
}
Expand Down Expand Up @@ -124,15 +124,15 @@ MapPage {
visible: favoritesPage.state === "default"
height: (visible ? implicitHeight : 0)
text: qsTr("Go there")
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
onTriggered: {
mapPage.navigateTo(lat, lon, label);
stackView.pop();
}
},
MenuItem {
text: qsTr("Rename")
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
onTriggered: {
dialogEdit.model = model;
dialogEdit.open();
Expand All @@ -147,7 +147,7 @@ MapPage {
},
MenuItem {
text: qsTr("Delete")
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
onTriggered: {
dialogAction.title = qsTr("Delete favorite ?");
dialogAction.text = model.label;
Expand Down Expand Up @@ -252,7 +252,7 @@ MapPage {
borderPadding: units.gu(1.0)
opacity: 0.7
label.text: favoritesPage.state === "default" ? qsTr("Go") : qsTr("Accept")
label.font.pointSize: units.fs("medium")
label.font.pixelSize: units.fs("medium")
label.color: "black"
height: units.gu(6)
onClicked: {
Expand Down Expand Up @@ -360,7 +360,7 @@ MapPage {

TextField {
id: inputLabel
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
placeholderText: qsTr("Enter the label")
inputMethodHints: Qt.ImhNoAutoUppercase | Qt.ImhUrlCharactersOnly
EnterKey.type: Qt.EnterKeyDone
Expand Down
10 changes: 5 additions & 5 deletions gui/controls2_515/LocationInfo.qml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ PopOver {
.arg(Converter.readableBearing(locationInfoModel.bearing(sourceLat, sourceLon, placeLat, placeLon)))

color: styleMap.popover.highlightedColor
font.pointSize: units.fs("small")
font.pixelSize: units.fs("small")
bottomPadding: locationInfoView.spacing
visible: sourceValid
}
Expand All @@ -115,7 +115,7 @@ PopOver {
text: qsTr("%1 %2 from").arg(Converter.readableDistance(distance)).arg(Converter.readableBearing(bearing))

color: styleMap.popover.highlightedColor
font.pointSize: units.fs("small")
font.pixelSize: units.fs("small")
visible: !inPlace
}
Row {
Expand All @@ -132,15 +132,15 @@ PopOver {
width: locationInfoView.width - poiIcon.width - units.gu(1)
text: poi // label
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("large")
font.pixelSize: units.fs("large")
visible: poi != ""
}
Label {
id: entryAddress
width: locationInfoView.width - poiIcon.width - units.gu(1)
text: address
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
visible: address != ""
}
Label {
Expand All @@ -164,7 +164,7 @@ PopOver {
}
}
color: styleMap.popover.foregroundColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
visible: region.length > 0 || postalCode != ""
}
PhoneLink {
Expand Down
4 changes: 2 additions & 2 deletions gui/controls2_515/MainMenu.qml
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,15 @@ PopOver {
Label {
width: parent.width - units.gu(1)
color: styleMap.view.primaryColor
font.pointSize: units.fs("large")
font.pixelSize: units.fs("large")
font.bold: false
text: name
elide: Text.ElideRight
}
// Label {
// width: parent.width - units.gu(1)
// color: styleMap.view.secondaryColor
// font.pointSize: units.fs("small")
// font.pixelSize: units.fs("small")
// verticalAlignment: Text.AlignVCenter
// horizontalAlignment: Text.AlignLeft
// maximumLineCount: 2
Expand Down
22 changes: 11 additions & 11 deletions gui/controls2_515/MapDownloads.qml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ MapPage {
anchors.verticalCenter: parent.verticalCenter
color: styleMap.view.highlightedColor
text: qsTr("Downloads")
font.pointSize: units.fs("x-large")
font.pixelSize: units.fs("x-large")
}
}

Expand All @@ -99,18 +99,18 @@ MapPage {
spacing: units.gu(2)
Label {
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
text: mapName
}
Label {
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
text: (Math.round(progressRole * 1000) / 10).toFixed(1) + " %";
}
}
Label {
color: styleMap.view.secondaryColor
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
text: errorString.length > 0 ? qsTranslate("message", errorString) : progressDescription
elide: Text.ElideRight
}
Expand Down Expand Up @@ -165,7 +165,7 @@ MapPage {
anchors.verticalCenter: parent.verticalCenter
color: styleMap.view.highlightedColor
text: qsTr("Installed Maps")
font.pointSize: units.fs("x-large")
font.pixelSize: units.fs("x-large")
}
}

Expand All @@ -188,12 +188,12 @@ MapPage {
Label {
width: parent.width - (updateAvailable ? units.gu(12) : units.gu(6))
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
text: name
elide: Text.ElideRight
}
Label{
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
color: styleMap.view.secondaryColor
text: time.toLocaleDateString(Locale.ShortFormat)
visible: time != null
Expand Down Expand Up @@ -295,15 +295,15 @@ MapPage {
anchors.verticalCenter: parent.verticalCenter
color: styleMap.view.highlightedColor
text: availableList.tree.length > 0 ? availableList.tree[0].name : qsTr("Available Maps")
font.pointSize: units.fs("x-large")
font.pixelSize: units.fs("x-large")
}

MapIcon {
anchors.verticalCenter: parent.verticalCenter
height: units.gu(5)
source: "qrc:/images/go-previous.svg"
label.text: qsTr("Back")
label.font.pointSize: units.fs("small")
label.font.pixelSize: units.fs("small")
visible: availableList.tree.length > 0
onClicked: {
availableList.tree = availableList.tree.slice(1, availableList.tree.length);
Expand Down Expand Up @@ -341,13 +341,13 @@ MapPage {
Label {
width: parent.width - units.gu(6)
color: styleMap.view.primaryColor
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
font.bold: dir
text: name
elide: Text.ElideRight
}
Label {
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
color: styleMap.view.secondaryColor
text: { dir ? null : time.toLocaleDateString(Locale.ShortFormat) + ", " + size }
visible: !dir
Expand Down
14 changes: 7 additions & 7 deletions gui/controls2_515/MapView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ MapPage {
anchors.bottom: parent.bottom
anchors.left: parent.left
text: "© OpenStreetMap contributors"
font.pointSize: units.fs("x-small")
font.pixelSize: units.fs("x-small")
font.weight: Font.Thin
color: nightView ? "white" : "black"
visible: !showToolbar && !navigation
Expand Down Expand Up @@ -393,7 +393,7 @@ MapPage {
visible: mapView.state === "view" && !showToolbar && Tracker.isRecording
borderPadding: units.gu(1.0)
label.text: qsTr("Mark")
label.font.pointSize: units.fs("medium")
label.font.pixelSize: units.fs("medium")
label.color: "black"
opacity: 0.7
height: units.gu(6)
Expand Down Expand Up @@ -482,21 +482,21 @@ MapPage {
Label {
id: currentSpeed
text: Converter.readableSpeed(Tracker.currentSpeed)
font.pointSize: 1.5 * units.fs("x-large")
font.pixelSize: 1.5 * units.fs("x-large")
color: nightView ? "white" : "black"
}
Row {
spacing: units.gu(2)
Label {
id: duration
text: Converter.panelDurationHMS(Tracker.duration)
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
color: nightView ? "white" : "black"
}
Label {
id: distance
text: Converter.panelDistance(Tracker.distance)
font.pointSize: units.fs("medium")
font.pixelSize: units.fs("medium")
color: nightView ? "white" : "black"
}
}
Expand All @@ -507,7 +507,7 @@ MapPage {
enabled: false
height: units.gu(2)
borderPadding: 0
label.font.pointSize: units.fs("medium")
label.font.pixelSize: units.fs("medium")
label.text: Converter.panelElevation(Tracker.elevation)
}
}
Expand All @@ -533,7 +533,7 @@ MapPage {
opacity: 0.7
height: units.gu(6)
label.text: qsTr("Go")
label.font.pointSize: units.fs("medium")
label.font.pixelSize: units.fs("medium")
label.color: "black"
onClicked: {
navigateTo(popLocationInfo.placeLat,
Expand Down
Loading

0 comments on commit 514d39b

Please sign in to comment.