mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
Android - Support display with smaller resolution than 1440p for Go To window
This commit is contained in:
parent
82f9416b3f
commit
5f1fc37684
2 changed files with 37 additions and 35 deletions
|
@ -75,33 +75,33 @@ Item {
|
||||||
HifiStyles.RalewayRegular {
|
HifiStyles.RalewayRegular {
|
||||||
id: notice
|
id: notice
|
||||||
text: "YOUR LOCATION"
|
text: "YOUR LOCATION"
|
||||||
font.pixelSize: hifi.fonts.pixelSize * 2.15;
|
font.pixelSize: (hifi.fonts.pixelSize * 2.15)*(android.dimen.atLeast1440p?1:.75);
|
||||||
color: "#2CD7FF"
|
color: "#2CD7FF"
|
||||||
anchors {
|
anchors {
|
||||||
bottom: addressBackground.top
|
bottom: addressBackground.top
|
||||||
bottomMargin: 45
|
bottomMargin: android.dimen.atLeast1440p?45:34
|
||||||
left: addressBackground.left
|
left: addressBackground.left
|
||||||
leftMargin: 60
|
leftMargin: android.dimen.atLeast1440p?60:45
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
property int inputAreaHeight: 210
|
property int inputAreaHeight: android.dimen.atLeast1440p?210:156
|
||||||
property int inputAreaStep: (height - inputAreaHeight) / 2
|
property int inputAreaStep: (height - inputAreaHeight) / 2
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: homeButton
|
id: homeButton
|
||||||
y: 280
|
y: android.dimen.atLeast1440p?280:210
|
||||||
imageURL: "../../icons/home.svg"
|
imageURL: "../../icons/home.svg"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
addressBarDialog.loadHome();
|
addressBarDialog.loadHome();
|
||||||
bar.shown = false;
|
bar.shown = false;
|
||||||
}
|
}
|
||||||
anchors {
|
anchors {
|
||||||
leftMargin: 75
|
leftMargin: android.dimen.atLeast1440p?75:56
|
||||||
left: parent.left
|
left: parent.left
|
||||||
}
|
}
|
||||||
size: 150
|
size: android.dimen.atLeast1440p?150:150//112
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -110,10 +110,10 @@ Item {
|
||||||
onClicked: addressBarDialog.loadBack();
|
onClicked: addressBarDialog.loadBack();
|
||||||
anchors {
|
anchors {
|
||||||
left: homeButton.right
|
left: homeButton.right
|
||||||
leftMargin: 70
|
leftMargin: android.dimen.atLeast1440p?70:52
|
||||||
verticalCenter: homeButton.verticalCenter
|
verticalCenter: homeButton.verticalCenter
|
||||||
}
|
}
|
||||||
size: 150
|
size: android.dimen.atLeast1440p?150:150
|
||||||
}
|
}
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
id: forwardArrow;
|
id: forwardArrow;
|
||||||
|
@ -121,10 +121,10 @@ Item {
|
||||||
onClicked: addressBarDialog.loadForward();
|
onClicked: addressBarDialog.loadForward();
|
||||||
anchors {
|
anchors {
|
||||||
left: backArrow.right
|
left: backArrow.right
|
||||||
leftMargin: 60
|
leftMargin: android.dimen.atLeast1440p?60:45
|
||||||
verticalCenter: homeButton.verticalCenter
|
verticalCenter: homeButton.verticalCenter
|
||||||
}
|
}
|
||||||
size: 150
|
size: android.dimen.atLeast1440p?150:150
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiStyles.FiraSansRegular {
|
HifiStyles.FiraSansRegular {
|
||||||
|
@ -139,24 +139,24 @@ Item {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: addressBackground
|
id: addressBackground
|
||||||
x: 780
|
x: android.dimen.atLeast1440p?780:585
|
||||||
y: 280
|
y: android.dimen.atLeast1440p?280:235 // tweaking by hand
|
||||||
width: 1440
|
width: android.dimen.atLeast1440p?1270:952
|
||||||
height: 150
|
height: android.dimen.atLeast1440p?150:112
|
||||||
color: "#FFFFFF"
|
color: "#FFFFFF"
|
||||||
}
|
}
|
||||||
|
|
||||||
TextInput {
|
TextInput {
|
||||||
id: addressLine
|
id: addressLine
|
||||||
focus: true
|
focus: true
|
||||||
x: 870
|
x: android.dimen.atLeast1440p?870:652
|
||||||
y: 450
|
y: android.dimen.atLeast1440p?300:245 // tweaking by hand
|
||||||
width: 1350
|
width: android.dimen.atLeast1440p?1200:900
|
||||||
height: 120
|
height: android.dimen.atLeast1440p?120:90
|
||||||
inputMethodHints: Qt.ImhNoPredictiveText
|
inputMethodHints: Qt.ImhNoPredictiveText
|
||||||
//helperText: "Hint is here"
|
//helperText: "Hint is here"
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: homeButton.verticalCenter
|
//verticalCenter: addressBackground.verticalCenter
|
||||||
}
|
}
|
||||||
font.pixelSize: hifi.fonts.pixelSize * 3.75
|
font.pixelSize: hifi.fonts.pixelSize * 3.75
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import QtQuick 2.4
|
import QtQuick 2.4
|
||||||
|
import QtQuick.Window 2.2
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|
||||||
|
@ -20,26 +21,27 @@ Item {
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: dimen
|
id: dimen
|
||||||
readonly property real windowLessWidth: 126*3
|
readonly property bool atLeast1440p: Screen.width >= 2560 && Screen.height >= 1440
|
||||||
readonly property real windowLessHeight: 64*3
|
readonly property real windowLessWidth: atLeast1440p?378:284
|
||||||
|
readonly property real windowLessHeight: atLeast1440p?192:144
|
||||||
|
|
||||||
readonly property real windowZ: 100
|
readonly property real windowZ: 100
|
||||||
|
|
||||||
readonly property real headerHeight: 276
|
readonly property real headerHeight: atLeast1440p?276:207
|
||||||
|
|
||||||
readonly property real headerIconPosX: 90
|
readonly property real headerIconPosX: atLeast1440p?90:67
|
||||||
readonly property real headerIconPosY: 108
|
readonly property real headerIconPosY: atLeast1440p?108:81
|
||||||
readonly property real headerIconWidth: 111
|
readonly property real headerIconWidth: atLeast1440p?111:83
|
||||||
readonly property real headerIconHeight: 111
|
readonly property real headerIconHeight: atLeast1440p?111:83
|
||||||
readonly property real headerIconTitleDistance: 151
|
readonly property real headerIconTitleDistance: atLeast1440p?151:113
|
||||||
|
|
||||||
readonly property real headerHideWidth: 150
|
readonly property real headerHideWidth: atLeast1440p?150:112
|
||||||
readonly property real headerHideHeight: 150
|
readonly property real headerHideHeight: atLeast1440p?150:112
|
||||||
readonly property real headerHideRightMargin: 110
|
readonly property real headerHideRightMargin: atLeast1440p?110:82
|
||||||
readonly property real headerHideTopMargin: 90
|
readonly property real headerHideTopMargin: atLeast1440p?90:67
|
||||||
readonly property real headerHideIconWidth: 70
|
readonly property real headerHideIconWidth: atLeast1440p?70:52
|
||||||
readonly property real headerHideIconHeight: 45
|
readonly property real headerHideIconHeight: atLeast1440p?45:33
|
||||||
readonly property real headerHideTextTopMargin: 36
|
readonly property real headerHideTextTopMargin: atLeast1440p?36:27
|
||||||
|
|
||||||
readonly property real botomHudWidth: 366
|
readonly property real botomHudWidth: 366
|
||||||
readonly property real botomHudHeight: 180
|
readonly property real botomHudHeight: 180
|
||||||
|
|
Loading…
Reference in a new issue