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