simplified the settings

This commit is contained in:
hneemann 2019-02-07 11:39:47 +01:00
parent 277d247246
commit 9e2aab9a90
3 changed files with 4 additions and 11 deletions

View File

@ -457,7 +457,7 @@ public final class Keys {
* enables the MAC mouse mode * enables the MAC mouse mode
*/ */
public static final Key<Boolean> SETTINGS_MAC_MOUSE public static final Key<Boolean> SETTINGS_MAC_MOUSE
= new Key<>("macMouse", Screen.isMac()).setRequiresRestart(); = new Key<>("macMouse", Screen.isMac()).setRequiresRestart().setSecondary();
/** /**
* output format for numbers * output format for numbers
@ -591,7 +591,8 @@ public final class Keys {
.setComboBoxValues(100, 120, 150, 180, 200, 250, 300) .setComboBoxValues(100, 120, 150, 180, 200, 250, 300)
.setMin(50) .setMin(50)
.setMax(400) .setMax(400)
.setRequiresRestart(); .setRequiresRestart()
.setSecondary();
/** /**
* true if a enable input is needed * true if a enable input is needed
@ -701,11 +702,4 @@ public final class Keys {
public static final Key<Boolean> WIDE_SHAPE public static final Key<Boolean> WIDE_SHAPE
= new Key<>("wideShape", false).setSecondary().allowGroupEdit(); = new Key<>("wideShape", false).setSecondary().allowGroupEdit();
/**
* Selects the wide shapes as the default
*/
public static final Key<Boolean> SETTINGS_USE_WIDE_SHAPES
= new Key<>("wideShapeAsDefault", false).setSecondary().setRequiresRestart();
} }

View File

@ -305,7 +305,7 @@ public class LibraryNode implements Iterable<LibraryNode> {
public VisualElement setWideShapeFlagTo(VisualElement visualElement) { public VisualElement setWideShapeFlagTo(VisualElement visualElement) {
// set the wide shape option to the element // set the wide shape option to the element
try { try {
if (Settings.getInstance().get(Keys.SETTINGS_USE_WIDE_SHAPES) if (Settings.getInstance().get(Keys.SETTINGS_IEEE_SHAPES)
&& getDescription().hasAttribute(Keys.WIDE_SHAPE)) && getDescription().hasAttribute(Keys.WIDE_SHAPE))
visualElement.setAttribute(Keys.WIDE_SHAPE, true); visualElement.setAttribute(Keys.WIDE_SHAPE, true);
} catch (IOException e1) { } catch (IOException e1) {

View File

@ -46,7 +46,6 @@ public final class Settings implements AttributeListener {
private Settings() { private Settings() {
List<Key> intList = new ArrayList<>(); List<Key> intList = new ArrayList<>();
intList.add(Keys.SETTINGS_IEEE_SHAPES); intList.add(Keys.SETTINGS_IEEE_SHAPES);
intList.add(Keys.SETTINGS_USE_WIDE_SHAPES);
intList.add(Keys.SETTINGS_LANGUAGE); intList.add(Keys.SETTINGS_LANGUAGE);
intList.add(Keys.SETTINGS_EXPRESSION_FORMAT); intList.add(Keys.SETTINGS_EXPRESSION_FORMAT);
intList.add(Keys.SETTINGS_DEFAULT_TREESELECT); intList.add(Keys.SETTINGS_DEFAULT_TREESELECT);