forked from Shinonome/dots-hyprland
settings: make language selection notice more material
This commit is contained in:
@@ -465,7 +465,8 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSection {
|
||||
|
||||
ContentSection {
|
||||
title: Translation.tr("Language")
|
||||
|
||||
ContentSubsection {
|
||||
@@ -493,7 +494,10 @@ ContentPage {
|
||||
for (var i = 0; i < Translation.availableLanguages.length; i++) {
|
||||
var lang = Translation.availableLanguages[i];
|
||||
var displayName = lang.replace('_', '-');
|
||||
baseOptions.push({ displayName: displayName, value: lang });
|
||||
baseOptions.push({
|
||||
displayName: displayName,
|
||||
value: lang
|
||||
});
|
||||
}
|
||||
|
||||
return baseOptions;
|
||||
@@ -503,32 +507,33 @@ ContentPage {
|
||||
Rectangle {
|
||||
id: reloadNotice
|
||||
visible: false
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
height: noticeText.implicitHeight + 16
|
||||
radius: 8
|
||||
color: Appearance.m3colors.m3secondaryContainer
|
||||
border.color: Appearance.m3colors.m3outline
|
||||
border.width: 1
|
||||
color: Appearance.colors.colPrimaryContainer
|
||||
Layout.fillWidth: true
|
||||
implicitWidth: languageRowLayout.implicitWidth + languageRowLayout.anchors.margins * 2
|
||||
implicitHeight: languageRowLayout.implicitHeight + languageRowLayout.anchors.margins * 2
|
||||
|
||||
Row {
|
||||
RowLayout {
|
||||
id: languageRowLayout
|
||||
anchors.fill: parent
|
||||
anchors.margins: 8
|
||||
spacing: 8
|
||||
|
||||
MaterialSymbol {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
Layout.fillWidth: false
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: "info"
|
||||
iconSize: 20
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
iconSize: Appearance.font.pixelSize.larger
|
||||
color: Appearance.colors.colOnPrimaryContainer
|
||||
}
|
||||
|
||||
StyledText {
|
||||
id: noticeText
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
width: parent.width - 36
|
||||
text: Translation.tr("Language setting saved. Please restart the quickshell to apply the new language.")
|
||||
color: Appearance.m3colors.m3onSecondaryContainer
|
||||
Layout.fillWidth: true
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
text: Translation.tr("Language setting saved. Please restart Quickshell (Ctrl+Super+R) to apply the new language.")
|
||||
color: Appearance.colors.colOnPrimaryContainer
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user