aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/TextBox.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/FbTk/TextBox.cc b/src/FbTk/TextBox.cc
index 2cfec30..2e3ed7f 100644
--- a/src/FbTk/TextBox.cc
+++ b/src/FbTk/TextBox.cc
@@ -211,7 +211,7 @@ void TextBox::clear() {
211 Display *dpy = FbTk::App::instance()->display(); 211 Display *dpy = FbTk::App::instance()->display();
212 FbWindow::clear(); 212 FbWindow::clear();
213 // center text by default 213 // center text by default
214 int center_pos = (height() + font().ascent())/2; 214 int center_pos = (height() - font().height())/2 + font().ascent();
215 if (gc() == 0) 215 if (gc() == 0)
216 setGC(DefaultGC(dpy, screenNumber())); 216 setGC(DefaultGC(dpy, screenNumber()));
217 217