X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdropdown.cpp;h=ab00c4c3f0c7bd06c0edc453d18c0315ebf36063;hb=aa9b8db38efb9e97460c76e27cecc4d1591b23e5;hp=1084612304f03b68a303af130aa2b3bd3b1b2f82;hpb=878faa0c9283ee1e6e5e67b6ea1324cc52385742;p=libs%2Fgltk.git diff --git a/source/dropdown.cpp b/source/dropdown.cpp index 1084612..ab00c4c 100644 --- a/source/dropdown.cpp +++ b/source/dropdown.cpp @@ -27,8 +27,6 @@ void Dropdown::init() { input_type = INPUT_NAVIGATION; - dropped = false; - add(list); list.set_visible(false); list.set_view_all(); @@ -53,7 +51,7 @@ void Dropdown::autosize_special(const Part &part, Geometry &ageom) const unsigned max_w = 0; const ListData &data = list.get_data(); - for(unsigned i=0; i(font.get_string_width(data.get_string(i))*font_size); max_w = max(max_w, w); @@ -179,7 +177,7 @@ void Dropdown::resize_list() list.set_geometry(lgeom); } -void Dropdown::list_item_selected(unsigned index) +void Dropdown::list_item_selected(size_t index) { if(dropped) {