X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.cpp;h=7f153eb5540e4462bfa57645fab2b113cfb06a8b;hb=68c4aa0eaaade8b163cf9b3a96aa640ea16b1def;hp=48ae0eda4b042b3e4096a2d7f494d3ea77db2e44;hpb=c1f038acb91eb3bfaa34dfd4729d19ed3f871a42;p=libs%2Fgltk.git diff --git a/source/widget.cpp b/source/widget.cpp index 48ae0ed..7f153eb 100644 --- a/source/widget.cpp +++ b/source/widget.cpp @@ -44,28 +44,6 @@ void Widget::render() const GL::pop_matrix(); } -bool Widget::button_press(int x, int y, unsigned btn) -{ - if(x>=geom.x && y>=geom.y && x(geom.w) && y(geom.h)) - { - on_button_press(x, y, btn); - return true; - } - - return false; -} - -bool Widget::button_release(int x, int y, unsigned btn) -{ - if(x>=geom.x && y>=geom.y && x(geom.w) && y(geom.h)) - { - on_button_release(x, y, btn); - return true; - } - - return false; -} - Widget::Widget(const Resources &r): res(r), style(0), @@ -98,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(font_size)); + part.get_alignment().apply(geom, text_w, static_cast(font->get_ascent()*font_size)); GL::scale_uniform(font_size); const Color &color=style->get_font_color();