Mercurial > dillo_port1.3
changeset 390:27cb8017f278
- Improvement for the radio/check buttons size patch.
author | jcid |
---|---|
date | Sun, 05 Oct 2008 21:04:58 +0200 |
parents | 554fc02750fa |
children | 5b4de1bb858b |
files | dw/fltkui.cc dw/fltkui.hh |
diffstat | 2 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/dw/fltkui.cc Sun Oct 05 18:43:23 2008 +0200 +++ b/dw/fltkui.cc Sun Oct 05 21:04:58 2008 +0200 @@ -678,7 +678,8 @@ template <class I> void FltkToggleButtonResource<I>::sizeRequest (core::Requisition *requisition) { - FltkFont *font = getFont(); + FltkFont *font = (FltkFont *) + (this->FltkResource::style ? this->FltkResource::style->font : NULL); if (font) { ::fltk::setfont(font->font, font->size);
--- a/dw/fltkui.hh Sun Oct 05 18:43:23 2008 +0200 +++ b/dw/fltkui.hh Sun Oct 05 21:04:58 2008 +0200 @@ -350,8 +350,6 @@ protected: virtual ::fltk::Button *createNewButton (core::Allocation *allocation) = 0; - // TODO: maybe getFont() is not the best way to do it... - virtual FltkFont *getFont() = 0; ::fltk::Widget *createNewWidget (core::Allocation *allocation); public: @@ -369,8 +367,6 @@ class FltkCheckButtonResource: public FltkToggleButtonResource <dw::core::ui::CheckButtonResource> { -private: - FltkFont *getFont() {return style ? (FltkFont *)style->font : NULL;} protected: ::fltk::Button *createNewButton (core::Allocation *allocation); @@ -431,7 +427,6 @@ Group *group; static void widgetCallback (::fltk::Widget *widget, void *data); - FltkFont *getFont() {return style ? (FltkFont *)style->font : NULL;} void buttonClicked (); protected: