forked from Shinonome/dots-hyprland
fancier dropdown (#2397)
This commit is contained in:
@@ -128,7 +128,7 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ContentSection {
|
||||
icon: "language"
|
||||
title: Translation.tr("Language")
|
||||
@@ -137,13 +137,12 @@ ContentPage {
|
||||
title: Translation.tr("Interface Language")
|
||||
tooltip: Translation.tr("Select the language for the user interface.\n\"Auto\" will use your system's locale.")
|
||||
|
||||
ConfigSelectionArray {
|
||||
StyledComboBox {
|
||||
id: languageSelector
|
||||
currentValue: Config.options.language.ui
|
||||
onSelected: newValue => {
|
||||
Config.options.language.ui = newValue;
|
||||
}
|
||||
options: [
|
||||
buttonIcon: "language"
|
||||
textRole: "displayName"
|
||||
|
||||
model: [
|
||||
{
|
||||
displayName: Translation.tr("Auto (System)"),
|
||||
value: "auto"
|
||||
@@ -153,14 +152,22 @@ ContentPage {
|
||||
displayName: lang,
|
||||
value: lang
|
||||
};
|
||||
})
|
||||
]
|
||||
})]
|
||||
|
||||
currentIndex: {
|
||||
const index = model.findIndex(item => item.value === Config.options.language.ui);
|
||||
return index !== -1 ? index : 0;
|
||||
}
|
||||
|
||||
onActivated: index => {
|
||||
Config.options.language.ui = model[index].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
ContentSubsection {
|
||||
title: Translation.tr("Generate translation with Gemini")
|
||||
tooltip: Translation.tr("You'll need to enter your Gemini API key first.\nType /key on the sidebar for instructions.")
|
||||
|
||||
|
||||
ConfigRow {
|
||||
MaterialTextArea {
|
||||
id: localeInput
|
||||
@@ -195,7 +202,7 @@ ContentPage {
|
||||
ContentSubsectionLabel {
|
||||
text: Translation.tr("AI")
|
||||
}
|
||||
|
||||
|
||||
ConfigSelectionArray {
|
||||
currentValue: Config.options.policies.ai
|
||||
onSelected: newValue => {
|
||||
@@ -278,7 +285,7 @@ ContentPage {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ContentSection {
|
||||
icon: "nest_clock_farsight_analog"
|
||||
title: Translation.tr("Time")
|
||||
@@ -309,7 +316,6 @@ ContentPage {
|
||||
}
|
||||
|
||||
Config.options.time.format = newValue;
|
||||
|
||||
}
|
||||
options: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user