X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flist.cpp;h=218b26bd1410b82d7f33fb80c0dd6cbfa3bf86f1;hb=f3d8d9510ac81c23f67025983aa7171ec5adcda9;hp=7041f733759da99585d2b4dde562458a9684ea3e;hpb=eb6eee5fabf05abca4a0434c2a8f8f62c900afec;p=libs%2Fgltk.git diff --git a/source/list.cpp b/source/list.cpp index 7041f73..218b26b 100644 --- a/source/list.cpp +++ b/source/list.cpp @@ -132,6 +132,7 @@ void List::set_selected_index(int i) { sel_index = i; signal_item_selected.emit(sel_index, items[sel_index]); + rebuild(); } else throw out_of_range("List::set_selected_index"); @@ -159,7 +160,7 @@ void List::rebuild_special(const Part &part, CachedPart &cache) GL::MeshBuilder bld(*cache.mesh); bld.color(style->get_font_color()); - bld.matrix() *= GL::Matrix::translation(pgeom.x, pgeom.y+geom.h-pgeom.h, 0); + bld.matrix() *= GL::Matrix::translation(margin.left, geom.h-pgeom.h-font.get_descent()*style->get_font_size(), 0); for(unsigned i=0; (i