mirror of
https://github.com/an-anime-team/sleepy-launcher.git
synced 2024-11-25 14:20:08 +03:00
General settings: added wine & dxvk selection UI
This commit is contained in:
parent
a3c760bbce
commit
d38d098882
4 changed files with 55 additions and 2 deletions
|
@ -13,3 +13,12 @@ status = Status
|
||||||
|
|
||||||
game-version = Game version
|
game-version = Game version
|
||||||
patch-version = Patch version
|
patch-version = Patch version
|
||||||
|
|
||||||
|
selected-version = Selected version
|
||||||
|
recommended-only = Recommended only
|
||||||
|
|
||||||
|
wine-version = Wine version
|
||||||
|
wine-recommended-description = Show only recommended wine versions
|
||||||
|
|
||||||
|
dxvk-version = DXVK version
|
||||||
|
dxvk-recommended-description = Show only recommended dxvk versions
|
||||||
|
|
|
@ -13,3 +13,12 @@ status = Статус
|
||||||
|
|
||||||
game-version = Версия игры
|
game-version = Версия игры
|
||||||
patch-version = Версия патча
|
patch-version = Версия патча
|
||||||
|
|
||||||
|
selected-version = Выбранная версия
|
||||||
|
recommended-only = Только рекомендуемое
|
||||||
|
|
||||||
|
wine-version = Версия Wine
|
||||||
|
wine-recommended-description = Показывать только рекомендуемые версии Wine
|
||||||
|
|
||||||
|
dxvk-version = Версия DXVK
|
||||||
|
dxvk-recommended-description = Показывать только рекомендуемые версии DXVK
|
||||||
|
|
|
@ -10,10 +10,11 @@ fluent_templates::static_loader! {
|
||||||
|
|
||||||
pub static mut LANG: LanguageIdentifier = langid!("en");
|
pub static mut LANG: LanguageIdentifier = langid!("en");
|
||||||
|
|
||||||
|
#[allow(clippy::expect_fun_call)]
|
||||||
pub fn tr(id: &str) -> String {
|
pub fn tr(id: &str) -> String {
|
||||||
unsafe {
|
unsafe {
|
||||||
LOCALES
|
LOCALES
|
||||||
.lookup(&LANG, id)
|
.lookup(&LANG, id)
|
||||||
.expect("Failed to get message with given id")
|
.expect(&format!("Failed to find message with a given id: {id}"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,41 @@ impl WidgetTemplate for General {
|
||||||
add_css_class: "success"
|
add_css_class: "success"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
|
||||||
|
add = &adw::PreferencesGroup {
|
||||||
|
set_title: &tr("wine-version"),
|
||||||
|
|
||||||
|
adw::ComboRow {
|
||||||
|
set_title: &tr("selected-version")
|
||||||
|
},
|
||||||
|
|
||||||
|
adw::ActionRow {
|
||||||
|
set_title: &tr("recommended-only"),
|
||||||
|
set_subtitle: &tr("wine-recommended-description"),
|
||||||
|
|
||||||
|
add_suffix = >k::Switch {
|
||||||
|
set_valign: gtk::Align::Center
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
add = &adw::PreferencesGroup {
|
||||||
|
set_title: &tr("dxvk-version"),
|
||||||
|
|
||||||
|
adw::ComboRow {
|
||||||
|
set_title: &tr("selected-version")
|
||||||
|
},
|
||||||
|
|
||||||
|
adw::ActionRow {
|
||||||
|
set_title: &tr("recommended-only"),
|
||||||
|
set_subtitle: &tr("dxvk-recommended-description"),
|
||||||
|
|
||||||
|
add_suffix = >k::Switch {
|
||||||
|
set_valign: gtk::Align::Center
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue