mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 15:23:05 +02:00
Working on menus look
This commit is contained in:
parent
7414201845
commit
75f6ad3b99
2 changed files with 18 additions and 20 deletions
|
@ -121,6 +121,9 @@ Hifi.VrMenu {
|
||||||
property var root
|
property var root
|
||||||
property var listView
|
property var listView
|
||||||
property var border
|
property var border
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implicitHeight: row.implicitHeight + 4
|
implicitHeight: row.implicitHeight + 4
|
||||||
implicitWidth: row.implicitWidth + label.height
|
implicitWidth: row.implicitWidth + label.height
|
||||||
// FIXME uncommenting this line results in menus that have blank spots
|
// FIXME uncommenting this line results in menus that have blank spots
|
||||||
|
@ -137,8 +140,7 @@ Hifi.VrMenu {
|
||||||
FontAwesome {
|
FontAwesome {
|
||||||
id: check
|
id: check
|
||||||
verticalAlignment: Text.AlignVCenter
|
verticalAlignment: Text.AlignVCenter
|
||||||
y: 2
|
size: row.height
|
||||||
size: label.height
|
|
||||||
text: checkText()
|
text: checkText()
|
||||||
color: label.color
|
color: label.color
|
||||||
function checkText() {
|
function checkText() {
|
||||||
|
@ -156,7 +158,10 @@ Hifi.VrMenu {
|
||||||
}
|
}
|
||||||
Text {
|
Text {
|
||||||
id: label
|
id: label
|
||||||
|
// anchors.top: parent.top
|
||||||
|
// anchors.bottom: parent.bottom
|
||||||
text: typedText()
|
text: typedText()
|
||||||
|
verticalAlignment: Text.AlignVCenter
|
||||||
color: source.enabled ? hifi.colors.text : hifi.colors.disabledText
|
color: source.enabled ? hifi.colors.text : hifi.colors.disabledText
|
||||||
enabled: source.enabled && source.visible
|
enabled: source.enabled && source.visible
|
||||||
function typedText() {
|
function typedText() {
|
||||||
|
@ -189,13 +194,11 @@ Hifi.VrMenu {
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors {
|
anchors.top: parent.top
|
||||||
top: parent.top
|
anchors.bottom: parent.bottom
|
||||||
bottom: parent.bottom
|
anchors.right: tag.right
|
||||||
left: parent.left
|
anchors.left: parent.left
|
||||||
right: tag.right
|
anchors.rightMargin: -4
|
||||||
rightMargin: -4
|
|
||||||
}
|
|
||||||
acceptedButtons: Qt.LeftButton
|
acceptedButtons: Qt.LeftButton
|
||||||
hoverEnabled: true
|
hoverEnabled: true
|
||||||
Rectangle {
|
Rectangle {
|
||||||
|
|
|
@ -36,6 +36,7 @@
|
||||||
|
|
||||||
#include "MessageDialog.h"
|
#include "MessageDialog.h"
|
||||||
#include "VrMenu.h"
|
#include "VrMenu.h"
|
||||||
|
#include <QDesktopWidget>
|
||||||
|
|
||||||
class RateCounter {
|
class RateCounter {
|
||||||
std::vector<float> times;
|
std::vector<float> times;
|
||||||
|
@ -339,8 +340,10 @@ public:
|
||||||
makeCurrent();
|
makeCurrent();
|
||||||
|
|
||||||
offscreenUi->setProxyWindow(this);
|
offscreenUi->setProxyWindow(this);
|
||||||
setFramePosition(QPoint(-1000, 0));
|
QDesktopWidget* desktop = QApplication::desktop();
|
||||||
resize(QSize(800, 600));
|
setGeometry(desktop->availableGeometry(desktop->screenCount()-1));
|
||||||
|
// setFramePosition(QPoint(-1000, 0));
|
||||||
|
// resize(QSize(800, 600));
|
||||||
|
|
||||||
#ifdef QML_CONTROL_GALLERY
|
#ifdef QML_CONTROL_GALLERY
|
||||||
offscreenUi->setBaseUrl(QUrl::fromLocalFile(getTestQmlDir()));
|
offscreenUi->setBaseUrl(QUrl::fromLocalFile(getTestQmlDir()));
|
||||||
|
@ -474,16 +477,8 @@ hifi.offscreen.focus.debug=false
|
||||||
qt.quick.mouse.debug=false
|
qt.quick.mouse.debug=false
|
||||||
)V0G0N";
|
)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) {
|
int main(int argc, char** argv) {
|
||||||
QGuiApplication app(argc, argv);
|
QApplication app(argc, argv);
|
||||||
QLoggingCategory::setFilterRules(LOG_FILTER_RULES);
|
QLoggingCategory::setFilterRules(LOG_FILTER_RULES);
|
||||||
QTestWindow window;
|
QTestWindow window;
|
||||||
app.exec();
|
app.exec();
|
||||||
|
|
Loading…
Reference in a new issue