Working on menus look

This commit is contained in:
Bradley Austin Davis 2015-04-29 00:43:18 -07:00
parent 7414201845
commit 75f6ad3b99
2 changed files with 18 additions and 20 deletions

View file

@ -121,6 +121,9 @@ Hifi.VrMenu {
property var root
property var listView
property var border
implicitHeight: row.implicitHeight + 4
implicitWidth: row.implicitWidth + label.height
// FIXME uncommenting this line results in menus that have blank spots
@ -137,8 +140,7 @@ Hifi.VrMenu {
FontAwesome {
id: check
verticalAlignment: Text.AlignVCenter
y: 2
size: label.height
size: row.height
text: checkText()
color: label.color
function checkText() {
@ -156,7 +158,10 @@ Hifi.VrMenu {
}
Text {
id: label
// anchors.top: parent.top
// anchors.bottom: parent.bottom
text: typedText()
verticalAlignment: Text.AlignVCenter
color: source.enabled ? hifi.colors.text : hifi.colors.disabledText
enabled: source.enabled && source.visible
function typedText() {
@ -189,13 +194,11 @@ Hifi.VrMenu {
}
MouseArea {
anchors {
top: parent.top
bottom: parent.bottom
left: parent.left
right: tag.right
rightMargin: -4
}
anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.right: tag.right
anchors.left: parent.left
anchors.rightMargin: -4
acceptedButtons: Qt.LeftButton
hoverEnabled: true
Rectangle {

View file

@ -36,6 +36,7 @@
#include "MessageDialog.h"
#include "VrMenu.h"
#include <QDesktopWidget>
class RateCounter {
std::vector<float> times;
@ -339,8 +340,10 @@ public:
makeCurrent();
offscreenUi->setProxyWindow(this);
setFramePosition(QPoint(-1000, 0));
resize(QSize(800, 600));
QDesktopWidget* desktop = QApplication::desktop();
setGeometry(desktop->availableGeometry(desktop->screenCount()-1));
// setFramePosition(QPoint(-1000, 0));
// resize(QSize(800, 600));
#ifdef QML_CONTROL_GALLERY
offscreenUi->setBaseUrl(QUrl::fromLocalFile(getTestQmlDir()));
@ -474,16 +477,8 @@ hifi.offscreen.focus.debug=false
qt.quick.mouse.debug=false
)V0G0N";
//int main(int argc, char *argv[]) {
// QGuiApplication app(argc, argv);
// QQmlApplicationEngine engine;
// engine.setBaseUrl(QUrl::fromLocalFile(getQmlDir()));
// engine.load(QUrl("Main.qml"));
// return app.exec();
//}
int main(int argc, char** argv) {
QGuiApplication app(argc, argv);
QApplication app(argc, argv);
QLoggingCategory::setFilterRules(LOG_FILTER_RULES);
QTestWindow window;
app.exec();