Mac testing

This commit is contained in:
Bradley Austin Davis 2015-04-27 12:46:34 -07:00
parent 76ce34a74b
commit ca16d37ce5
3 changed files with 26 additions and 20 deletions

View file

@ -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
@ -133,6 +133,12 @@ Hifi.VrMenu {
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
property: "listView" property: "listView"
@ -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,6 +209,7 @@ Hifi.VrMenu {
} }
function typedText() { function typedText() {
if (source) {
switch(source.type) { switch(source.type) {
case 2: case 2:
return source.title; return source.title;
@ -215,6 +219,8 @@ Hifi.VrMenu {
return "-----" return "-----"
} }
} }
return ""
}
MouseArea { MouseArea {
id: mouseArea id: mouseArea

View file

@ -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) {