aboutsummaryrefslogtreecommitdiff
path: root/main.qml
diff options
context:
space:
mode:
authorSander Ferdinand <sa.ferdinand@gmail.com>2018-04-21 21:58:00 +0200
committerSander Ferdinand <sa.ferdinand@gmail.com>2018-04-25 16:31:13 +0200
commit47f9a1765a4f5f02b22475fdfb30c6b71e5a57be (patch)
tree043e2007f725b86e7ba69b1ea4cc5d498b33f5a7 /main.qml
parentacefb965202f0b5f7c841b0b98628d52334ce9b1 (diff)
downloadmonzero-gui-47f9a1765a4f5f02b22475fdfb30c6b71e5a57be.tar.gz
monzero-gui-47f9a1765a4f5f02b22475fdfb30c6b71e5a57be.tar.xz
monzero-gui-47f9a1765a4f5f02b22475fdfb30c6b71e5a57be.zip
Modify password dialog and move customdecorations function out of main.qml
Diffstat (limited to 'main.qml')
-rw-r--r--main.qml24
1 files changed, 2 insertions, 22 deletions
diff --git a/main.qml b/main.qml
index d3a56796..00b910f5 100644
--- a/main.qml
+++ b/main.qml
@@ -40,6 +40,7 @@ import moneroComponents.NetworkType 1.0
import "components"
import "wizard"
+import "js/Windows.js" as Windows
ApplicationWindow {
id: appWindow
@@ -933,30 +934,9 @@ ApplicationWindow {
// width: screenWidth //rightPanelExpanded ? 1269 : 1269 - 300
// height: 900 //300//maxWindowHeight;
color: "#FFFFFF"
- flags: persistentSettings.customDecorations ? (Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint) : (Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint)
+ flags: persistentSettings.customDecorations ? Windows.flagsCustomDecorations : Windows.flags
onWidthChanged: x -= 0
- function setCustomWindowDecorations(custom) {
- var x = appWindow.x
- var y = appWindow.y
- if (x < 0)
- x = 0
- if (y < 0)
- y = 0
- persistentSettings.customDecorations = custom;
- titleBar.visible = custom; // hides custom titlebar based on customDecorations
-
- if (custom)
- appWindow.flags = Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint;
- else
- appWindow.flags = Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint;
-
- appWindow.hide()
- appWindow.x = x
- appWindow.y = y
- appWindow.show()
- }
-
Component.onCompleted: {
x = (Screen.width - width) / 2
y = (Screen.height - maxWindowHeight) / 2