Commit 4153d7b0 authored by JanKusanagi's avatar JanKusanagi

Arrange buttons nicely

parent 11dbaa57
......@@ -143,16 +143,20 @@ CommenterBlock::CommenterBlock(PumpController *pumpController,
connect(m_cancelButton, &QAbstractButton::clicked,
m_commentComposer, &Composer::cancelPost);
// Layout for optional character picker button, in one row with the Format button
m_topButtonsLayout = new QHBoxLayout();
m_topButtonsLayout->setContentsMargins(0, 0, 0, 0);
#ifdef HAVE_KCHARSELECT
m_topButtonsLayout->addWidget(m_charPickerButton);
#endif
m_topButtonsLayout->addWidget(m_toolsButton);
m_bottomLayout = new QGridLayout();
m_bottomLayout->setContentsMargins(0, 0, 0, 0);
m_bottomLayout->setSpacing(1);
m_bottomLayout->addWidget(m_commentComposer, 0, 0, 8, 3);
m_bottomLayout->addWidget(m_toolsButton, 0, 3, 1, 1);
#ifdef HAVE_KCHARSELECT
m_bottomLayout->addWidget(m_charPickerButton, 1, 3, 1, 1);
#endif
m_bottomLayout->addWidget(m_statusInfoLabel, 2, 3, 4, 1, Qt::AlignCenter);
m_bottomLayout->addLayout(m_topButtonsLayout, 0, 3, 1, 1);
m_bottomLayout->addWidget(m_statusInfoLabel, 1, 3, 5, 1, Qt::AlignCenter);
m_bottomLayout->addWidget(m_commentButton, 6, 3, 1, 1);
m_bottomLayout->addWidget(m_cancelButton, 7, 3, 1, 1);
......
......@@ -23,6 +23,7 @@
#include <QWidget>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QGridLayout>
#include <QScrollArea>
#include <QPushButton>
......@@ -120,10 +121,11 @@ private:
QTimer *m_getAllCommentsTimer; // To get all comments after a delay
Composer *m_commentComposer;
QPushButton *m_toolsButton;
QHBoxLayout *m_topButtonsLayout;
#ifdef HAVE_KCHARSELECT
QToolButton *m_charPickerButton;
#endif
QPushButton *m_toolsButton;
QLabel *m_statusInfoLabel;
QPushButton *m_commentButton;
QPushButton *m_cancelButton;
......
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