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
|
@ -111,6 +111,7 @@ signals:
|
||||||
|
|
||||||
void showBusyIndicator(bool visible);
|
void showBusyIndicator(bool visible);
|
||||||
void disableControls(bool disabled);
|
void disableControls(bool disabled);
|
||||||
|
void disableTabBar(bool disabled);
|
||||||
|
|
||||||
void hideMainWindow();
|
void hideMainWindow();
|
||||||
void raiseMainWindow();
|
void raiseMainWindow();
|
||||||
|
|
|
@ -14,8 +14,8 @@ import "../Config"
|
||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
Component.onCompleted: PageController.disableControls(true)
|
Component.onCompleted: PageController.disableTabBar(true)
|
||||||
Component.onDestruction: PageController.disableControls(false)
|
Component.onDestruction: PageController.disableTabBar(false)
|
||||||
|
|
||||||
SortFilterProxyModel {
|
SortFilterProxyModel {
|
||||||
id: proxyServersModel
|
id: proxyServersModel
|
||||||
|
|
|
@ -14,8 +14,8 @@ import "../Config"
|
||||||
PageType {
|
PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
Component.onCompleted: PageController.disableControls(true)
|
Component.onCompleted: PageController.disableTabBar(true)
|
||||||
Component.onDestruction: PageController.disableControls(false)
|
Component.onDestruction: PageController.disableTabBar(false)
|
||||||
|
|
||||||
property bool isTimerRunning: true
|
property bool isTimerRunning: true
|
||||||
property string progressBarText: qsTr("Usually it takes no more than 5 minutes")
|
property string progressBarText: qsTr("Usually it takes no more than 5 minutes")
|
||||||
|
|
|
@ -49,6 +49,10 @@ PageType {
|
||||||
isControlsDisabled = disabled
|
isControlsDisabled = disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onDisableTabBar(disabled) {
|
||||||
|
isControlsDisabled = disabled
|
||||||
|
}
|
||||||
|
|
||||||
function onEscapePressed() {
|
function onEscapePressed() {
|
||||||
if (isControlsDisabled) {
|
if (isControlsDisabled) {
|
||||||
return
|
return
|
||||||
|
|
|
@ -15,6 +15,7 @@ PageType {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property bool isControlsDisabled: false
|
property bool isControlsDisabled: false
|
||||||
|
property bool isTabBarDisabled: false
|
||||||
|
|
||||||
Connections {
|
Connections {
|
||||||
target: PageController
|
target: PageController
|
||||||
|
@ -38,6 +39,10 @@ PageType {
|
||||||
isControlsDisabled = disabled
|
isControlsDisabled = disabled
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function onDisableTabBar(disabled) {
|
||||||
|
isTabBarDisabled = disabled
|
||||||
|
}
|
||||||
|
|
||||||
function onClosePage() {
|
function onClosePage() {
|
||||||
if (tabBarStackView.depth <= 1) {
|
if (tabBarStackView.depth <= 1) {
|
||||||
PageController.hideWindow()
|
PageController.hideWindow()
|
||||||
|
@ -64,7 +69,7 @@ PageType {
|
||||||
}
|
}
|
||||||
|
|
||||||
function onEscapePressed() {
|
function onEscapePressed() {
|
||||||
if (root.isControlsDisabled) {
|
if (root.isControlsDisabled || root.isTabBarDisabled) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +185,7 @@ PageType {
|
||||||
leftPadding: 96
|
leftPadding: 96
|
||||||
rightPadding: 96
|
rightPadding: 96
|
||||||
|
|
||||||
enabled: !root.isControlsDisabled
|
enabled: !root.isControlsDisabled && !root.isTabBarDisabled
|
||||||
|
|
||||||
background: Shape {
|
background: Shape {
|
||||||
width: parent.width
|
width: parent.width
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue