Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[localeq] move to using Drawer for fine tuning options #2045

Merged
merged 1 commit into from Sep 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 25 additions & 20 deletions src/modules/localeq/Offline.qml
Expand Up @@ -25,6 +25,12 @@ Page {
property string currentRegion
property string currentZone

readonly property color backgroundColor: Kirigami.Theme.backgroundColor //"#F5F5F5"
readonly property color backgroundLighterColor: "#ffffff"
readonly property color highlightColor: Kirigami.Theme.highlightColor //"#3498DB"
readonly property color textColor: Kirigami.Theme.textColor
readonly property color highlightedTextColor: Kirigami.Theme.highlightedTextColor

StackView {
id: stack
anchors.fill: parent
Expand All @@ -36,7 +42,7 @@ Page {

id: region
anchors.horizontalCenter: parent.horizontalCenter
color: Kirigami.Theme.textColor
color: textColor
horizontalAlignment: Text.AlignCenter
text: qsTr("Select your preferred Region, or use the default settings.")
}
Expand All @@ -61,18 +67,16 @@ Page {

z: parent.z - 1
anchors.fill: parent
color: "#BDC3C7"
radius: 5
opacity: 0.7
color: backgroundLighterColor
}

model: config.regionModel
currentIndex: -1
currentIndex: 1 // offline install, means locale from config
delegate: ItemDelegate {

hoverEnabled: true
width: parent.width
height: 30
height: 28
highlighted: ListView.isCurrentItem

Label {
Expand All @@ -81,13 +85,13 @@ Page {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
height: 30
color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
height: 28
color: highlighted ? highlightedTextColor : textColor

background: Rectangle {

color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor
opacity: highlighted || hovered ? 0.5 : 0.3
color: highlighted || hovered ? highlightColor : backgroundLighterColor
opacity: highlighted || hovered ? 0.5 : 1
}
}

Expand All @@ -112,7 +116,7 @@ Page {

id: zone
anchors.horizontalCenter: parent.horizontalCenter
color: Kirigami.Theme.textColor
color: textColor
text: qsTr("Select your preferred Zone within your Region.")
}

Expand All @@ -136,18 +140,19 @@ Page {

z: parent.z - 1
anchors.fill: parent
color: "#BDC3C7"
radius: 5
opacity: 0.7
color: backgroundLighterColor
//radius: 5
//opacity: 0.7
}

model: config.regionalZonesModel
currentIndex : -1
currentIndex : 99 // index of New York
Component.onCompleted: positionViewAtIndex(currentIndex, ListView.Center)
delegate: ItemDelegate {

hoverEnabled: true
width: parent.width
height: 30
height: 24
highlighted: ListView.isCurrentItem

Label {
Expand All @@ -156,13 +161,13 @@ Page {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
width: parent.width
height: 30
color: highlighted ? Kirigami.Theme.highlightedTextColor : Kirigami.Theme.textColor
height: 24
color: highlighted ? highlightedTextColor : textColor

background: Rectangle {

color: highlighted || hovered ? Kirigami.Theme.highlightColor : "white" //Kirigami.Theme.backgroundColor
opacity: highlighted || hovered ? 0.5 : 0.3
color: highlighted || hovered ? highlightColor : backgroundLighterColor
opacity: highlighted || hovered ? 0.5 : 1
}
}

Expand Down
204 changes: 0 additions & 204 deletions src/modules/localeq/i18n.qml

This file was deleted.

1 change: 0 additions & 1 deletion src/modules/localeq/img/chevron-left-solid.svg

This file was deleted.

2 changes: 0 additions & 2 deletions src/modules/localeq/img/chevron-left-solid.svg.license

This file was deleted.