diff options
author | Pete Beardmore <pete.beardmore@msn.com> | 2018-03-04 21:44:35 (GMT) |
---|---|---|
committer | Mathias Gumz <akira@fluxbox.org> | 2018-03-14 06:49:50 (GMT) |
commit | 79ce3ef424754d65081957121dcbe6efbc1885d2 (patch) | |
tree | 2c21769c8f1f08c99e78a3278292e6cb73645a89 | |
parent | 0df41cf8385e0a31b4c9158aa182da52a50ba534 (diff) | |
download | fluxbox-79ce3ef424754d65081957121dcbe6efbc1885d2.zip fluxbox-79ce3ef424754d65081957121dcbe6efbc1885d2.tar.bz2 |
fbtk, textbox, fix text vertical centering
-rw-r--r-- | src/FbTk/TextBox.cc | 2 |
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 | ||