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>
This commit is contained in:
leo78913 2023-01-13 16:51:19 -03:00
parent 6c5f6e8900
commit 670cf8ee07
2 changed files with 6 additions and 16 deletions

View File

@ -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);

View File

@ -84,7 +84,6 @@
<attribute name="toolBarBreak">
<bool>false</bool>
</attribute>
<addaction name="actionNewsLabel"/>
<addaction name="actionMoreNews"/>
</widget>
<widget class="WideBar" name="instanceToolBar">
@ -222,15 +221,6 @@
<addaction name="accountsMenu"/>
<addaction name="helpMenu"/>
</widget>
<action name="actionNewsLabel">
<property name="icon">
<iconset theme="news">
<normaloff>.</normaloff>.</iconset>
</property>
<property name="text">
<string>News</string>
</property>
</action>
<action name="actionMoreNews">
<property name="icon">
<iconset theme="news">