Skip to content

Commit

Permalink
mac ui
Browse files Browse the repository at this point in the history
  • Loading branch information
wizweishijun committed Nov 6, 2018
1 parent d73871a commit 75be54d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/WizMainWindow.cpp
Expand Up @@ -1781,7 +1781,15 @@ void WizMainWindow::initToolBar()
{
#ifdef Q_OS_MAC
m_toolBar->showInWindow(this);

//
//reset mac toolbar icons
QString skin = userSettings().skin();
QSize size = QSize(32, 32);
const WizIconOptions ICON_OPTIONS = WizIconOptions(Qt::transparent, "#a6a6a6", Qt::transparent);
m_actions->actionFromName(WIZACTION_GLOBAL_SYNC)->setIcon(::WizLoadSkinIcon(skin, WIZACTION_GLOBAL_SYNC, size, ICON_OPTIONS));
m_actions->actionFromName(WIZACTION_GLOBAL_GOBACK)->setIcon(::WizLoadSkinIcon(skin, WIZACTION_GLOBAL_GOBACK, size, ICON_OPTIONS));
m_actions->actionFromName(WIZACTION_GLOBAL_GOFORWARD)->setIcon(::WizLoadSkinIcon(skin, WIZACTION_GLOBAL_GOFORWARD, size, ICON_OPTIONS));
//
m_actions->actionFromName(WIZACTION_GLOBAL_GOBACK)->setEnabled(false);
m_actions->actionFromName(WIZACTION_GLOBAL_GOFORWARD)->setEnabled(false);
m_toolBar->addAction(m_actions->actionFromName(WIZACTION_GLOBAL_GOBACK));
Expand Down
4 changes: 1 addition & 3 deletions src/share/WizAnimateAction.cpp
Expand Up @@ -23,13 +23,11 @@ WizAnimateAction::WizAnimateAction(QObject* parent)
void WizAnimateAction::setAction(QAction* action)
{
m_target = new WizAnimateActionContainer(action, this);
m_iconDefault = m_target->icon();
}

void WizAnimateAction::setToolButton(QToolButton* button)
{
m_target = new WizAnimateButtonContainer(button, this);
m_iconDefault = m_target->icon();
}

void WizAnimateAction::setSingleIcons(const QString& strIconBaseName, QSize size)
Expand Down Expand Up @@ -122,7 +120,7 @@ void WizAnimateAction::stopPlay()

m_target->setProperty("animationStatus", 0);

m_target->setIcon(m_iconDefault);
m_target->setIcon(m_target->icon());
m_timer->stop();
}

Expand Down
1 change: 0 additions & 1 deletion src/share/WizAnimateAction.h
Expand Up @@ -65,7 +65,6 @@ class WizAnimateAction : public QObject
private:
WizAnimateContainerBase* m_target;
int m_nIconIndex;
QIcon m_iconDefault;
QList<QIcon> m_icons;
QTimer* m_timer;

Expand Down

0 comments on commit 75be54d

Please sign in to comment.