mirror of
https://github.com/end-4/dots-hyprland.git
synced 2026-06-05 14:59:27 -05:00
Weather settings in settings app (#2337)
This commit is contained in:
@@ -177,4 +177,51 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ContentSection {
|
||||
icon: "weather_mix"
|
||||
title: Translation.tr("Weather")
|
||||
ConfigRow {
|
||||
ConfigSwitch {
|
||||
buttonIcon: "assistant_navigation"
|
||||
text: Translation.tr("Enable GPS based location")
|
||||
checked: Config.options.bar.weather.enableGPS
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.weather.enableGPS = checked;
|
||||
}
|
||||
}
|
||||
ConfigSwitch {
|
||||
buttonIcon: "thermometer"
|
||||
text: Translation.tr("Fahrenheit unit")
|
||||
checked: Config.options.bar.weather.useUSCS
|
||||
onCheckedChanged: {
|
||||
Config.options.bar.weather.useUSCS = checked;
|
||||
}
|
||||
StyledToolTip {
|
||||
text: Translation.tr("It may take a few seconds to update")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MaterialTextArea {
|
||||
Layout.fillWidth: true
|
||||
placeholderText: Translation.tr("City name")
|
||||
text: Config.options.bar.weather.city
|
||||
wrapMode: TextEdit.Wrap
|
||||
onTextChanged: {
|
||||
Config.options.bar.weather.city = text;
|
||||
}
|
||||
}
|
||||
ConfigSpinBox {
|
||||
icon: "av_timer"
|
||||
text: Translation.tr("Polling interval (m)")
|
||||
value: Config.options.bar.weather.fetchInterval
|
||||
from: 5
|
||||
to: 50
|
||||
stepSize: 5
|
||||
onValueChanged: {
|
||||
Config.options.bar.weather.fetchInterval = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,6 +16,13 @@ Singleton {
|
||||
readonly property bool useUSCS: Config.options.bar.weather.useUSCS
|
||||
property bool gpsActive: Config.options.bar.weather.enableGPS
|
||||
|
||||
onUseUSCSChanged: {
|
||||
root.getData();
|
||||
}
|
||||
onCityChanged: {
|
||||
root.getData();
|
||||
}
|
||||
|
||||
property var location: ({
|
||||
valid: false,
|
||||
lat: 0,
|
||||
|
||||
Reference in New Issue
Block a user