diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index a301017d..749b73e4 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -312,6 +312,7 @@ void UBBoardController::setupToolbar() UBToolbarButtonGroup *colorChoice = new UBToolbarButtonGroup(mMainWindow->boardToolBar, colorActions); + colorChoice->setLabel(tr("Color")); mMainWindow->boardToolBar->insertWidget(mMainWindow->actionBackgrounds, colorChoice); diff --git a/src/gui/UBToolbarButtonGroup.cpp b/src/gui/UBToolbarButtonGroup.cpp index f9e0fa32..ed69bcf6 100644 --- a/src/gui/UBToolbarButtonGroup.cpp +++ b/src/gui/UBToolbarButtonGroup.cpp @@ -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()); diff --git a/src/gui/UBToolbarButtonGroup.h b/src/gui/UBToolbarButtonGroup.h index a89475a4..b0c7033d 100644 --- a/src/gui/UBToolbarButtonGroup.h +++ b/src/gui/UBToolbarButtonGroup.h @@ -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 *);