X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fmodel%2Fwires%2FGUIWire.java;h=c564571584dea4cd85af274da94304f8e1cc61c4;hb=1c0601faecd9a838587a5aa42c8deca7dd43563c;hp=8b91fc4d2cacb6af7e37bfadbe6d490d3f89a0cc;hpb=9e0665527c4813950f523164cd753652feacbd21;p=Mograsim.git diff --git a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java index 8b91fc4d..c5645715 100644 --- a/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java +++ b/net.mograsim.logic.model/src/net/mograsim/logic/model/model/wires/GUIWire.java @@ -18,6 +18,7 @@ import net.mograsim.logic.core.wires.Wire.ReadEnd; import net.mograsim.logic.model.model.ViewModelModifiable; import net.mograsim.preferences.ColorDefinition; import net.mograsim.preferences.ColorManager; +import net.mograsim.preferences.Preferences; /** * A wire connecting exactly two {@link Pin}s. @@ -364,11 +365,15 @@ public class GUIWire */ public void render(GeneralGC gc) { - // TODO maybe make wires with logicWidth!=1 thicker? Maybe make thickness selectable? ColorDefinition wireColor = BitVectorFormatter.formatAsColor(end); if (wireColor != null) gc.setForeground(ColorManager.current().toColor(wireColor)); + if (logicWidth == 1) + gc.setLineWidth(Preferences.current().getDouble("net.mograsim.logic.model.linewidth.wire.singlebit")); + else + gc.setLineWidth(Preferences.current().getDouble("net.mograsim.logic.model.linewidth.wire.multibit")); gc.drawPolyline(effectivePath); + gc.setLineWidth(Preferences.current().getDouble("net.mograsim.logic.model.linewidth.default")); } // operations concerning the path