From: Mikko Rasa Date: Fri, 7 Dec 2012 10:28:59 +0000 (+0200) Subject: Implement the Layout::set_spacing function and friends X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=8fc5cb226f0c2b36298f51b3d2501b04ebb11b8a;p=libs%2Fgltk.git Implement the Layout::set_spacing function and friends --- diff --git a/source/layout.cpp b/source/layout.cpp index ccd0283..d5437f0 100644 --- a/source/layout.cpp +++ b/source/layout.cpp @@ -110,6 +110,28 @@ void Layout::set_margin(const Sides &m) update(); } +void Layout::set_spacing(unsigned s) +{ + row_spacing = s; + col_spacing = s; + if(container) + update(); +} + +void Layout::set_row_spacing(unsigned s) +{ + row_spacing = s; + if(container) + update(); +} + +void Layout::set_column_spacing(unsigned s) +{ + col_spacing = s; + if(container) + update(); +} + void Layout::add_widget(Widget &wdg) { if(!container)