mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-15 10:01:00 +01:00
Merge pull request #7111 from lat9nq/no-title-bar-version
main: Don't add an extra separator when the title version is absent
This commit is contained in:
commit
e209fff374
1 changed files with 7 additions and 2 deletions
|
@ -2920,8 +2920,13 @@ void GMainWindow::UpdateWindowTitle(std::string_view title_name, std::string_vie
|
|||
if (title_name.empty()) {
|
||||
setWindowTitle(QString::fromStdString(window_title));
|
||||
} else {
|
||||
const auto run_title =
|
||||
fmt::format("{} | {} | {} | {}", window_title, title_name, title_version, gpu_vendor);
|
||||
const auto run_title = [window_title, title_name, title_version, gpu_vendor]() {
|
||||
if (title_version.empty()) {
|
||||
return fmt::format("{} | {} | {}", window_title, title_name, gpu_vendor);
|
||||
}
|
||||
return fmt::format("{} | {} | {} | {}", window_title, title_name, title_version,
|
||||
gpu_vendor);
|
||||
}();
|
||||
setWindowTitle(QString::fromStdString(run_title));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue