mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 08:04:01 +02:00
Merge pull request #9856 from druiz17/tablet-imporove-dialogs
Bring of menu window if tablet is closed on desktop
This commit is contained in:
commit
b3003acb97
8 changed files with 24 additions and 50 deletions
|
@ -20,6 +20,7 @@ import "../../windows"
|
|||
Rectangle {
|
||||
id: root
|
||||
objectName: "RunningScripts"
|
||||
property var title: "Running Scripts"
|
||||
HifiConstants { id: hifi }
|
||||
signal sendToScript(var message);
|
||||
property var eventBridge;
|
||||
|
|
|
@ -19,7 +19,7 @@ StackView {
|
|||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
|
||||
property var title: "Audio Preferences"
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ StackView {
|
|||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
|
||||
property var title: "Avatar Preferences"
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
|
|
|
@ -19,10 +19,11 @@ StackView {
|
|||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
|
||||
property var title: "General Prefernces"
|
||||
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
|
||||
function pushSource(path) {
|
||||
editRoot.push(Qt.reslovedUrl(path));
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ Item {
|
|||
d.push(Qt.resolvedUrl(path));
|
||||
d.currentItem.eventBridge = tabletMenu.eventBridge
|
||||
d.currentItem.sendToScript.connect(tabletMenu.sendToScript);
|
||||
breadcrumbText.text = d.currentItem.objectName;
|
||||
breadcrumbText.text = d.currentItem.title;
|
||||
}
|
||||
|
||||
function popSource() {
|
||||
|
|
|
@ -19,7 +19,7 @@ StackView {
|
|||
id: profileRoot
|
||||
initialItem: root
|
||||
objectName: "stack"
|
||||
|
||||
property var title: "Network Preferences"
|
||||
property var eventBridge;
|
||||
signal sendToScript(var message);
|
||||
|
||||
|
|
|
@ -21,8 +21,8 @@ import "../../../controls-uit" as HifiControls
|
|||
|
||||
Item {
|
||||
id: dialog
|
||||
width: 480
|
||||
height: 720
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
|
||||
HifiConstants { id: hifi }
|
||||
property var sections: []
|
||||
|
@ -31,6 +31,7 @@ Item {
|
|||
property bool keyboardEnabled: false
|
||||
property bool keyboardRaised: false
|
||||
property bool punctuationMode: false
|
||||
|
||||
|
||||
property var tablet;
|
||||
|
||||
|
@ -68,22 +69,11 @@ Item {
|
|||
}
|
||||
z: 100
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#2b2b2b"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#1e1e1e"
|
||||
}
|
||||
}
|
||||
|
||||
color: hifi.colors.darkGray
|
||||
RalewayBold {
|
||||
text: title
|
||||
size: 26
|
||||
color: "#34a2c7"
|
||||
color: hifi.colors.white
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: hifi.dimensions.contentMargin.x
|
||||
|
@ -99,17 +89,8 @@ Item {
|
|||
right: parent.right
|
||||
}
|
||||
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#2b2b2b"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#0f212e"
|
||||
}
|
||||
}
|
||||
color: hifi.colors.baseGray
|
||||
|
||||
Flickable {
|
||||
id: scrollView
|
||||
width: parent.width
|
||||
|
@ -203,17 +184,8 @@ Item {
|
|||
left: parent.left
|
||||
right: parent.right
|
||||
}
|
||||
gradient: Gradient {
|
||||
GradientStop {
|
||||
position: 0
|
||||
color: "#2b2b2b"
|
||||
}
|
||||
|
||||
GradientStop {
|
||||
position: 1
|
||||
color: "#0f212e"
|
||||
}
|
||||
}
|
||||
|
||||
color: hifi.colors.baseGray
|
||||
|
||||
Row {
|
||||
anchors {
|
||||
|
|
|
@ -5795,12 +5795,12 @@ void Application::toggleRunningScriptsWidget() const {
|
|||
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
if (tablet->getToolbarMode()) {
|
||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||
} else {
|
||||
QQuickItem* tabletRoot = tablet->getTabletRoot();
|
||||
if (!tabletRoot && !isHMDMode()) {
|
||||
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
|
||||
static const QUrl url("hifi/dialogs/RunningScripts.qml");
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "RunningScripts");
|
||||
} else {
|
||||
|
@ -5837,12 +5837,11 @@ void Application::showAssetServerWidget(QString filePath) {
|
|||
};
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
if (tablet->getToolbarMode()) {
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
||||
} else {
|
||||
QQuickItem* tabletRoot = tablet->getTabletRoot();
|
||||
if (!tabletRoot && !isHMDMode()) {
|
||||
if (!hmd->getShouldShowTablet() && !isHMDMode()) {
|
||||
DependencyManager::get<OffscreenUi>()->show(url, "AssetServer", startUpload);
|
||||
} else {
|
||||
static const QUrl url("../../hifi/dialogs/TabletAssetServer.qml");
|
||||
|
@ -5875,10 +5874,11 @@ void Application::addAssetToWorldFromURL(QString url) {
|
|||
void Application::showDialog(const QString& desktopURL, const QString& tabletURL, const QString& name) const {
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
auto tablet = dynamic_cast<TabletProxy*>(tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system"));
|
||||
if (tablet->getToolbarMode() || (!tablet->getTabletRoot() && !isHMDMode())) {
|
||||
auto hmd = DependencyManager::get<HMDScriptingInterface>();
|
||||
if (tablet->getToolbarMode() || (!hmd->getShouldShowTablet() && !isHMDMode())) {
|
||||
DependencyManager::get<OffscreenUi>()->show(desktopURL, name);
|
||||
} else {
|
||||
tablet->loadQMLSource(tabletURL);
|
||||
tablet->pushOntoStack(tabletURL);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue