aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/MainWindow.cpp
diff options
context:
space:
mode:
authorleo78913 <leo3758@riseup.net>2023-01-13 16:51:19 -0300
committerleo78913 <leo3758@riseup.net>2023-01-20 19:45:43 -0300
commit670cf8ee07387a4b8c11854117b2a6d4d8517a1a (patch)
treefedd06d4253c5286a1a62d74289a9fcb9e1adc00 /launcher/ui/MainWindow.cpp
parent6c5f6e890006d601de2a872d31910252948f4221 (diff)
downloadPrismLauncher-670cf8ee07387a4b8c11854117b2a6d4d8517a1a.tar.gz
PrismLauncher-670cf8ee07387a4b8c11854117b2a6d4d8517a1a.tar.bz2
PrismLauncher-670cf8ee07387a4b8c11854117b2a6d4d8517a1a.zip
Fix: make the newsLabel toolbutton fullwidth again
this reverts it to how it was before the MainWindow .ui port Signed-off-by: leo78913 <leo3758@riseup.net>
Diffstat (limited to 'launcher/ui/MainWindow.cpp')
-rw-r--r--launcher/ui/MainWindow.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp
index dbbaa2b0..79e01d91 100644
--- a/launcher/ui/MainWindow.cpp
+++ b/launcher/ui/MainWindow.cpp
@@ -246,12 +246,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
// Add the news label to the news toolbar.
{
m_newsChecker.reset(new NewsChecker(APPLICATION->network(), BuildConfig.NEWS_RSS_URL));
- newsLabel = dynamic_cast<QToolButton*>(ui->newsToolBar->widgetForAction(ui->actionNewsLabel));
-
- //add a spacer before the more news button
- QWidget *spacer = new QWidget();
- spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- ui->newsToolBar->insertWidget(ui->actionMoreNews, spacer);
+ newsLabel = new QToolButton();
+ newsLabel->setIcon(APPLICATION->getThemedIcon("news"));
+ newsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
+ newsLabel->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
+ newsLabel->setFocusPolicy(Qt::NoFocus);
+ ui->newsToolBar->insertWidget(ui->actionMoreNews, newsLabel);
QObject::connect(newsLabel, &QAbstractButton::clicked, this, &MainWindow::newsButtonClicked);
QObject::connect(m_newsChecker.get(), &NewsChecker::newsLoaded, this, &MainWindow::updateNewsLabel);