mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 03:42:05 +02:00
Modify password dialog and move customdecorations function out of main.qml
This commit is contained in:
parent
acefb96520
commit
47f9a1765a
@ -38,13 +38,7 @@ import "../components" as MoneroComponents
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
Rectangle {
|
z: parent.z + 2
|
||||||
id: bg
|
|
||||||
z: parent.z + 1
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "black"
|
|
||||||
opacity: 0.8
|
|
||||||
}
|
|
||||||
|
|
||||||
property alias password: passwordInput1.text
|
property alias password: passwordInput1.text
|
||||||
|
|
||||||
|
@ -38,6 +38,7 @@ import "../components" as MoneroComponents
|
|||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
visible: false
|
visible: false
|
||||||
|
z: parent.z + 2
|
||||||
|
|
||||||
property alias password: passwordInput.text
|
property alias password: passwordInput.text
|
||||||
property string walletName
|
property string walletName
|
||||||
@ -48,6 +49,7 @@ Item {
|
|||||||
signal closeCallback()
|
signal closeCallback()
|
||||||
|
|
||||||
function open(walletName) {
|
function open(walletName) {
|
||||||
|
inactiveOverlay.visible = true // draw appwindow inactive
|
||||||
root.walletName = walletName ? walletName : ""
|
root.walletName = walletName ? walletName : ""
|
||||||
leftPanel.enabled = false
|
leftPanel.enabled = false
|
||||||
middlePanel.enabled = false
|
middlePanel.enabled = false
|
||||||
@ -59,6 +61,7 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function close() {
|
function close() {
|
||||||
|
inactiveOverlay.visible = false
|
||||||
leftPanel.enabled = true
|
leftPanel.enabled = true
|
||||||
middlePanel.enabled = true
|
middlePanel.enabled = true
|
||||||
titleBar.enabled = true
|
titleBar.enabled = true
|
||||||
@ -166,11 +169,4 @@ Item {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Rectangle {
|
|
||||||
id: bg
|
|
||||||
|
|
||||||
anchors.fill: parent
|
|
||||||
color: "black"
|
|
||||||
opacity: 0.8
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
24
main.qml
24
main.qml
@ -40,6 +40,7 @@ import moneroComponents.NetworkType 1.0
|
|||||||
|
|
||||||
import "components"
|
import "components"
|
||||||
import "wizard"
|
import "wizard"
|
||||||
|
import "js/Windows.js" as Windows
|
||||||
|
|
||||||
ApplicationWindow {
|
ApplicationWindow {
|
||||||
id: appWindow
|
id: appWindow
|
||||||
@ -933,30 +934,9 @@ ApplicationWindow {
|
|||||||
// width: screenWidth //rightPanelExpanded ? 1269 : 1269 - 300
|
// width: screenWidth //rightPanelExpanded ? 1269 : 1269 - 300
|
||||||
// height: 900 //300//maxWindowHeight;
|
// height: 900 //300//maxWindowHeight;
|
||||||
color: "#FFFFFF"
|
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
|
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: {
|
Component.onCompleted: {
|
||||||
x = (Screen.width - width) / 2
|
x = (Screen.width - width) / 2
|
||||||
y = (Screen.height - maxWindowHeight) / 2
|
y = (Screen.height - maxWindowHeight) / 2
|
||||||
|
Loading…
Reference in New Issue
Block a user