Commit 1af94bdc authored by Scott Petrovic's avatar Scott Petrovic Committed by Halla Rempt

Use separate icon for buttons that show a drop-down

parent 0446c92f
......@@ -509,8 +509,9 @@ void KisResourceItemChooser::updateView()
}
/// helps to set icons here in case the theme is changed
d->viewModeButton->setIcon(koIcon("view-choose"));
d->viewModeButton->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
d->importButton->setIcon(koIcon("document-open"));
d->deleteButton->setIcon(koIcon("trash-empty"));
d->storagePopupButton->setIcon(koIcon("bundle_archive"));
d->tagManager->tagChooserWidget()->updateIcons();
}
......@@ -116,13 +116,14 @@ Q_SIGNALS:
public Q_SLOTS:
void slotButtonClicked(int button);
void slotScrollerStateChanged(QScroller::State state){ KisKineticScroller::updateCursor(this, state); }
void updateView();
private Q_SLOTS:
void activated(const QModelIndex &index);
void clicked(const QModelIndex &index);
void contextMenuRequested(const QPoint &pos);
void baseLengthChanged(int length);
void updateView();
protected:
void showEvent(QShowEvent *event) override;
......
......@@ -187,6 +187,11 @@ KisTagSP KisTagChooserWidget::currentlySelectedTag()
return tag;
}
void KisTagChooserWidget::updateIcons()
{
d->tagToolButton->loadIcon();
}
void KisTagChooserWidget::tagToolContextMenuAboutToShow()
{
/* only enable the save button if the selected tag set is editable */
......
......@@ -49,6 +49,9 @@ public:
/// \return true if the tag was generated by Krita, false if it's just a normal tag
bool selectedTagIsReadOnly();
/// \brief update icon files on loading and theme change
void updateIcons();
Q_SIGNALS:
/// \brief sigTagChosen is emitted when the selected tag in the combobox changes due to user interaction or by other means
......
......@@ -50,7 +50,7 @@ KisTagToolButton::KisTagToolButton(QWidget* parent)
buttonLayout->setSpacing(0);
d->tagToolButton = new QToolButton(this);
d->tagToolButton->setIcon(koIcon("bookmarks"));
loadIcon();
d->tagToolButton->setText(i18n("Tag"));
d->tagToolButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon);
d->tagToolButton->setToolTip(i18nc("@info:tooltip", "<qt>Show the tag box options.</qt>"));
......@@ -129,8 +129,14 @@ void KisTagToolButton::setCurrentTag(const KisTagSP tag)
d->deleteTagAction->setProperty("currentTag", QVariant::fromValue<KisTagSP>(tag));
}
void KisTagToolButton::loadIcon()
{
d->tagToolButton->setIcon(koIcon("bookmarks"));
}
void KisTagToolButton::onTagUndeleteClicked()
{
emit undeletionOfTagRequested(d->undeleteCandidate);
}
......@@ -58,6 +58,11 @@ private:
void setCurrentTag(const KisTagSP tag);
///
/// \brief updates icon file when loading and changing themes
///
void loadIcon();
Q_SIGNALS:
///
/// \brief newTagRequested signals to the KisTagChooserWidget to create a new tag
......
......@@ -329,7 +329,7 @@ void KisWelcomePageWidget::slotUpdateThemeColors()
openFileLink->setIcon(KisIconUtils::loadIcon("document-open"));
newFileLink->setIcon(KisIconUtils::loadIcon("document-new"));
btnNewsOptions->setIcon(KisIconUtils::loadIcon("configure"));
btnNewsOptions->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
supportKritaIcon->setIcon(KisIconUtils::loadIcon(QStringLiteral("support-krita")));
const QIcon &linkIcon = KisIconUtils::loadIcon(QStringLiteral("bookmarks"));
......
......@@ -112,7 +112,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
if (!cfg.toolOptionsInDocker()) {
m_toolOptionsPopupButton = new KisPopupButton(this);
m_toolOptionsPopupButton->setIcon(KisIconUtils::loadIcon("configure"));
m_toolOptionsPopupButton->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
m_toolOptionsPopupButton->setToolTip(i18n("Tool Settings"));
m_toolOptionsPopupButton->setFixedSize(iconsize, iconsize);
}
......@@ -295,7 +295,7 @@ KisPaintopBox::KisPaintopBox(KisViewManager *view, QWidget *parent, const char *
m_cmbCompositeOp->connectBlendmodeActions(m_viewManager->actionManager());
m_workspaceWidget = new KisPopupButton(this);
m_workspaceWidget->setIcon(KisIconUtils::loadIcon("view-choose"));
m_workspaceWidget->setIcon(KisIconUtils::loadIcon("configure"));
m_workspaceWidget->setToolTip(i18n("Choose workspace"));
m_workspaceWidget->setFixedSize(iconsize, iconsize);
m_workspaceWidget->setPopupWidget(new KisWorkspaceChooser(view));
......@@ -1395,7 +1395,7 @@ void KisPaintopBox::slotUpdateSelectionIcon()
m_presetSelectorPopupButton->setIcon(KisIconUtils::loadIcon("paintop_settings_01"));
m_brushEditorPopupButton->setIcon(KisIconUtils::loadIcon("paintop_settings_02"));
m_workspaceWidget->setIcon(KisIconUtils::loadIcon("view-choose"));
m_workspaceWidget->setIcon(KisIconUtils::loadIcon("configure"));
m_eraseAction->setIcon(KisIconUtils::loadIcon("draw-eraser"));
m_reloadAction->setIcon(KisIconUtils::loadIcon("view-refresh"));
......
......@@ -446,7 +446,7 @@ void KisGradientChooser::slotUpdateIcons()
{
if (m_d->buttonAddGradient && m_d->buttonEditGradient) {
m_d->buttonAddGradient->setIcon(KisIconUtils::loadIcon("list-add"));
m_d->buttonEditGradient->setIcon(KisIconUtils::loadIcon("configure"));
m_d->buttonEditGradient->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
}
}
......
......@@ -80,7 +80,7 @@ KisPaintOpPresetsChooserPopup::KisPaintOpPresetsChooserPopup(QWidget * parent)
m_d->uiWdgPaintOpPresets.wdgPresetChooser->itemChooser()->setViewModeButtonVisible(true);
m_d->viewModeButton = m_d->uiWdgPaintOpPresets.wdgPresetChooser->itemChooser()->viewModeButton();
m_d->viewModeButton->setMenu(menu);
m_d->viewModeButton->setIcon(KisIconUtils::loadIcon("configure"));
m_d->viewModeButton->setIconSize(QSize(10,10));
connect(m_d->uiWdgPaintOpPresets.wdgPresetChooser, SIGNAL(resourceSelected(KoResourceSP )),
......@@ -143,7 +143,8 @@ void KisPaintOpPresetsChooserPopup::canvasResourceChanged(KisPaintOpPresetSP pr
void KisPaintOpPresetsChooserPopup::slotThemeChanged()
{
m_d->viewModeButton->setIcon(KisIconUtils::loadIcon("configure"));
m_d->viewModeButton->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
m_d->uiWdgPaintOpPresets.wdgPresetChooser->itemChooser()->updateView(); // updates other icons
}
void KisPaintOpPresetsChooserPopup::updateViewSettings()
......
......@@ -159,7 +159,6 @@ KisPaintOpPresetsPopup::KisPaintOpPresetsPopup(KisCanvasResourceProvider * resou
// configure the button and assign menu
m_d->uiWdgPaintOpPresetSettings.presetChangeViewToolButton->setMenu(menu);
m_d->uiWdgPaintOpPresetSettings.presetChangeViewToolButton->setPopupMode(QToolButton::InstantPopup);
......@@ -778,7 +777,7 @@ void KisPaintOpPresetsPopup::updateThemedIcons()
m_d->uiWdgPaintOpPresetSettings.newPresetEngineButton->setIcon(KisIconUtils::loadIcon("addlayer"));
m_d->uiWdgPaintOpPresetSettings.bnBlacklistPreset->setIcon(KisIconUtils::loadIcon("deletelayer"));
m_d->uiWdgPaintOpPresetSettings.presetChangeViewToolButton->setIcon(KisIconUtils::loadIcon("configure"));
m_d->uiWdgPaintOpPresetSettings.presetChangeViewToolButton->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
// if we cannot see the "Preset label", we know it is not visible
// maybe this can also be stored in the config like the scratchpad?
......
......@@ -166,7 +166,7 @@ KisAnimCurvesDockerTitlebar::KisAnimCurvesDockerTitlebar(QWidget* parent) :
{ // Settings menu..
btnSettingsMenu = new QToolButton(this);
btnSettingsMenu->setIcon(KisIconUtils::loadIcon("configure"));
btnSettingsMenu->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
btnSettingsMenu->setToolTip(i18n("Animation settings menu"));
QWidget *settingsMenuWidget = new QWidget(this);
......
......@@ -122,7 +122,7 @@ KisAnimTimelineDocker::KisAnimTimelineDocker(QWidget* parent) :
{ // Settings menu..
btnSettingsMenu = new QToolButton(this);
btnSettingsMenu->setIcon(KisIconUtils::loadIcon("configure"));
btnSettingsMenu->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
btnSettingsMenu->setToolTip(i18n("Animation settings menu"));
QWidget *settingsMenuWidget = new QWidget(this);
......
......@@ -290,8 +290,8 @@ LayerBox::LayerBox()
configureMenu->addSection(i18n("Thumbnail Size"));
m_wdgLayerBox->configureLayerDockerToolbar->setMenu(configureMenu);
m_wdgLayerBox->configureLayerDockerToolbar->setIcon(KisIconUtils::loadIcon("configure"));
m_wdgLayerBox->configureLayerDockerToolbar->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
m_wdgLayerBox->configureLayerDockerToolbar->setIconSize(QSize(15, 15));
m_wdgLayerBox->configureLayerDockerToolbar->setPopupMode(QToolButton::InstantPopup);
......
......@@ -54,6 +54,7 @@ void PresetDockerDock::setCanvas(KoCanvasBase *canvas)
connect(m_canvas->viewManager()->mainWindow(), SIGNAL(themeChanged()), m_presetChooser, SLOT(slotThemeChanged()));
m_presetChooser->slotThemeChanged();
canvasResourceChanged();
}
......
......@@ -181,7 +181,7 @@ StoryboardDockerDock::StoryboardDockerDock( )
m_ui->btnArrange->setMenu(m_arrangeMenu);
m_ui->btnArrange->setPopupMode(QToolButton::InstantPopup);
m_ui->btnArrange->setIcon(KisIconUtils::loadIcon("view-choose"));
m_ui->btnArrange->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
m_ui->btnArrange->setIconSize(QSize(22, 22));
m_modeGroup = m_arrangeMenu->getModeGroup();
......
......@@ -178,7 +178,7 @@ SvgSymbolCollectionDocker::SvgSymbolCollectionDocker(QWidget *parent)
// thumbnail icon changer
QMenu* configureMenu = new QMenu(this);
configureMenu->setStyleSheet("margin: 6px");
m_wdgSvgCollection->vectorPresetsConfigureButton->setIcon(KisIconUtils::loadIcon("configure"));
m_wdgSvgCollection->vectorPresetsConfigureButton->setIcon(KisIconUtils::loadIcon("hamburger_menu_dots"));
m_wdgSvgCollection->vectorPresetsConfigureButton->setPopupMode(QToolButton::InstantPopup);
......
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