From 5742ae4747cbb68b484f506420c93c43cfbf9430 Mon Sep 17 00:00:00 2001 From: ts-korhonen Date: Fri, 14 Jan 2022 20:25:17 +0200 Subject: [PATCH] qt: split the ui window title string on non-win32 --- src/qt/qt_mainwindow.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qt/qt_mainwindow.cpp b/src/qt/qt_mainwindow.cpp index 7ac725221..9460e766c 100644 --- a/src/qt/qt_mainwindow.cpp +++ b/src/qt/qt_mainwindow.cpp @@ -87,7 +87,15 @@ MainWindow::MainWindow(QWidget *parent) : connect(this, &MainWindow::setTitle, this, [this,toolbar_label](const QString& title) { 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(" - "); + toolbar_label->setText(QString("%1 - %2").arg(parts[1],parts.last())); + } +#endif }); connect(this, &MainWindow::getTitleForNonQtThread, this, &MainWindow::getTitle_, Qt::BlockingQueuedConnection);