X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdropdown.cpp;h=bcd501950a08aee01f584c925725717c5b83223b;hb=91997dd;hp=d120c85856e60b76730ef24f4cb4b0d74e99f61a;hpb=deb15ee122f963ca41121e8358d5845401ac43ca;p=libs%2Fgltk.git diff --git a/source/dropdown.cpp b/source/dropdown.cpp index d120c85..bcd5019 100644 --- a/source/dropdown.cpp +++ b/source/dropdown.cpp @@ -18,16 +18,11 @@ using namespace std; namespace Msp { namespace GLtk { -Dropdown::Dropdown(const Resources &r): - Widget(r), - Container(r), - list(r), +Dropdown::Dropdown(): dropped(false) { add(list); list.signal_item_selected.connect(sigc::mem_fun(this, &Dropdown::list_item_selected)); - - update_style(); } void Dropdown::append(const string &item) @@ -110,6 +105,11 @@ void Dropdown::on_geometry_change() resize_list(); } +void Dropdown::on_style_change() +{ + resize_list(); +} + void Dropdown::resize_list() { list.autosize();