mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-10-06 06:21:16 +07:00
[vcs-log] do not show icon for show details action in quick settings
In quick settings icon conflicts with the check mark.
This commit is contained in:
committed by
Aleksey Pivovarov
parent
7aae50e44d
commit
525621ccaa
@@ -30,6 +30,7 @@ public class VcsLogActionPlaces {
|
||||
public static final String VCS_LOG_TOOLBAR_PLACE = "Vcs.Log.Toolbar";
|
||||
public static final String VCS_HISTORY_PLACE = "Vcs.FileHistory.ContextMenu";
|
||||
public static final String VCS_HISTORY_TOOLBAR_PLACE = "Vcs.FileHistory.Toolbar";
|
||||
public static final String VCS_LOG_GEAR_POPUP_PLACE = "Vcs.Log.Gear.Popup";
|
||||
|
||||
// action ids
|
||||
public static final String VCS_LOG_INTELLI_SORT_ACTION = "Vcs.Log.IntelliSortChooser";
|
||||
|
||||
@@ -16,17 +16,38 @@
|
||||
package com.intellij.vcs.log.ui.actions;
|
||||
|
||||
import com.intellij.icons.AllIcons;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.vcs.log.impl.CommonUiProperties;
|
||||
import com.intellij.vcs.log.impl.VcsLogUiProperties;
|
||||
import com.intellij.vcs.log.ui.VcsLogActionPlaces;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
public class ShowDetailsAction extends BooleanPropertyToggleAction {
|
||||
|
||||
public ShowDetailsAction() {
|
||||
super("Show Details", "Display details panel", AllIcons.Actions.Preview);
|
||||
super("Show Details", "Display details panel", getIcon());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected VcsLogUiProperties.VcsLogUiProperty<Boolean> getProperty() {
|
||||
return CommonUiProperties.SHOW_DETAILS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(@NotNull AnActionEvent e) {
|
||||
if (e.getPlace().equals(VcsLogActionPlaces.VCS_LOG_GEAR_POPUP_PLACE)) {
|
||||
e.getPresentation().setIcon(null);
|
||||
} else {
|
||||
e.getPresentation().setIcon(getIcon());
|
||||
}
|
||||
|
||||
super.update(e);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static Icon getIcon() {
|
||||
return AllIcons.Actions.Preview;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -23,9 +23,9 @@ import com.intellij.openapi.project.DumbAwareAction;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.popup.JBPopupFactory;
|
||||
import com.intellij.openapi.ui.popup.ListPopup;
|
||||
import com.intellij.openapi.wm.impl.content.ToolWindowContentUi;
|
||||
import com.intellij.vcs.log.VcsLogDataKeys;
|
||||
import com.intellij.vcs.log.VcsLogUi;
|
||||
import com.intellij.vcs.log.ui.VcsLogActionPlaces;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.awt.*;
|
||||
@@ -44,7 +44,7 @@ public class VcsLogGearActionGroup extends DumbAwareAction {
|
||||
|
||||
ListPopup popup = JBPopupFactory.getInstance()
|
||||
.createActionGroupPopup(null, group, e.getDataContext(), JBPopupFactory.ActionSelectionAid.MNEMONICS, true,
|
||||
ToolWindowContentUi.POPUP_PLACE);
|
||||
VcsLogActionPlaces.VCS_LOG_GEAR_POPUP_PLACE);
|
||||
Component component = e.getInputEvent().getComponent();
|
||||
if (component instanceof ActionButtonComponent) {
|
||||
popup.showUnderneathOf(component);
|
||||
|
||||
Reference in New Issue
Block a user