mirror of
https://github.com/amnezia-vpn/amnezia-client.git
synced 2026-10-23 03:26:59 +09:00
chore: minor ui fixes (#3289)
This commit is contained in:
1 parent
8940f8e273
commit
a36399a4c3
7 files changed
+32
-20
No files matched your search
@@ -42,9 +42,6 @@ ItemDelegate {
|
||||
if (!root.enabled) {
|
||||
return AmneziaStyle.color.bgSurface
|
||||
}
|
||||
if (root.down || root.hovered) {
|
||||
return AmneziaStyle.color.bgStateLayer
|
||||
}
|
||||
return root.critical ? AmneziaStyle.color.promoOverlay : AmneziaStyle.color.bgBase
|
||||
}
|
||||
border.width: 1
|
||||
@@ -55,8 +52,16 @@ ItemDelegate {
|
||||
return root.critical ? AmneziaStyle.color.promoRecommendation : AmneziaStyle.color.borderSoft
|
||||
}
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 150 }
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
radius: parent.radius
|
||||
color: AmneziaStyle.color.bgStateLayer
|
||||
opacity: root.enabled && (root.down || root.hovered) ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 150 }
|
||||
}
|
||||
}
|
||||
|
||||
FocusRingType {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
import Style 1.0
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@ ItemDelegate {
|
||||
property bool destructive: false
|
||||
property bool locked: false
|
||||
property bool showSeparator: true
|
||||
property bool interactive: true
|
||||
property bool dense: false
|
||||
property bool trailingContentVisible: trailingSlot.children.length > 0
|
||||
property color separatorColor: AmneziaStyle.color.borderSoft
|
||||
@@ -31,8 +32,8 @@ ItemDelegate {
|
||||
padding: 12
|
||||
spacing: 12
|
||||
|
||||
hoverEnabled: true
|
||||
focusPolicy: Qt.TabFocus
|
||||
hoverEnabled: root.interactive
|
||||
focusPolicy: root.interactive ? Qt.TabFocus : Qt.NoFocus
|
||||
opacity: enabled ? 1.0 : 0.4
|
||||
|
||||
icon.width: 24
|
||||
@@ -46,7 +47,7 @@ ItemDelegate {
|
||||
Keys.onReturnPressed: root.click()
|
||||
|
||||
background: ListItemBackgroundType {
|
||||
control: root
|
||||
control: root.interactive ? root : null
|
||||
selected: root.highlighted
|
||||
showSeparator: root.showSeparator
|
||||
separatorColor: root.separatorColor
|
||||
@@ -90,7 +91,7 @@ ItemDelegate {
|
||||
if (root.locked) {
|
||||
return AmneziaStyle.color.textSecondary
|
||||
}
|
||||
if (root.enabled && root.down || root.highlighted) {
|
||||
if (root.interactive && root.enabled && root.down || root.highlighted) {
|
||||
return AmneziaStyle.color.textTertiary
|
||||
}
|
||||
if (root.enabled && root.hovered) {
|
||||
|
||||
@@ -27,17 +27,20 @@ RadioButton {
|
||||
background: Rectangle {
|
||||
radius: 16
|
||||
|
||||
color: {
|
||||
if (root.checked) {
|
||||
return AmneziaStyle.color.bgSurfaceAlt
|
||||
}
|
||||
return root.enabled && (root.hovered || root.down) ? AmneziaStyle.color.bgStateLayer : AmneziaStyle.color.transparent
|
||||
}
|
||||
color: root.checked ? AmneziaStyle.color.bgSurfaceAlt : AmneziaStyle.color.transparent
|
||||
border.width: root.checked || (root.enabled && root.down) ? 1 : 0
|
||||
border.color: root.checked ? AmneziaStyle.color.accentLight : AmneziaStyle.color.borderMedium
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation { duration: 150 }
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
|
||||
radius: parent.radius
|
||||
color: AmneziaStyle.color.bgStateLayer
|
||||
opacity: !root.checked && root.enabled && (root.hovered || root.down) ? 1 : 0
|
||||
|
||||
Behavior on opacity {
|
||||
NumberAnimation { duration: 150 }
|
||||
}
|
||||
}
|
||||
|
||||
FocusRingType {
|
||||
|
||||
@@ -34,6 +34,8 @@ Popup {
|
||||
|
||||
parent: Overlay.overlay
|
||||
|
||||
z: 1
|
||||
|
||||
width: Math.min(parent.width - 32, 520)
|
||||
x: Math.round((parent.width - width) / 2)
|
||||
y: parent.height - height - 16 - root.bottomOffset - PageController.imeHeight
|
||||
|
||||
@@ -113,7 +113,7 @@ PageType {
|
||||
objectName: "homeColumnLayout"
|
||||
|
||||
anchors.fill: parent
|
||||
anchors.topMargin: PageController.safeAreaTopMargin
|
||||
anchors.topMargin: 12 + PageController.safeAreaTopMargin
|
||||
anchors.bottomMargin: 12
|
||||
|
||||
spacing: 0
|
||||
|
||||
@@ -202,8 +202,7 @@ PageType {
|
||||
|
||||
visible: infoRow.value !== ""
|
||||
|
||||
focusPolicy: Qt.NoFocus
|
||||
hoverEnabled: false
|
||||
interactive: false
|
||||
showSeparator: false
|
||||
leadingSlotWidth: 24
|
||||
|
||||
|
||||
Reference in new issue
Block a user