Skip to content

Commit 2f20907

Browse files
committed
Revert "Try styling for icons"
This reverts commit ed63af0.
1 parent ed63af0 commit 2f20907

File tree

3 files changed

+1
-67
lines changed

3 files changed

+1
-67
lines changed

src/main/java/net/sourceforge/pmd/util/fxdesigner/util/TreeIcons.java

Lines changed: 0 additions & 42 deletions
This file was deleted.

src/main/java/net/sourceforge/pmd/util/fxdesigner/util/controls/ASTTreeItem.java

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,22 +16,17 @@
1616
import java.util.function.Consumer;
1717

1818
import org.apache.commons.lang3.mutable.MutableInt;
19-
import org.checkerframework.checker.nullness.qual.Nullable;
2019
import org.reactfx.value.Var;
2120

2221
import net.sourceforge.pmd.lang.ast.Node;
2322
import net.sourceforge.pmd.lang.ast.xpath.Attribute;
2423
import net.sourceforge.pmd.util.designerbindings.DesignerBindings;
2524
import net.sourceforge.pmd.util.designerbindings.DesignerBindings.DefaultDesignerBindings;
26-
import net.sourceforge.pmd.util.designerbindings.DesignerBindings.TreeIconId;
2725
import net.sourceforge.pmd.util.fxdesigner.app.ApplicationComponent;
2826
import net.sourceforge.pmd.util.fxdesigner.app.DesignerRoot;
29-
import net.sourceforge.pmd.util.fxdesigner.util.TreeIcons;
3027
import net.sourceforge.pmd.util.fxdesigner.util.controls.SearchableTreeView.SearchableTreeItem;
3128

32-
import javafx.scene.control.Tooltip;
3329
import javafx.scene.control.TreeItem;
34-
import javafx.scene.text.Text;
3530
import javafx.scene.text.TextFlow;
3631

3732
/**
@@ -205,9 +200,7 @@ TextFlow styledPresentableText(Node node) {
205200

206201
Attribute attr = bindings.getMainAttribute(node);
207202

208-
TextFlow flow = new TextFlow();
209-
addXPathName(flow, node.getXPathNodeName(), bindings.getIcon(node));
210-
203+
TextFlow flow = new TextFlow(makeStyledText(node.getXPathNodeName(), NODE_XPATH_NAME_CSS));
211204
if (attr != null && attr.getStringValue() != null) {
212205
flow.getChildren().add(makeStyledText(" [", NODE_XPATH_PUNCT_CSS));
213206
flow.getChildren().add(makeStyledText("@" + attr.getName(), NODE_XPATH_MAIN_ATTR_NAME_CSS));
@@ -219,16 +212,4 @@ TextFlow styledPresentableText(Node node) {
219212
}
220213

221214

222-
private void addXPathName(TextFlow flow, String name, @Nullable TreeIconId id) {
223-
if (id == null) {
224-
flow.getChildren().addAll(makeStyledText(name, NODE_XPATH_NAME_CSS));
225-
} else {
226-
Text headText = new Text(name);
227-
headText.getStyleClass().addAll(NODE_XPATH_NAME_CSS, "tree-icon-emphasis", TreeIcons.cssClass(id));
228-
Tooltip.install(headText, new Tooltip(TreeIcons.displayName(id)));
229-
flow.getChildren().add(headText);
230-
}
231-
}
232-
233-
234215
}

src/main/resources/net/sourceforge/pmd/util/fxdesigner/less/designer.less

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,6 @@
4545
}
4646
}
4747

48-
.tree-icon-emphasis {
49-
-fx-fill: green;
50-
-fx-font-weight: bold;
51-
}
52-
5348

5449
.table-view {
5550
-fx-border-color: @darker-accent;

0 commit comments

Comments
 (0)