mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
incorrect font style in analyze data flow to\from tool window tabs (#IDEA-190646)
(cherry picked from commit 803bf0c) https://upsource.jetbrains.com/IDEA/review/IDEA-CR-32397
This commit is contained in:
@@ -134,11 +134,6 @@ public class UsageContextDataflowToPanel extends UsageContextPanelBase {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isToShowCloseButton() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAutoScroll() {
|
||||
return false;
|
||||
|
||||
@@ -119,7 +119,7 @@ public class SliceManager implements PersistentStateComponent<SliceManager.Store
|
||||
element = provider.getElementForDescription(element);
|
||||
}
|
||||
String desc = ElementDescriptionUtil.getElementDescription(element, RefactoringDescriptionLocation.WITHOUT_PARENT);
|
||||
return "<html><head>" + UIUtil.getCssFontDeclaration(BaseLabel.getLabelFont()) + "</head><body>" +
|
||||
return "<html><body>" +
|
||||
(prefix == null ? "" : prefix) + StringUtil.first(desc, 100, true)+(suffix == null ? "" : suffix) +
|
||||
"</body></html>";
|
||||
}
|
||||
|
||||
@@ -351,9 +351,7 @@ public abstract class SlicePanel extends JPanel implements TypeSafeDataProvider,
|
||||
if (isToShowAutoScrollButton()) {
|
||||
actionGroup.add(myAutoScrollToSourceHandler.createToggleAction());
|
||||
}
|
||||
if (isToShowCloseButton()) {
|
||||
actionGroup.add(new CloseAction());
|
||||
}
|
||||
|
||||
if (isToShowPreviewButton()) {
|
||||
actionGroup.add(new ToggleAction(UsageViewBundle.message("preview.usages.action.text", "usages"), "preview", AllIcons.Actions.PreviewDetails) {
|
||||
@Override
|
||||
@@ -382,20 +380,11 @@ public abstract class SlicePanel extends JPanel implements TypeSafeDataProvider,
|
||||
|
||||
public abstract void setAutoScroll(boolean autoScroll);
|
||||
|
||||
public boolean isToShowCloseButton() {return true;}
|
||||
|
||||
public boolean isToShowPreviewButton() {return true;}
|
||||
public abstract boolean isPreview();
|
||||
|
||||
public abstract void setPreview(boolean preview);
|
||||
|
||||
private class CloseAction extends CloseTabToolbarAction {
|
||||
@Override
|
||||
public final void actionPerformed(final AnActionEvent e) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
protected void close() {
|
||||
final ProgressIndicator progress = myBuilder.getUi().getProgress();
|
||||
if (progress != null) {
|
||||
|
||||
@@ -50,7 +50,7 @@ public class BaseLabel extends JLabel {
|
||||
|
||||
@Override
|
||||
public Font getFont() {
|
||||
Font font = JBUI.CurrentTheme.ToolWindow.headerFont();
|
||||
Font font = getLabelFont();
|
||||
if (myBold) {
|
||||
font = font.deriveFont(Font.BOLD);
|
||||
}
|
||||
@@ -59,8 +59,7 @@ public class BaseLabel extends JLabel {
|
||||
}
|
||||
|
||||
public static Font getLabelFont() {
|
||||
Font f = UIUtil.getLabelFont();
|
||||
return f.deriveFont(f.getStyle(), Math.max(11, f.getSize() - 2));
|
||||
return JBUI.CurrentTheme.ToolWindow.headerFont();
|
||||
}
|
||||
|
||||
public void setActiveFg(final Color fg) {
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ class ContentTabLabel extends BaseLabel {
|
||||
}
|
||||
|
||||
public ContentTabLabel(@NotNull Content content, @NotNull TabContentLayout layout) {
|
||||
super(layout.myUi, true);
|
||||
super(layout.myUi, false);
|
||||
myLayout = layout;
|
||||
myContent = content;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user