Commit 002d8cae authored by JanKusanagi's avatar JanKusanagi

Moved character picker button, turned it into a tool button

parent bd513db7
......@@ -154,21 +154,17 @@ Publisher::Publisher(PumpController *pumpController,
m_titleLineEdit, SLOT(setFocus()));
// Add formatting button exported from Composer
m_toolsButton = m_composerBox->getToolsButton();
#ifdef HAVE_KCHARSELECT
m_charPickerButton = new QPushButton(QIcon::fromTheme("face-smile",
QIcon(":/images/button-symbols.png")),
QString(), this);
m_charPickerButton->setSizePolicy(QSizePolicy::Preferred,
QSizePolicy::Preferred);
// Kinda TMP, enforce a certain width -- FIXME
m_charPickerButton->setMinimumWidth(m_charPickerButton->iconSize().width() * 3);
m_charPickerButton = new QToolButton(this);
m_charPickerButton->setIcon(QIcon::fromTheme("face-smile",
QIcon(":/images/button-symbols.png")));
connect(m_charPickerButton, &QPushButton::clicked,
this, &Publisher::showCharacterPicker);
#endif
// Add formatting button exported from Composer
m_toolsButton = m_composerBox->getToolsButton();
// Add menu and submenus to access drafts from the Draft Manager
m_draftsManager = new DraftsManager(m_globalObject, this);
connect(m_draftsManager, &DraftsManager::draftSelected,
......@@ -325,12 +321,12 @@ Publisher::Publisher(PumpController *pumpController,
m_titleLayout->addSpacing(4);
m_titleLayout->addWidget(m_titleLineEdit, 2);
m_titleLayout->addSpacing(2);
m_titleLayout->addWidget(m_toolsButton, 0);
m_titleLayout->addSpacing(2);
#ifdef HAVE_KCHARSELECT
m_titleLayout->addWidget(m_charPickerButton, 0);
m_titleLayout->addSpacing(2);
#endif
m_titleLayout->addWidget(m_toolsButton, 0);
m_titleLayout->addSpacing(2);
m_titleLayout->addWidget(m_draftsButton, 0);
m_mediaLayout = new QGridLayout();
......
......@@ -27,6 +27,7 @@
#include <QLabel>
#include <QLineEdit>
#include <QPushButton>
#include <QToolButton>
#include <QMenu>
#include <QFileDialog>
#include <QMessageBox>
......@@ -148,13 +149,14 @@ private:
QLabel *m_pictureLabel;
QProgressBar *m_uploadProgressBar;
QPushButton *m_toolsButton;
#ifdef HAVE_KCHARSELECT
QPushButton *m_charPickerButton;
QToolButton *m_charPickerButton;
CharacterPicker *m_characterPicker;
#endif
QPushButton *m_toolsButton;
DraftsManager *m_draftsManager;
QMenu *m_draftsMenu;
QPushButton *m_draftsButton;
......
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