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
241a3bb
..
e5a6347
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");
if (textColor != null)
gc.setForeground(textColor);
Color textColor = Preferences.current().getColor("net.mograsim.logic.ui.color.text");
if (textColor != null)
gc.setForeground(textColor);
- gc.drawText(text, getPosX()
- textExtent.x / 2, getPosY() - textExtent.y / 2
, true);
+ gc.drawText(text, getPosX()
, getPosY()
, true);
}
@Override
}
@Override
@@
-36,7
+36,7
@@
public class TextComponent extends GUIComponent
{
if (textExtent == null)
return super.getBounds();
{
if (textExtent == null)
return super.getBounds();
- return new Rectangle(getPosX()
- textExtent.x / 2, getPosY() - textExtent.y / 2
, textExtent.x, textExtent.y);
+ return new Rectangle(getPosX()
, getPosY()
, textExtent.x, textExtent.y);
}
static
}
static