Skip to content

Commit 933d2a2

Browse files
committed
Revert changes to override 'not_enabled' styling with custom css
1 parent 9d4979d commit 933d2a2

File tree

3 files changed

+0
-31
lines changed

3 files changed

+0
-31
lines changed

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/JFXPreferences.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ public class JFXPreferences
2424
@Preference public static int tooltip_display_sec;
2525
/** make the transparent parts of symbols clickable */
2626
@Preference public static boolean pick_on_bounds;
27-
/** Override the default 'not_enabled' css style */
28-
@Preference public static String not_enabled_style;
2927

3028
static
3129
{

app/display/representation-javafx/src/main/java/org/csstudio/display/builder/representation/javafx/widgets/JFXBaseRepresentation.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.csstudio.display.builder.model.widgets.TabsWidget.TabItemProperty;
2828
import org.csstudio.display.builder.representation.WidgetRepresentation;
2929
import org.csstudio.display.builder.representation.javafx.Cursors;
30-
import org.csstudio.display.builder.representation.javafx.JFXPreferences;
3130
import org.csstudio.display.builder.representation.javafx.JFXRepresentation;
3231

3332
import javafx.collections.ObservableList;
@@ -375,28 +374,7 @@ public void setDisabledLook(Boolean enabled, ObservableList<Node> children) {
375374
if (children != null) {
376375
for (Node node : children)
377376
{
378-
// Apply default 'not_enabled' style
379377
Styles.update(node, Styles.NOT_ENABLED, !enabled);
380-
Boolean useCustomStyling = !JFXPreferences.not_enabled_style.equals("");
381-
if (useCustomStyling)
382-
{
383-
// Remove 'default' not_enabled styling
384-
Styles.update(node, Styles.NOT_ENABLED, false);
385-
String customCss = "/*CustomCSS START*/" + JFXPreferences.not_enabled_style
386-
+ "/*END*/";
387-
388-
if (!enabled)
389-
{
390-
// Apply users 'not enabled' style
391-
node.setStyle(node.getStyle()+customCss);
392-
}
393-
else
394-
{
395-
// Remove the users disabled style from the current style
396-
String removeDisabled = node.getStyle().replace(customCss, "");
397-
node.setStyle(removeDisabled);
398-
}
399-
}
400378
}
401379
}
402380
}

app/display/representation-javafx/src/main/resources/jfx_repr_preferences.properties

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,3 @@ tooltip_display_sec=30
2222
# of the symbol widget. If false, interaction is
2323
# limited to the visible area of the element.
2424
pick_on_bounds=false
25-
26-
# User can set the disabled/not_enabled css styling. Otherwise
27-
# the default will be used which sets the opacity to 0.4.
28-
# E.g. to not change the opacity set
29-
# not_enabled_style=-fx-opacity: 1.0;-fx-background-insets: 0;
30-
# -fx-color: -fx-base; -fx-focus-color: -fx-base;
31-
not_enabled_style=

0 commit comments

Comments
 (0)