chore: send modal adjustments

Closes #15833
This commit is contained in:
Sale Djenic 2024-07-29 08:47:14 +02:00 committed by saledjenic
parent 207902589d
commit 8424cb5b87
3 changed files with 40 additions and 17 deletions

View File

@ -3,12 +3,14 @@ import QtQuick.Controls 2.14
import QtGraphicalEffects 1.13
import StatusQ.Core 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
TabButton {
id: statusSwitchTabButton
id: root
property int fontPixelSize: 15
property bool showBetaTag: false
contentItem: Item {
height: 36
@ -21,16 +23,23 @@ TabButton {
onPressed: mouse.accepted = false
onReleased: mouse.accepted = false
StatusBaseText {
id: label
text: statusSwitchTabButton.text
color: statusSwitchTabButton.checked ?
Theme.palette.statusSwitchTab.selectedTextColor :
Theme.palette.statusSwitchTab.textColor
font.weight: Font.Medium
font.pixelSize: statusSwitchTabButton.fontPixelSize
horizontalAlignment: Text.AlignHCenter
Row {
anchors.centerIn: parent
spacing: 8
StatusBaseText {
id: label
text: root.text
color: root.checked ?
Theme.palette.statusSwitchTab.selectedTextColor :
Theme.palette.statusSwitchTab.textColor
font.weight: Font.Medium
font.pixelSize: root.fontPixelSize
}
StatusBetaTag {
visible: root.showBetaTag
}
}
}
}
@ -39,7 +48,7 @@ TabButton {
id: controlBackground
implicitHeight: 36
implicitWidth: 148
color: statusSwitchTabButton.checked ?
color: root.checked ?
Theme.palette.statusSwitchTab.buttonBackgroundColor :
"transparent"
radius: 8

View File

@ -60,9 +60,11 @@ Item {
}
StatusSwitchTabButton {
text: qsTr("Advanced")
showBetaTag: true
}
StatusSwitchTabButton {
text: qsTr("Custom")
enabled: false
}
}
@ -104,6 +106,8 @@ Item {
reCalculateSuggestedRoute: function() {
root.reCalculateSuggestedRoute()
}
showBetaTag: root.bestRoutes.count > 1
}
}

View File

@ -30,6 +30,8 @@ RowLayout {
property int errorType: Constants.NoError
property string selectedSymbol
property bool showBetaTag: false
spacing: 10
StatusRoundIcon {
@ -42,13 +44,21 @@ RowLayout {
Layout.alignment: Qt.AlignTop
Layout.preferredWidth: root.width
spacing: 4
StatusBaseText {
Row {
Layout.maximumWidth: parent.width
font.pixelSize: 15
font.weight: Font.Medium
color: Theme.palette.directColor1
text: qsTr("Networks")
wrapMode: Text.WordWrap
spacing: 8
StatusBaseText {
font.pixelSize: 15
font.weight: Font.Medium
color: Theme.palette.directColor1
text: qsTr("Networks")
wrapMode: Text.WordWrap
}
StatusBetaTag {
visible: root.showBetaTag
}
}
StatusBaseText {
Layout.maximumWidth: parent.width