mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Locale: fixed all Qt.locale calls to respect the user selected locale.
This commit is contained in:
@@ -5,16 +5,17 @@ import qs.Commons
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
|
||||
property var locale: I18n.langCode ? Qt.locale(I18n.langCode) : Qt.locale()
|
||||
property date sampleDate: new Date() // Dec 25, 2023, 2:30:45.123 PM
|
||||
|
||||
signal tokenClicked(string token)
|
||||
|
||||
color: Color.mSurface
|
||||
border.color: Color.mOutline
|
||||
border.width: Style.borderS
|
||||
radius: Style.radiusM
|
||||
|
||||
property date sampleDate: new Date() // Dec 25, 2023, 2:30:45.123 PM
|
||||
|
||||
// Signal emitted when a token is clicked
|
||||
signal tokenClicked(string token)
|
||||
|
||||
ColumnLayout {
|
||||
id: column
|
||||
anchors.fill: parent
|
||||
@@ -312,7 +313,7 @@ Rectangle {
|
||||
|
||||
NText {
|
||||
anchors.centerIn: parent
|
||||
text: Qt.locale().toString(root.sampleDate, modelData.token)
|
||||
text: locale.toString(root.sampleDate, modelData.token)
|
||||
color: tokenMouseArea.containsMouse ? Color.mOnPrimary : Color.mSurfaceVariant
|
||||
pointSize: Style.fontSizeS
|
||||
|
||||
|
||||
Reference in New Issue
Block a user