added transparent-background, for blocking clicked event
This commit is contained in:
parent
384ce9853b
commit
8c1835950b
15 changed files with 134 additions and 34 deletions
|
@ -12,9 +12,12 @@ Drawer2Type {
|
|||
id: root
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.4375
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.4375
|
||||
|
||||
ColumnLayout {
|
||||
parent: root.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -17,9 +17,12 @@ Drawer2Type {
|
|||
property var noButtonFunction
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.5
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.5
|
||||
|
||||
ColumnLayout {
|
||||
parent: root.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -27,6 +30,8 @@ Drawer2Type {
|
|||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
// visible: false
|
||||
|
||||
spacing: 8
|
||||
|
||||
Header2TextType {
|
||||
|
|
|
@ -9,11 +9,14 @@ Drawer2Type {
|
|||
id: root
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.9
|
||||
|
||||
ColumnLayout {
|
||||
id: backButton
|
||||
|
||||
parent: root.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -28,6 +31,7 @@ Drawer2Type {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: root.contentParent
|
||||
anchors.top: backButton.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -28,7 +28,8 @@ Drawer2Type {
|
|||
property string configFileName: "amnezia_config.vpn"
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.9
|
||||
|
||||
onClose: {
|
||||
configExtension = ".vpn"
|
||||
|
@ -41,6 +42,9 @@ Drawer2Type {
|
|||
|
||||
Header2Type {
|
||||
id: header
|
||||
|
||||
parent: root.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -50,6 +54,8 @@ Drawer2Type {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: root.contentParent
|
||||
|
||||
anchors.top: header.bottom
|
||||
anchors.bottom: parent.bottom
|
||||
contentHeight: content.height + 32
|
||||
|
@ -135,11 +141,15 @@ Drawer2Type {
|
|||
|
||||
parent: root
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height
|
||||
|
||||
contentHeight: parent.height * 0.9
|
||||
|
||||
BackButtonType {
|
||||
id: backButton
|
||||
|
||||
parent: configContentDrawer.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -151,6 +161,8 @@ Drawer2Type {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: configContentDrawer.contentParent
|
||||
|
||||
anchors.top: backButton.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -16,8 +16,6 @@ Item {
|
|||
|
||||
visible: false
|
||||
|
||||
parent: Overlay.overlay
|
||||
|
||||
signal close()
|
||||
|
||||
property bool needCloseButton: true
|
||||
|
@ -27,7 +25,10 @@ Item {
|
|||
property int collapsedHeight: 0
|
||||
|
||||
property bool needCollapsed: false
|
||||
|
||||
property double scaely
|
||||
property int contentHeight: 0
|
||||
property Item contentParent: contentArea
|
||||
// property bool inContentArea: false
|
||||
|
||||
y: parent.height - root.height
|
||||
|
||||
|
@ -37,23 +38,49 @@ Item {
|
|||
id: draw2Background
|
||||
|
||||
anchors { left: root.left; right: root.right; top: root.top }
|
||||
height: root.height
|
||||
height: root.parent.height
|
||||
width: parent.width
|
||||
radius: 16
|
||||
color: root.defaultColor
|
||||
border.color: root.borderColor
|
||||
color: "transparent"
|
||||
border.color: "transparent" //"green"
|
||||
border.width: 1
|
||||
visible: true
|
||||
|
||||
Rectangle {
|
||||
width: parent.radius
|
||||
height: parent.radius
|
||||
anchors.bottom: parent.bottom
|
||||
id: semiArea
|
||||
anchors.top: parent.top
|
||||
height: parent.height - contentHeight
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
color: parent.color
|
||||
visible: true
|
||||
color: "transparent"
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: contentArea
|
||||
anchors.top: semiArea.bottom
|
||||
height: contentHeight
|
||||
radius: 16
|
||||
color: root.defaultColor
|
||||
border.width: 1
|
||||
border.color: root.borderColor
|
||||
width: parent.width
|
||||
visible: true
|
||||
|
||||
Rectangle {
|
||||
width: parent.radius
|
||||
height: parent.radius
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
color: parent.color
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MouseArea {
|
||||
id: fullArea
|
||||
anchors.fill: parent
|
||||
enabled: (root.state === "expanded" || root.state === "opened")
|
||||
onClicked: {
|
||||
|
@ -75,6 +102,7 @@ Item {
|
|||
id: dragArea
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
cursorShape: (root.state === "opened" || root.state === "expanded") ? Qt.PointingHandCursor : Qt.ArrowCursor
|
||||
hoverEnabled: true
|
||||
|
||||
|
@ -108,12 +136,14 @@ Item {
|
|||
}
|
||||
|
||||
onClicked: {
|
||||
if (root.state === "opened") {
|
||||
root.state = "closed"
|
||||
if (root.state === "expanded") {
|
||||
root.state = "collapsed"
|
||||
return
|
||||
}
|
||||
|
||||
if (root.state == "expanded") {
|
||||
root.state == "collapsed"
|
||||
if (root.state === "opened") {
|
||||
root.state = "closed"
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -217,7 +247,7 @@ Item {
|
|||
target: root
|
||||
property: "y"
|
||||
from: parent.height
|
||||
to: parent.height - root.height
|
||||
to: 0
|
||||
duration: 200
|
||||
}
|
||||
|
||||
|
@ -226,9 +256,11 @@ Item {
|
|||
return
|
||||
}
|
||||
|
||||
root.y = 0
|
||||
root.state = "opened"
|
||||
root.visible = true
|
||||
root.y = parent.height - root.height
|
||||
root.height = parent.height
|
||||
contentArea.height = contentHeight
|
||||
|
||||
dragArea.drag.maximumY = parent.height
|
||||
dragArea.drag.minimumY = parent.height - root.height
|
||||
|
|
|
@ -40,6 +40,8 @@ Item {
|
|||
|
||||
property alias menuVisible: menu.visible
|
||||
|
||||
property Item drawerParent: root
|
||||
|
||||
implicitWidth: rootButtonContent.implicitWidth
|
||||
implicitHeight: rootButtonContent.implicitHeight
|
||||
|
||||
|
@ -161,18 +163,21 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
// Drawer2Type {
|
||||
DrawerType {
|
||||
//DrawerType {
|
||||
Drawer2Type {
|
||||
id: menu
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * drawerHeight
|
||||
parent: drawerParent
|
||||
|
||||
// parent: root.parent.parent
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
contentHeight: parent.height * drawerHeight
|
||||
|
||||
ColumnLayout {
|
||||
id: header
|
||||
|
||||
parent: menu.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -187,6 +192,8 @@ Item {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: menu.contentParent
|
||||
|
||||
anchors.top: header.bottom
|
||||
anchors.topMargin: 16
|
||||
contentHeight: col.implicitHeight
|
||||
|
|
|
@ -117,6 +117,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
drawerParent: root
|
||||
|
||||
descriptionText: qsTr("Cipher")
|
||||
headerText: qsTr("Cipher")
|
||||
|
||||
|
|
|
@ -156,6 +156,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
|
||||
drawerParent: root
|
||||
|
||||
enabled: !autoNegotiateEncryprionSwitcher.checked
|
||||
|
||||
descriptionText: qsTr("Hash")
|
||||
|
@ -202,6 +204,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
|
||||
drawerParent: root
|
||||
|
||||
enabled: !autoNegotiateEncryprionSwitcher.checked
|
||||
|
||||
descriptionText: qsTr("Cipher")
|
||||
|
|
|
@ -95,11 +95,14 @@ PageType {
|
|||
parent: root
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.9
|
||||
|
||||
BackButtonType {
|
||||
id: backButton
|
||||
|
||||
parent: configContentDrawer.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -95,6 +95,8 @@ PageType {
|
|||
Layout.fillWidth: true
|
||||
Layout.topMargin: 20
|
||||
|
||||
drawerParent: root
|
||||
|
||||
descriptionText: qsTr("Cipher")
|
||||
headerText: qsTr("Cipher")
|
||||
|
||||
|
|
|
@ -141,7 +141,7 @@ PageType {
|
|||
questionDrawer.noButtonText = qsTr("Cancel")
|
||||
|
||||
questionDrawer.yesButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
questionDrawer.close()
|
||||
PageController.showBusyIndicator(true)
|
||||
if (ServersModel.isDefaultServerCurrentlyProcessed() && ConnectionController.isConnected) {
|
||||
ConnectionController.closeConnection()
|
||||
|
@ -150,9 +150,9 @@ PageType {
|
|||
PageController.showBusyIndicator(false)
|
||||
}
|
||||
questionDrawer.noButtonFunction = function() {
|
||||
questionDrawer.visible = false
|
||||
questionDrawer.close()
|
||||
}
|
||||
questionDrawer.visible = true
|
||||
questionDrawer.open()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -192,6 +192,8 @@ PageType {
|
|||
|
||||
QuestionDrawer {
|
||||
id: questionDrawer
|
||||
|
||||
parent: root
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,8 @@ PageType {
|
|||
|
||||
parent: root
|
||||
width: root.width
|
||||
height: root.height * 0.35
|
||||
height: root.height // * 0.35
|
||||
contentHeight: root.height * 0.35
|
||||
|
||||
onVisibleChanged: {
|
||||
if (serverNameEditDrawer.visible) {
|
||||
|
@ -89,6 +90,8 @@ PageType {
|
|||
}
|
||||
|
||||
ColumnLayout {
|
||||
parent: serverNameEditDrawer.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -108,6 +108,8 @@ PageType {
|
|||
DropDownType {
|
||||
id: selector
|
||||
|
||||
drawerParent: root
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 32
|
||||
Layout.leftMargin: 16
|
||||
|
@ -264,11 +266,14 @@ PageType {
|
|||
id: moreActionsDrawer
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.4375
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.4375
|
||||
|
||||
parent: root
|
||||
|
||||
FlickableType {
|
||||
parent: moreActionsDrawer.contentParent
|
||||
|
||||
anchors.fill: parent
|
||||
contentHeight: moreActionsDrawerContent.height
|
||||
ColumnLayout {
|
||||
|
@ -331,13 +336,16 @@ PageType {
|
|||
id: importSitesDrawer
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.4375
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.4375
|
||||
|
||||
parent: root
|
||||
|
||||
BackButtonType {
|
||||
id: importSitesDrawerBackButton
|
||||
|
||||
parent: importSitesDrawer.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -349,6 +357,8 @@ PageType {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: importSitesDrawer.contentParent
|
||||
|
||||
anchors.top: importSitesDrawerBackButton.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -101,13 +101,16 @@ PageType {
|
|||
id: showDetailsDrawer
|
||||
|
||||
width: parent.width
|
||||
height: parent.height * 0.9
|
||||
height: parent.height
|
||||
contentHeight: parent.height * 0.9
|
||||
|
||||
parent: root
|
||||
|
||||
BackButtonType {
|
||||
id: showDetailsBackButton
|
||||
|
||||
parent: showDetailsDrawer.contentParent
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
@ -119,6 +122,8 @@ PageType {
|
|||
}
|
||||
|
||||
FlickableType {
|
||||
parent: showDetailsDrawer.contentParent
|
||||
|
||||
anchors.top: showDetailsBackButton.bottom
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
|
|
|
@ -179,6 +179,8 @@ PageType {
|
|||
DropDownType {
|
||||
id: serverSelector
|
||||
|
||||
drawerParent: root
|
||||
|
||||
signal severSelectorIndexChanged
|
||||
property int currentIndex: 0
|
||||
|
||||
|
@ -241,6 +243,8 @@ PageType {
|
|||
DropDownType {
|
||||
id: protocolSelector
|
||||
|
||||
drawerParent: root
|
||||
|
||||
visible: accessTypeSelector.currentIndex === 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
@ -330,6 +334,8 @@ PageType {
|
|||
DropDownType {
|
||||
id: exportTypeSelector
|
||||
|
||||
drawerParent: root
|
||||
|
||||
property int currentIndex: 0
|
||||
|
||||
Layout.fillWidth: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue