]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.cpp
Implement set_range and set_step for Slider
[libs/gltk.git] / source / widget.cpp
index e1aee846675d3b9e69e37b5d5039bd21f5baa92b..7f153eb5540e4462bfa57645fab2b113cfb06a8b 100644 (file)
@@ -76,7 +76,7 @@ void Widget::render_text(const Part &part, const string &text) const
 
        GL::push_matrix();
 
-       part.get_alignment().apply(geom, text_w, static_cast<unsigned>(font_size));
+       part.get_alignment().apply(geom, text_w, static_cast<unsigned>(font->get_ascent()*font_size));
        GL::scale_uniform(font_size);
 
        const Color &color=style->get_font_color();