projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed TextComponent having two different positions:
[Mograsim.git]
/
net.mograsim.logic.ui
/
src
/
net
/
mograsim
/
logic
/
ui
/
model
/
components
/
TextComponent.java
diff --git
a/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java
b/net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java
index
339d4f5
..
542b7f0
100644
(file)
--- a/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java
+++ b/
net.mograsim.logic.ui/src/net/mograsim/logic/ui/model/components/TextComponent.java
@@
-28,7
+28,7
@@
public class TextComponent extends GUIComponent
Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text");
\r
if (textColor != null)
\r
gc.setForeground(textColor);
\r
Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text");
\r
if (textColor != null)
\r
gc.setForeground(textColor);
\r
- gc.drawText(text, getPosX()
- textExtent.x / 2, getPosY() - textExtent.y / 2
, true);
\r
+ gc.drawText(text, getPosX()
, getPosY()
, true);
\r
}
\r
\r
@Override
\r
}
\r
\r
@Override
\r
@@
-36,7
+36,7
@@
public class TextComponent extends GUIComponent
{
\r
if (textExtent == null)
\r
return super.getBounds();
\r
{
\r
if (textExtent == null)
\r
return super.getBounds();
\r
- return new Rectangle(getPosX()
- textExtent.x / 2, getPosY() - textExtent.y / 2
, textExtent.x, textExtent.y);
\r
+ return new Rectangle(getPosX()
, getPosY()
, textExtent.x, textExtent.y);
\r
}
\r
\r
static
\r
}
\r
\r
static
\r