Properly separate Qt and SDL UI codepaths in update_mouse_msg()

Also drop the related hack for non-Windows platforms in qt_mainwindow.cpp
This commit is contained in:
Alexander Babikov
2025-11-26 11:45:50 +05:00
parent fc55d51887
commit e1b7579f9d
2 changed files with 7 additions and 20 deletions

View File

@@ -313,20 +313,7 @@ MainWindow::MainWindow(QWidget *parent)
return;
}
if (!hide_tool_bar)
#ifdef _WIN32
toolbar_label->setText(title);
#else
{
/* get the percentage and mouse message, TODO: refactor ui_window_title() */
auto parts = title.split(" - ");
if (parts.size() >= 2) {
if (parts.size() < 5)
toolbar_label->setText(parts[1]);
else
toolbar_label->setText(QString("%1 - %2").arg(parts[1], parts.last()));
}
}
#endif
});
connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection);