mirror of
https://github.com/overte-org/overte.git
synced 2025-06-20 10:41:06 +02:00
Mac testing
This commit is contained in:
parent
76ce34a74b
commit
ca16d37ce5
3 changed files with 26 additions and 20 deletions
|
@ -108,7 +108,7 @@ Hifi.VrMenu {
|
||||||
height: 32
|
height: 32
|
||||||
color: hifi.colors.hifiBlue
|
color: hifi.colors.hifiBlue
|
||||||
y: (listView.currentItem) ? listView.currentItem.y : 0;
|
y: (listView.currentItem) ? listView.currentItem.y : 0;
|
||||||
x: 32
|
x: (listView.currentItem) ? listView.currentItem.height : 0;
|
||||||
Behavior on y {
|
Behavior on y {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 100
|
duration: 100
|
||||||
|
@ -132,6 +132,12 @@ Hifi.VrMenu {
|
||||||
property: "source"
|
property: "source"
|
||||||
value: modelData
|
value: modelData
|
||||||
when: loader.status == Loader.Ready
|
when: loader.status == Loader.Ready
|
||||||
|
}
|
||||||
|
Binding {
|
||||||
|
target: loader.item
|
||||||
|
property: "border"
|
||||||
|
value: listView.parent
|
||||||
|
when: loader.status == Loader.Ready
|
||||||
}
|
}
|
||||||
Binding {
|
Binding {
|
||||||
target: loader.item
|
target: loader.item
|
||||||
|
@ -147,10 +153,11 @@ Hifi.VrMenu {
|
||||||
property var itemBuilder: Component {
|
property var itemBuilder: Component {
|
||||||
Text {
|
Text {
|
||||||
id: thisText
|
id: thisText
|
||||||
x: 32
|
x: height
|
||||||
property var source
|
property var source
|
||||||
property var root
|
property var root
|
||||||
property var listView
|
property var listView
|
||||||
|
property var border
|
||||||
text: typedText()
|
text: typedText()
|
||||||
height: implicitHeight
|
height: implicitHeight
|
||||||
width: implicitWidth
|
width: implicitWidth
|
||||||
|
@ -167,12 +174,6 @@ Hifi.VrMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onVisibleChanged: {
|
|
||||||
if (listView) {
|
|
||||||
listView.recalculateSize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onImplicitWidthChanged: {
|
onImplicitWidthChanged: {
|
||||||
if (listView) {
|
if (listView) {
|
||||||
listView.minWidth = Math.max(listView.minWidth, implicitWidth + 64);
|
listView.minWidth = Math.max(listView.minWidth, implicitWidth + 64);
|
||||||
|
@ -182,12 +183,13 @@ Hifi.VrMenu {
|
||||||
|
|
||||||
FontAwesome {
|
FontAwesome {
|
||||||
visible: source.type == 1 && source.checkable
|
visible: source.type == 1 && source.checkable
|
||||||
x: -32
|
x: -parent.height
|
||||||
|
size: parent.height
|
||||||
text: checkText();
|
text: checkText();
|
||||||
color: parent.color
|
color: parent.color
|
||||||
function checkText() {
|
function checkText() {
|
||||||
if (source.type != 1) {
|
if (!source || source.type != 1) {
|
||||||
return;
|
return "";
|
||||||
}
|
}
|
||||||
// FIXME this works for native QML menus but I don't think it will
|
// FIXME this works for native QML menus but I don't think it will
|
||||||
// for proxied QML menus
|
// for proxied QML menus
|
||||||
|
@ -199,6 +201,7 @@ Hifi.VrMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
FontAwesome {
|
FontAwesome {
|
||||||
|
size: parent.height
|
||||||
visible: source.type == 2
|
visible: source.type == 2
|
||||||
x: listView.width - 32 - (hifi.layout.spacing * 2)
|
x: listView.width - 32 - (hifi.layout.spacing * 2)
|
||||||
text: "\uF0DA"
|
text: "\uF0DA"
|
||||||
|
@ -206,14 +209,17 @@ Hifi.VrMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
function typedText() {
|
function typedText() {
|
||||||
switch(source.type) {
|
if (source) {
|
||||||
case 2:
|
switch(source.type) {
|
||||||
return source.title;
|
case 2:
|
||||||
case 1:
|
return source.title;
|
||||||
return source.text;
|
case 1:
|
||||||
case 0:
|
return source.text;
|
||||||
return "-----"
|
case 0:
|
||||||
|
return "-----"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
|
|
|
@ -124,9 +124,9 @@ void OffscreenUi::resize(const QSize& newSize) {
|
||||||
|
|
||||||
if (_quickWindow) {
|
if (_quickWindow) {
|
||||||
_quickWindow->setGeometry(QRect(QPoint(), newSize));
|
_quickWindow->setGeometry(QRect(QPoint(), newSize));
|
||||||
|
_quickWindow->contentItem()->setSize(newSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
_quickWindow->contentItem()->setSize(newSize);
|
|
||||||
|
|
||||||
// Update our members
|
// Update our members
|
||||||
if (_rootItem) {
|
if (_rootItem) {
|
||||||
|
|
|
@ -205,7 +205,7 @@ void QTestWindow::renderText() {
|
||||||
{ size.x + QUAD_OFFSET.x, QUAD_OFFSET.y },
|
{ size.x + QUAD_OFFSET.x, QUAD_OFFSET.y },
|
||||||
{ size.x + QUAD_OFFSET.x, size.y + QUAD_OFFSET.y },
|
{ size.x + QUAD_OFFSET.x, size.y + QUAD_OFFSET.y },
|
||||||
{ QUAD_OFFSET.x, size.y + QUAD_OFFSET.y },
|
{ QUAD_OFFSET.x, size.y + QUAD_OFFSET.y },
|
||||||
};
|
};
|
||||||
|
|
||||||
QString str = QString::fromWCharArray(EXAMPLE_TEXT);
|
QString str = QString::fromWCharArray(EXAMPLE_TEXT);
|
||||||
for (int i = 0; i < 4; ++i) {
|
for (int i = 0; i < 4; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue