From 69c0e05db0ef97d8a6c719393d6710920be661e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole-Andr=C3=A9=20Rodlie?= Date: Sun, 13 Oct 2024 16:07:25 +0200 Subject: [PATCH] UI minor --- src/app/GUI/mainwindow.cpp | 15 +++++++++------ src/app/friction.qss | 6 ++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/src/app/GUI/mainwindow.cpp b/src/app/GUI/mainwindow.cpp index 5ff8a376c..29b6b2b4f 100644 --- a/src/app/GUI/mainwindow.cpp +++ b/src/app/GUI/mainwindow.cpp @@ -1204,15 +1204,18 @@ void MainWindow::setupMenuBar() setMenuBar(mMenuBar); - const auto frictionButton = new QToolButton(this); - frictionButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); - frictionButton->setPopupMode(QToolButton::InstantPopup); + const auto frictionButton = new QPushButton(this); + frictionButton->setFlat(true); frictionButton->setIcon(QIcon::fromTheme(AppSupport::getAppID())); - frictionButton->setDefaultAction(aboutAct); - frictionButton->setText(QString("%1 %2").arg(AppSupport::getAppDisplayName(), + frictionButton->setObjectName("AboutButton"); + frictionButton->setLayoutDirection(Qt::RightToLeft); + frictionButton->setText(QString("%1 %2 ").arg(AppSupport::getAppDisplayName(), AppSupport::getAppVersion())); - frictionButton->setToolTip(QString()); frictionButton->setFocusPolicy(Qt::NoFocus); + + connect(frictionButton, &QPushButton::released, + this, &MainWindow::openAboutWindow); + mMenuBar->setCornerWidget(frictionButton, Qt::TopRightCorner); } diff --git a/src/app/friction.qss b/src/app/friction.qss index 57967bf15..f3255a677 100644 --- a/src/app/friction.qss +++ b/src/app/friction.qss @@ -305,6 +305,7 @@ QPushButton#WelcomeRecentButton:hover { }*/ QPushButton#FlatButton, +QPushButton#AboutButton, QToolButton#FlatButton { background-color: none; border: 0; @@ -312,6 +313,7 @@ QToolButton#FlatButton { } QPushButton#FlatButton, +QPushButton#AboutButton, QToolButton#FlatButton { border-radius: 2%; } @@ -323,6 +325,10 @@ QToolButton#FlatButton:hover { border-color: rgb(104, 144, 206); } +QPushButton#AboutButton:hover { + background-color: none; +} + QTabWidget#ThirdPartyBrowser { border: 0; } QWidget#TimelineMenu QPushButton,