From: Daniel Kirschten Date: Mon, 18 May 2020 14:35:25 +0000 (+0200) Subject: Added the RenderPreference LINE_DASH_IMPROVEMENT_FACTOR X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=61fc95ac96e43d8f6de4097f269faf21d03516bf;p=Mograsim.git Added the RenderPreference LINE_DASH_IMPROVEMENT_FACTOR --- diff --git a/SWTHelper/bundles b/SWTHelper/bundles index 42cb88fa..981a12a3 160000 --- a/SWTHelper/bundles +++ b/SWTHelper/bundles @@ -1 +1 @@ -Subproject commit 42cb88fa0fb6535fe86fa82663047c2fa49ca0f5 +Subproject commit 981a12a39592317688792fd06c7342203e051b8b diff --git a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java index aabe0194..3af6c890 100644 --- a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java +++ b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/LogicUICanvas.java @@ -4,7 +4,8 @@ import static net.mograsim.logic.model.preferences.RenderPreferences.ACTION_BUTT import static net.mograsim.logic.model.preferences.RenderPreferences.BACKGROUND_COLOR; import static net.mograsim.logic.model.preferences.RenderPreferences.DEBUG_HLSSHELL_DEPTH; import static net.mograsim.logic.model.preferences.RenderPreferences.DEBUG_OPEN_HLSSHELL; -import static net.mograsim.logic.model.preferences.RenderPreferences.IMPROVE_TEXT; +import static net.mograsim.logic.model.preferences.RenderPreferences.IMPROVE_SCALING; +import static net.mograsim.logic.model.preferences.RenderPreferences.LINE_DASH_IMPROVEMENT_FACTOR; import java.util.ArrayList; import java.util.HashMap; @@ -50,7 +51,7 @@ public class LogicUICanvas extends ZoomableCanvas public LogicUICanvas(Composite parent, int style, LogicModel model, RenderPreferences renderPrefs) { // TODO add a listener - super(parent, style, renderPrefs.getBoolean(IMPROVE_TEXT)); + super(parent, style, renderPrefs.getBoolean(IMPROVE_SCALING), (float) renderPrefs.getDouble(LINE_DASH_IMPROVEMENT_FACTOR)); this.renderPrefs = renderPrefs; this.model = model; diff --git a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/DefaultRenderPreferences.java b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/DefaultRenderPreferences.java old mode 100755 new mode 100644 index 9a97ae1e..0a9e4323 --- a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/DefaultRenderPreferences.java +++ b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/DefaultRenderPreferences.java @@ -11,7 +11,7 @@ public class DefaultRenderPreferences extends DefaultPreferences implements Rend { switch (name) { - case IMPROVE_TEXT: + case IMPROVE_SCALING: return true; case DEBUG_OPEN_HLSSHELL: return false; @@ -43,6 +43,8 @@ public class DefaultRenderPreferences extends DefaultPreferences implements Rend { switch (name) { + case LINE_DASH_IMPROVEMENT_FACTOR: + return 100.0; case DEFAULT_LINE_WIDTH: return 0.5; case WIRE_WIDTH_SINGLEBIT: diff --git a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/RenderPreferences.java b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/RenderPreferences.java old mode 100755 new mode 100644 index fd325c3b..7f90988b --- a/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/RenderPreferences.java +++ b/plugins/net.mograsim.logic.model/src/net/mograsim/logic/model/preferences/RenderPreferences.java @@ -6,7 +6,8 @@ public interface RenderPreferences extends Preferences { public static final String PREFIX = "net.mograsim.logic.model."; - public static final String IMPROVE_TEXT = PREFIX + "improvetext"; + public static final String IMPROVE_SCALING = PREFIX + "improvescaling.enable"; + public static final String LINE_DASH_IMPROVEMENT_FACTOR = PREFIX + "improvescaling.factor"; public static final String TEXT_COLOR = PREFIX + "color.text"; public static final String FOREGROUND_COLOR = PREFIX + "color.foreground"; public static final String BACKGROUND_COLOR = PREFIX + "color.background";