change icons for theme editor toolbar

This commit is contained in:
Konstantin Bulenkov
2019-03-12 01:11:05 +01:00
parent 0373778cfa
commit 3ed773ddb0
2 changed files with 10 additions and 2 deletions
@@ -374,8 +374,8 @@
<!-- Theme Toolbar -->
<group id="DevKit.ThemeEditorToolbar">
<action class="org.jetbrains.idea.devkit.themes.ApplyThemeAction" id="DevKit.ApplyTheme" text="Apply Theme" icon="AllIcons.Actions.Execute"/>
<action class="org.jetbrains.idea.devkit.themes.RollbackThemeAction" id="DevKit.RollbackTheme" text="Reset to Original Theme" icon="AllIcons.Actions.Rollback"/>
<action class="org.jetbrains.idea.devkit.themes.EditThemeEditorColorSchemeAction" id="DevKit.EditThemeEditorColorScheme" text="Edit Color Scheme" icon="AllIcons.Actions.EditSource"/>
<action class="org.jetbrains.idea.devkit.themes.RollbackThemeAction" id="DevKit.RollbackTheme" text="Reset to Original Theme" icon="AllIcons.Actions.Suspend"/>
<action class="org.jetbrains.idea.devkit.themes.EditThemeEditorColorSchemeAction" id="DevKit.EditThemeEditorColorScheme" text="Edit Color Scheme" icon="AllIcons.Actions.EditScheme"/>
</group>
</actions>
@@ -1,6 +1,7 @@
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package org.jetbrains.idea.devkit.themes;
import com.intellij.icons.AllIcons;
import com.intellij.ide.ui.LafManager;
import com.intellij.ide.ui.UITheme;
import com.intellij.ide.ui.laf.TempUIThemeBasedLookAndFeelInfo;
@@ -86,4 +87,11 @@ public class ApplyThemeAction extends DumbAwareAction {
catch (IOException ignore) {}
return false;
}
@Override
public void update(@NotNull AnActionEvent e) {
if (LafManager.getInstance().getCurrentLookAndFeel() instanceof TempUIThemeBasedLookAndFeelInfo) {
e.getPresentation().setIcon(AllIcons.Actions.Rerun);
}
}
}