mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 10:33:34 +00:00
Locale: fixed all Qt.locale calls to respect the user selected locale.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -5,10 +5,13 @@ import qs.Widgets
|
||||
import Quickshell
|
||||
|
||||
Item {
|
||||
|
||||
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
|
||||
property var now
|
||||
property color backgroundColor: Color.mPrimary
|
||||
property color clockColor: Color.mOnPrimary
|
||||
property color progressColor: Color.mError
|
||||
|
||||
anchors.fill: parent
|
||||
|
||||
// Digital clock's seconds circular progress
|
||||
@@ -55,7 +58,7 @@ Item {
|
||||
|
||||
NText {
|
||||
text: {
|
||||
var t = Settings.data.location.use12hourFormat ? Qt.locale().toString(now, "hh AP") : Qt.locale().toString(now, "HH")
|
||||
var t = Settings.data.location.use12hourFormat ? locale.toString(now, "hh AP") : locale.toString(now, "HH")
|
||||
return t.split(" ")[0]
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import qs.Widgets
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
|
||||
property ShellScreen screen
|
||||
|
||||
// Widget properties passed from Bar.qml for per-instance settings
|
||||
@@ -62,7 +63,7 @@ Rectangle {
|
||||
spacing: Settings.data.bar.showCapsule ? -4 : -2
|
||||
Repeater {
|
||||
id: repeater
|
||||
model: Qt.locale().toString(now, formatHorizontal.trim()).split("\\n")
|
||||
model: locale.toString(now, formatHorizontal.trim()).split("\\n")
|
||||
NText {
|
||||
visible: text !== ""
|
||||
text: modelData
|
||||
@@ -95,7 +96,7 @@ Rectangle {
|
||||
anchors.centerIn: parent
|
||||
spacing: -2
|
||||
Repeater {
|
||||
model: Qt.locale().toString(now, formatVertical.trim()).split(" ")
|
||||
model: locale.toString(now, formatVertical.trim()).split(" ")
|
||||
delegate: NText {
|
||||
visible: text !== ""
|
||||
text: modelData
|
||||
|
||||
Reference in New Issue
Block a user