Use QStyle::SP_DialogCloseButton instead of hardcoding "dialog-close"

parent 9fe714b6
......@@ -28,6 +28,7 @@
#include <QIcon>
#include <QHBoxLayout>
#include <QToolButton>
#include <QStyle>
namespace Kasten
......@@ -43,7 +44,7 @@ ToolInlineViewWidget::ToolInlineViewWidget( AbstractToolInlineView* view, QWidge
//TODO: use style buttons instead, like QDockWidget
QToolButton* closeButton = new QToolButton( this );
closeButton->setAutoRaise( true );
closeButton->setIcon( QIcon::fromTheme( QStringLiteral("dialog-close") ) );
closeButton->setIcon( style()->standardIcon( QStyle::SP_DialogCloseButton ) );
connect( closeButton, &QAbstractButton::clicked, this, &ToolInlineViewWidget::done );
layout->addWidget( closeButton );
layout->setAlignment( closeButton, (Qt::Alignment)(Qt::AlignLeft|Qt::AlignTop) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment