citra-qt: update the separate window titles to use full_name and show Primary/Secondary identifier (#6712)
* citra-qt: update the separate window titles to use full_name and Primary/Secondary window identifier * build_fullname: remove trailing space
This commit is contained in:
parent
a537f56766
commit
19107cec4b
|
@ -57,9 +57,7 @@ if (DEFINED ENV{CI})
|
||||||
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
set(BUILD_VERSION ${CMAKE_MATCH_1})
|
||||||
endif()
|
endif()
|
||||||
if (BUILD_VERSION)
|
if (BUILD_VERSION)
|
||||||
# This leaves a trailing space on the last word, but we actually want that
|
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION}")
|
||||||
# because of how it's styled in the title bar.
|
|
||||||
set(BUILD_FULLNAME "${REPO_NAME} ${BUILD_VERSION} ")
|
|
||||||
else()
|
else()
|
||||||
set(BUILD_FULLNAME "")
|
set(BUILD_FULLNAME "")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -387,10 +387,6 @@ GRenderWindow::GRenderWindow(QWidget* parent_, EmuThread* emu_thread_, Core::Sys
|
||||||
bool is_secondary_)
|
bool is_secondary_)
|
||||||
: QWidget(parent_), EmuWindow(is_secondary_), emu_thread(emu_thread_), system{system_} {
|
: QWidget(parent_), EmuWindow(is_secondary_), emu_thread(emu_thread_), system{system_} {
|
||||||
|
|
||||||
setWindowTitle(QStringLiteral("Citra %1 | %2-%3")
|
|
||||||
.arg(QString::fromUtf8(Common::g_build_name),
|
|
||||||
QString::fromUtf8(Common::g_scm_branch),
|
|
||||||
QString::fromUtf8(Common::g_scm_desc)));
|
|
||||||
setAttribute(Qt::WA_AcceptTouchEvents);
|
setAttribute(Qt::WA_AcceptTouchEvents);
|
||||||
auto layout = new QHBoxLayout(this);
|
auto layout = new QHBoxLayout(this);
|
||||||
layout->setContentsMargins(0, 0, 0, 0);
|
layout->setContentsMargins(0, 0, 0, 0);
|
||||||
|
|
|
@ -2783,9 +2783,13 @@ void GMainWindow::UpdateWindowTitle() {
|
||||||
const QString full_name = QString::fromUtf8(Common::g_build_fullname);
|
const QString full_name = QString::fromUtf8(Common::g_build_fullname);
|
||||||
|
|
||||||
if (game_title.isEmpty()) {
|
if (game_title.isEmpty()) {
|
||||||
setWindowTitle(tr("Citra %1").arg(full_name));
|
setWindowTitle(QStringLiteral("Citra %1").arg(full_name));
|
||||||
} else {
|
} else {
|
||||||
setWindowTitle(tr("Citra %1| %2").arg(full_name, game_title));
|
setWindowTitle(QStringLiteral("Citra %1 | %2").arg(full_name, game_title));
|
||||||
|
render_window->setWindowTitle(
|
||||||
|
QStringLiteral("Citra %1 | %2 | %3").arg(full_name, game_title, tr("Primary Window")));
|
||||||
|
secondary_window->setWindowTitle(QStringLiteral("Citra %1 | %2 | %3")
|
||||||
|
.arg(full_name, game_title, tr("Secondary Window")));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in New Issue