fixed label of the colors toolbar

preferencesAboutTextFull
Clément Fauconnier 4 years ago
parent d10264d9d7
commit 13e498c7b2
  1. 1
      src/board/UBBoardController.cpp
  2. 5
      src/gui/UBToolbarButtonGroup.cpp
  3. 1
      src/gui/UBToolbarButtonGroup.h

@ -312,6 +312,7 @@ void UBBoardController::setupToolbar()
UBToolbarButtonGroup *colorChoice =
new UBToolbarButtonGroup(mMainWindow->boardToolBar, colorActions);
colorChoice->setLabel(tr("Color"));
mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, colorChoice);

@ -102,6 +102,11 @@ UBToolbarButtonGroup::~UBToolbarButtonGroup()
// NOOP
}
void UBToolbarButtonGroup::setLabel(const QString& label)
{
mLabel = label;
}
void UBToolbarButtonGroup::setIcon(const QIcon &icon, int index)
{
Q_ASSERT(index < mActions.size());

@ -48,6 +48,7 @@ class UBToolbarButtonGroup : public QWidget
void setIcon(const QIcon &icon, int index);
void setColor(const QColor &color, int index);
int currentIndex() const;
void setLabel(const QString& label);
protected:
void paintEvent(QPaintEvent *);

Loading…
Cancel
Save