X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Farrangement.cpp;h=5eeebbb99abe8df310fca5720df8f1ff7d3233d3;hb=d85d9bd7dae120e3e7ebaf64e7b78a975fab94a6;hp=9982691e4cb0a81a3fdedb6c891739ce1a198701;hpb=f8f2f18e886429b70325ff36989bb126de617716;p=libs%2Fgltk.git diff --git a/source/arrangement.cpp b/source/arrangement.cpp index 9982691..5eeebbb 100644 --- a/source/arrangement.cpp +++ b/source/arrangement.cpp @@ -37,16 +37,21 @@ void Arrangement::arrange(Arrangement &arr) finish_slot(); } -void Arrangement::add_constraint(Widget &wdg, Layout::ConstraintType type, Side side) +void Arrangement::add_constraint(Widget &wdg, Layout::ConstraintType type, Side side, int spacing) { - add_constraint(wdg, type, edges[side]); + add_constraint(wdg, type, edges[side], spacing); } -void Arrangement::add_constraint(Widget &wdg, Layout::ConstraintType type, const Edge &edge) +void Arrangement::add_constraint(Widget &wdg, Layout::ConstraintType type, const Edge &edge, int spacing) { for(list::const_iterator i=edge.widgets.begin(); i!=edge.widgets.end(); ++i) if(*i!=&wdg) - layout.add_constraint(wdg, type, **i); + { + if(spacing<0) + layout.add_constraint(wdg, type, **i); + else + layout.add_constraint(wdg, type, **i, spacing); + } } Layout::ConstraintType Arrangement::get_order_constraint(Side s, bool slack)