main: blur on PasswordDialog, InputDialog or ProcessingSplash

pull/2/head
xiphon 4 years ago
parent 98279f54fb
commit 3e07ecabf9

@ -53,11 +53,9 @@ Window {
signal rejected() signal rejected()
onClosing: { onClosing: {
inactiveOverlay.visible = false;
} }
function open() { function open() {
inactiveOverlay.visible = true;
show(); show();
} }

@ -46,7 +46,6 @@ Item {
signal rejected() signal rejected()
function open(prepopulate) { function open(prepopulate) {
inactiveOverlay.visible = true
leftPanel.enabled = false leftPanel.enabled = false
middlePanel.enabled = false middlePanel.enabled = false
titleBar.state = "essentials" titleBar.state = "essentials"
@ -56,7 +55,6 @@ Item {
} }
function close() { function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true leftPanel.enabled = true
middlePanel.enabled = true middlePanel.enabled = true
titleBar.state = "default" titleBar.state = "default"

@ -68,7 +68,6 @@ Item {
passwordInput1.text = "" passwordInput1.text = ""
passwordInput2.text = "" passwordInput2.text = ""
passwordInput1.forceActiveFocus(); passwordInput1.forceActiveFocus();
inactiveOverlay.visible = true // draw appwindow inactive
root.walletName = walletName ? walletName : "" root.walletName = walletName ? walletName : ""
errorTextLabel.text = errorText ? errorText : ""; errorTextLabel.text = errorText ? errorText : "";
leftPanel.enabled = false leftPanel.enabled = false
@ -106,7 +105,6 @@ Item {
} }
function close() { function close() {
inactiveOverlay.visible = false
leftPanel.enabled = true leftPanel.enabled = true
middlePanel.enabled = true middlePanel.enabled = true
wizard.enabled = true wizard.enabled = true
@ -125,7 +123,6 @@ Item {
} }
ColumnLayout { ColumnLayout {
z: inactiveOverlay.z + 1
id: mainLayout id: mainLayout
spacing: 10 spacing: 10
anchors { fill: parent; margins: 35 } anchors { fill: parent; margins: 35 }

@ -31,6 +31,7 @@ import QtQuick.Window 2.0
import QtQuick.Controls 1.1 import QtQuick.Controls 1.1
import QtQuick.Controls.Styles 1.1 import QtQuick.Controls.Styles 1.1
import QtQuick.Dialogs 1.2 import QtQuick.Dialogs 1.2
import QtGraphicalEffects 1.0
import moneroComponents.Wallet 1.0 import moneroComponents.Wallet 1.0
import moneroComponents.PendingTransaction 1.0 import moneroComponents.PendingTransaction 1.0
@ -1089,7 +1090,6 @@ ApplicationWindow {
leftPanel.enabled = false; leftPanel.enabled = false;
middlePanel.enabled = false; middlePanel.enabled = false;
titleBar.enabled = false; titleBar.enabled = false;
inactiveOverlay.visible = true;
splash.show(); splash.show();
} }
@ -1101,7 +1101,6 @@ ApplicationWindow {
leftPanel.enabled = true leftPanel.enabled = true
middlePanel.enabled = true middlePanel.enabled = true
titleBar.enabled = true titleBar.enabled = true
inactiveOverlay.visible = false;
} }
} }
@ -1585,96 +1584,108 @@ ApplicationWindow {
} }
] ]
LeftPanel { Item {
id: leftPanel id: blurredArea
anchors.top: parent.top anchors.fill: parent
anchors.left: parent.left
anchors.bottom: parent.bottom LeftPanel {
visible: rootItem.state == "normal" && middlePanel.state != "Merchant" id: leftPanel
currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0 anchors.top: parent.top
currentAccountLabel: { anchors.left: parent.left
if (currentWallet) { anchors.bottom: parent.bottom
return currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0); visible: rootItem.state == "normal" && middlePanel.state != "Merchant"
currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0
currentAccountLabel: {
if (currentWallet) {
return currentWallet.getSubaddressLabel(currentWallet.currentSubaddressAccount, 0);
}
return qsTr("Primary account") + translationManager.emptyString;
} }
return qsTr("Primary account") + translationManager.emptyString;
}
onTransferClicked: { onTransferClicked: {
middlePanel.state = "Transfer"; middlePanel.state = "Transfer";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onReceiveClicked: { onReceiveClicked: {
middlePanel.state = "Receive"; middlePanel.state = "Receive";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onMerchantClicked: { onMerchantClicked: {
middlePanel.state = "Merchant"; middlePanel.state = "Merchant";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onTxkeyClicked: { onTxkeyClicked: {
middlePanel.state = "TxKey"; middlePanel.state = "TxKey";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onSharedringdbClicked: { onSharedringdbClicked: {
middlePanel.state = "SharedRingDB"; middlePanel.state = "SharedRingDB";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onHistoryClicked: { onHistoryClicked: {
middlePanel.state = "History"; middlePanel.state = "History";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onAddressBookClicked: { onAddressBookClicked: {
middlePanel.state = "AddressBook"; middlePanel.state = "AddressBook";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onMiningClicked: { onMiningClicked: {
middlePanel.state = "Mining"; middlePanel.state = "Mining";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onSignClicked: { onSignClicked: {
middlePanel.state = "Sign"; middlePanel.state = "Sign";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
} }
onSettingsClicked: {
middlePanel.state = "Settings";
middlePanel.flickable.contentY = 0;
updateBalance();
}
onSettingsClicked: { onAccountClicked: {
middlePanel.state = "Settings"; middlePanel.state = "Account";
middlePanel.flickable.contentY = 0; middlePanel.flickable.contentY = 0;
updateBalance(); updateBalance();
}
} }
onAccountClicked: { MiddlePanel {
middlePanel.state = "Account"; id: middlePanel
middlePanel.flickable.contentY = 0; accountView.currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0
updateBalance(); anchors.top: parent.top
anchors.bottom: parent.bottom
anchors.left: leftPanel.visible ? leftPanel.right : parent.left
anchors.right: parent.right
state: "Transfer"
} }
} }
FastBlur {
MiddlePanel { id: blur
id: middlePanel anchors.fill: blurredArea
accountView.currentAccountIndex: currentWallet ? currentWallet.currentSubaddressAccount : 0 source: blurredArea
anchors.top: parent.top radius: 64
anchors.bottom: parent.bottom visible: passwordDialog.visible || inputDialog.visible || splash.visible
anchors.left: leftPanel.visible ? leftPanel.right : parent.left
anchors.right: parent.right
state: "Transfer"
} }
WizardController { WizardController {
@ -2094,11 +2105,11 @@ ApplicationWindow {
Rectangle { Rectangle {
id: inactiveOverlay id: inactiveOverlay
visible: false visible: blur.visible
anchors.fill: parent anchors.fill: parent
anchors.topMargin: titleBar.height anchors.topMargin: titleBar.height
color: MoneroComponents.Style.blackTheme ? "black" : "white" color: MoneroComponents.Style.blackTheme ? "black" : "white"
opacity: MoneroComponents.Style.blackTheme ? 0.8 : 0.9 opacity: isOpenGL ? 0.3 : inputDialog.visible || splash.visible ? 0.7 : 1.0
MoneroEffects.ColorTransition { MoneroEffects.ColorTransition {
targetObj: parent targetObj: parent