feat(ui): moved integer scaling, fsr and nis into separate group in gamescope settings

FSR, NIS and Integer scaling got separate "upscaling" section in gamescope settings.
As well were added descriptions so users can actually
know what e.g. integer scaling is
This commit is contained in:
Observer KRypt0n_ 2023-03-05 12:52:17 +02:00
parent 57d9210560
commit f8c457b699
4 changed files with 88 additions and 60 deletions

View file

@ -1,6 +1,13 @@
game-resolution = Spiel-Auflösung
gamescope-resolution = Gamescope-Auflösung
upscaling = Upscaling
integer-scaling = Integer-Skalierung
integer-scaling-description = Turns each pixel into a square or rectangular group of integer number of same-color pixels. Prevents sharpness loss when scaling Full HD to 4K
gamescope-fsr-description = An open-source upscaling technique developed by AMD for better upscaling quality
nis-description = An open source upscaling technique developed by Nvidia as a cross-vendor, low-overhead alternative to their proprietary DLSS solution, meaning it works on AMD and Intel GPUs as well as Nvidia GPUs
other-settings = Andere Einstellungen
framerate-limit = Framerate-Limit
unfocused-framerate-limit = Unfokussiert Framerate-Limit
integer-scaling = Integer-Skalierung

View file

@ -1,6 +1,13 @@
game-resolution = Game resolution
gamescope-resolution = Gamescope resolution
upscaling = Upscaling
integer-scaling = Integer scaling
integer-scaling-description = Turns each pixel into a square or rectangular group of integer number of same-color pixels. Prevents sharpness loss when scaling Full HD to 4K
gamescope-fsr-description = An open-source upscaling technique developed by AMD for better upscaling quality
nis-description = An open source upscaling technique developed by Nvidia as a cross-vendor, low-overhead alternative to their proprietary DLSS solution, meaning it works on AMD and Intel GPUs as well as Nvidia GPUs
other-settings = Other settings
framerate-limit = Framerate limit
unfocused-framerate-limit = Unfocused framerate limit
integer-scaling = Integer scaling

View file

@ -1,6 +1,13 @@
game-resolution = Разрешение игры
gamescope-resolution = Разрешение Gamescope
upscaling = Масштабирование
integer-scaling = Целочисленное масштабирование
integer-scaling-description = Переводит каждый пиксель в квадрат или прямоугольник из целого числа пикселей одного цвета. Предотвращает потерю резкости при масштабировании Full HD до 4K
gamescope-fsr-description = Открытая техника масштабирования с сохранением хорошего качества изображения, разработанная AMD
nis-description = Открытая техника масштабирования с сохранением хорошего качества изображения, разработанная Nvidia для замены DLSS и работающая на видеокартах AMD, Intel и Nvidia
other-settings = Другие настройки
framerate-limit = Лимит числа кадров
unfocused-framerate-limit = Лимит числа кадров вне фокуса
integer-scaling = Целочисленное масштабирование

View file

@ -120,6 +120,70 @@ impl SimpleAsyncComponent for GamescopeApp {
}
},
add = &adw::PreferencesGroup {
set_title: &tr("upscaling"),
adw::ActionRow {
set_title: &tr("integer-scaling"),
set_subtitle: &tr("integer-scaling-description"),
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.integer_scaling,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.integer_scaling = switch.state();
config::update(config);
}
}
}
}
},
adw::ActionRow {
set_title: "FSR",
set_subtitle: &tr("gamescope-fsr-description"),
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.fsr,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.fsr = switch.state();
config::update(config);
}
}
}
}
},
adw::ActionRow {
set_title: "Nvidia Image Scaling",
set_subtitle: &tr("nis-description"),
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.nis,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.nis = switch.state();
config::update(config);
}
}
}
}
}
},
add = &adw::PreferencesGroup {
set_title: &tr("other-settings"),
@ -167,63 +231,6 @@ impl SimpleAsyncComponent for GamescopeApp {
}
},
adw::ActionRow {
set_title: &tr("integer-scaling"),
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.integer_scaling,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.integer_scaling = switch.state();
config::update(config);
}
}
}
}
},
adw::ActionRow {
set_title: "FSR",
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.fsr,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.fsr = switch.state();
config::update(config);
}
}
}
}
},
adw::ActionRow {
set_title: "Nvidia Image Scaling",
add_suffix = &gtk::Switch {
set_valign: gtk::Align::Center,
set_state: CONFIG.game.enhancements.gamescope.nis,
connect_state_notify => |switch| {
if is_ready() {
if let Ok(mut config) = config::get() {
config.game.enhancements.gamescope.nis = switch.state();
config::update(config);
}
}
}
}
},
adw::ComboRow {
set_title: &tr("window-mode"),