fbtk, textbox, fix text vertical centering
This commit is contained in:
parent
0df41cf838
commit
79ce3ef424
1 changed files with 1 additions and 1 deletions
|
@ -211,7 +211,7 @@ void TextBox::clear() {
|
|||
Display *dpy = FbTk::App::instance()->display();
|
||||
FbWindow::clear();
|
||||
// center text by default
|
||||
int center_pos = (height() + font().ascent())/2;
|
||||
int center_pos = (height() - font().height())/2 + font().ascent();
|
||||
if (gc() == 0)
|
||||
setGC(DefaultGC(dpy, screenNumber()));
|
||||
|
||||
|
|
Loading…
Reference in a new issue