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:
parent
6c5f6e8900
commit
670cf8ee07
@ -246,12 +246,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
|||||||
// Add the news label to the news toolbar.
|
// Add the news label to the news toolbar.
|
||||||
{
|
{
|
||||||
m_newsChecker.reset(new NewsChecker(APPLICATION->network(), BuildConfig.NEWS_RSS_URL));
|
m_newsChecker.reset(new NewsChecker(APPLICATION->network(), BuildConfig.NEWS_RSS_URL));
|
||||||
newsLabel = dynamic_cast<QToolButton*>(ui->newsToolBar->widgetForAction(ui->actionNewsLabel));
|
newsLabel = new QToolButton();
|
||||||
|
newsLabel->setIcon(APPLICATION->getThemedIcon("news"));
|
||||||
//add a spacer before the more news button
|
newsLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
QWidget *spacer = new QWidget();
|
newsLabel->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
|
||||||
spacer->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
newsLabel->setFocusPolicy(Qt::NoFocus);
|
||||||
ui->newsToolBar->insertWidget(ui->actionMoreNews, spacer);
|
ui->newsToolBar->insertWidget(ui->actionMoreNews, newsLabel);
|
||||||
|
|
||||||
QObject::connect(newsLabel, &QAbstractButton::clicked, this, &MainWindow::newsButtonClicked);
|
QObject::connect(newsLabel, &QAbstractButton::clicked, this, &MainWindow::newsButtonClicked);
|
||||||
QObject::connect(m_newsChecker.get(), &NewsChecker::newsLoaded, this, &MainWindow::updateNewsLabel);
|
QObject::connect(m_newsChecker.get(), &NewsChecker::newsLoaded, this, &MainWindow::updateNewsLabel);
|
||||||
|
@ -84,7 +84,6 @@
|
|||||||
<attribute name="toolBarBreak">
|
<attribute name="toolBarBreak">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
<addaction name="actionNewsLabel"/>
|
|
||||||
<addaction name="actionMoreNews"/>
|
<addaction name="actionMoreNews"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="WideBar" name="instanceToolBar">
|
<widget class="WideBar" name="instanceToolBar">
|
||||||
@ -222,15 +221,6 @@
|
|||||||
<addaction name="accountsMenu"/>
|
<addaction name="accountsMenu"/>
|
||||||
<addaction name="helpMenu"/>
|
<addaction name="helpMenu"/>
|
||||||
</widget>
|
</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">
|
<action name="actionMoreNews">
|
||||||
<property name="icon">
|
<property name="icon">
|
||||||
<iconset theme="news">
|
<iconset theme="news">
|
||||||
|
Loading…
Reference in New Issue
Block a user