mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-05-18 00:45:58 +03:00
Compare commits
2 Commits
improve_na
...
fix/ui-fix
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6572b83a97 | ||
|
|
7aa4b54196 |
@@ -227,5 +227,6 @@
|
||||
<file>ui/qml/Components/HomeSplitTunnelingDrawer.qml</file>
|
||||
<file>images/controls/split-tunneling.svg</file>
|
||||
<file>ui/qml/Controls2/DrawerType2.qml</file>
|
||||
<file>ui/qml/Components/FadeBehavior.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -61,7 +61,7 @@ void ConnectionController::onConnectionStateChanged(Vpn::ConnectionState state)
|
||||
m_state = state;
|
||||
|
||||
m_isConnected = false;
|
||||
m_connectionStateText = tr("Connection...");
|
||||
m_connectionStateText = tr("Connecting...");
|
||||
switch (state) {
|
||||
case Vpn::ConnectionState::Connected: {
|
||||
m_isConnectionInProgress = false;
|
||||
|
||||
35
client/ui/qml/Components/FadeBehavior.qml
Normal file
35
client/ui/qml/Components/FadeBehavior.qml
Normal file
@@ -0,0 +1,35 @@
|
||||
import QtQuick 2.15
|
||||
import QtQml 2.15
|
||||
|
||||
Behavior {
|
||||
id: root
|
||||
|
||||
property QtObject fadeTarget: targetProperty.object
|
||||
property string fadeProperty: "opacity"
|
||||
property int fadeDuration: 200
|
||||
property int fadeValue: 0
|
||||
property string easingType: "Quad"
|
||||
|
||||
property alias exitAnimation: exitAnimation
|
||||
property alias enterAnimation: enterAnimation
|
||||
|
||||
SequentialAnimation {
|
||||
NumberAnimation {
|
||||
id: exitAnimation
|
||||
target: root.fadeTarget
|
||||
property: root.fadeProperty
|
||||
duration: root.fadeDuration
|
||||
to: root.fadeValue
|
||||
easing.type: root.easingType === "Linear" ? Easing.Linear : Easing["In"+root.easingType]
|
||||
}
|
||||
PropertyAction { }
|
||||
NumberAnimation {
|
||||
id: enterAnimation
|
||||
target: root.fadeTarget
|
||||
property: root.fadeProperty
|
||||
duration: root.fadeDuration
|
||||
to: target[property]
|
||||
easing.type: root.easingType === "Linear" ? Easing.Linear : Easing["Out"+root.easingType]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,6 +159,20 @@ PageType {
|
||||
Layout.bottomMargin: 44
|
||||
Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter
|
||||
text: ServersModel.defaultServerDescriptionCollapsed
|
||||
|
||||
FadeBehavior on text { }
|
||||
|
||||
Connections {
|
||||
target: drawer
|
||||
|
||||
function onOpen() {
|
||||
collapsedServerMenuDescription.text = ServersModel.defaultServerDescriptionExpanded
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
collapsedServerMenuDescription.text = ServersModel.defaultServerDescriptionCollapsed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -197,7 +211,21 @@ PageType {
|
||||
Layout.fillWidth: true
|
||||
horizontalAlignment: Qt.AlignHCenter
|
||||
verticalAlignment: Qt.AlignVCenter
|
||||
text: ServersModel.defaultServerDescriptionExpanded
|
||||
text: ServersModel.defaultServerDescriptionCollapsed
|
||||
|
||||
FadeBehavior on text { }
|
||||
|
||||
Connections {
|
||||
target: drawer
|
||||
|
||||
function onOpen() {
|
||||
expandedServersMenuDescription.text = ServersModel.defaultServerDescriptionExpanded
|
||||
}
|
||||
|
||||
function onClose() {
|
||||
expandedServersMenuDescription.text = ServersModel.defaultServerDescriptionCollapsed
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
||||
Reference in New Issue
Block a user