From: Daniel Kirschten Date: Thu, 16 May 2019 08:58:43 +0000 (+0200) Subject: Fixed incorrect symbol for OR and AND gates X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=2ab9aca886504ee2612ba4a025e9ded69f535c74;p=Mograsim.git Fixed incorrect symbol for OR and AND gates --- diff --git a/LogicUI/src/era/mi/gui/components/GUIAndGate.java b/LogicUI/src/era/mi/gui/components/GUIAndGate.java index 8ff6068c..3a5a5e66 100644 --- a/LogicUI/src/era/mi/gui/components/GUIAndGate.java +++ b/LogicUI/src/era/mi/gui/components/GUIAndGate.java @@ -53,14 +53,13 @@ public class GUIAndGate extends AndGate implements BasicGUIComponent @Override public void render(GeneralGC gc) { - gc.drawRectangle(0, 0, 17, height); + gc.drawRectangle(0, 0, 20, height); Font oldFont = gc.getFont(); Font labelFont = new Font(oldFont.getName(), 5, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(LABEL); - gc.drawText(LABEL, 8.5 - textExtent.x / 2, (height - textExtent.y) / 2, true); + gc.drawText(LABEL, 10 - textExtent.x / 2, (height - textExtent.y) / 2, true); gc.setFont(oldFont); - gc.drawOval(17, height / 2 - 1.5, 3, 3); } @Override diff --git a/LogicUI/src/era/mi/gui/components/GUIOrGate.java b/LogicUI/src/era/mi/gui/components/GUIOrGate.java index 4ca09f58..90b7039e 100644 --- a/LogicUI/src/era/mi/gui/components/GUIOrGate.java +++ b/LogicUI/src/era/mi/gui/components/GUIOrGate.java @@ -53,14 +53,13 @@ public class GUIOrGate extends OrGate implements BasicGUIComponent @Override public void render(GeneralGC gc) { - gc.drawRectangle(0, 0, 17, height); + gc.drawRectangle(0, 0, 20, height); Font oldFont = gc.getFont(); Font labelFont = new Font(oldFont.getName(), 5, oldFont.getStyle()); gc.setFont(labelFont); Point textExtent = gc.textExtent(LABEL); - gc.drawText(LABEL, 8.5 - textExtent.x / 2, (height - textExtent.y) / 2, true); + gc.drawText(LABEL, 10 - textExtent.x / 2, (height - textExtent.y) / 2, true); gc.setFont(oldFont); - gc.drawOval(17, height / 2 - 1.5, 3, 3); } @Override