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=d9ab1e297347a894c24ded5bdd23c68751da6551;hp=c907a38954f0f14a3e8e7154671aad2c878cf322;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 6f4601b2..6ad327a6 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 86cdb31c..e3ff8f39 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