Merge pull request #718 from amnezia-vpn/bugfix/cancel-button-on-install-page
fixed display of cancel button on install/uninstall pages
This commit is contained in:
commit
e7bd24f065
5 changed files with 16 additions and 6 deletions
|
@ -14,8 +14,8 @@ import "../Config"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
Component.onCompleted: PageController.disableControls(true)
|
||||
Component.onDestruction: PageController.disableControls(false)
|
||||
Component.onCompleted: PageController.disableTabBar(true)
|
||||
Component.onDestruction: PageController.disableTabBar(false)
|
||||
|
||||
SortFilterProxyModel {
|
||||
id: proxyServersModel
|
||||
|
|
|
@ -14,8 +14,8 @@ import "../Config"
|
|||
PageType {
|
||||
id: root
|
||||
|
||||
Component.onCompleted: PageController.disableControls(true)
|
||||
Component.onDestruction: PageController.disableControls(false)
|
||||
Component.onCompleted: PageController.disableTabBar(true)
|
||||
Component.onDestruction: PageController.disableTabBar(false)
|
||||
|
||||
property bool isTimerRunning: true
|
||||
property string progressBarText: qsTr("Usually it takes no more than 5 minutes")
|
||||
|
|
|
@ -49,6 +49,10 @@ PageType {
|
|||
isControlsDisabled = disabled
|
||||
}
|
||||
|
||||
function onDisableTabBar(disabled) {
|
||||
isControlsDisabled = disabled
|
||||
}
|
||||
|
||||
function onEscapePressed() {
|
||||
if (isControlsDisabled) {
|
||||
return
|
||||
|
|
|
@ -15,6 +15,7 @@ PageType {
|
|||
id: root
|
||||
|
||||
property bool isControlsDisabled: false
|
||||
property bool isTabBarDisabled: false
|
||||
|
||||
Connections {
|
||||
target: PageController
|
||||
|
@ -38,6 +39,10 @@ PageType {
|
|||
isControlsDisabled = disabled
|
||||
}
|
||||
|
||||
function onDisableTabBar(disabled) {
|
||||
isTabBarDisabled = disabled
|
||||
}
|
||||
|
||||
function onClosePage() {
|
||||
if (tabBarStackView.depth <= 1) {
|
||||
PageController.hideWindow()
|
||||
|
@ -64,7 +69,7 @@ PageType {
|
|||
}
|
||||
|
||||
function onEscapePressed() {
|
||||
if (root.isControlsDisabled) {
|
||||
if (root.isControlsDisabled || root.isTabBarDisabled) {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -180,7 +185,7 @@ PageType {
|
|||
leftPadding: 96
|
||||
rightPadding: 96
|
||||
|
||||
enabled: !root.isControlsDisabled
|
||||
enabled: !root.isControlsDisabled && !root.isTabBarDisabled
|
||||
|
||||
background: Shape {
|
||||
width: parent.width
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue