]> git.tdb.fi Git - libs/gltk.git/commitdiff
Implement the Layout::set_spacing function and friends
authorMikko Rasa <tdb@tdb.fi>
Fri, 7 Dec 2012 10:28:59 +0000 (12:28 +0200)
committerMikko Rasa <tdb@tdb.fi>
Fri, 7 Dec 2012 10:28:59 +0000 (12:28 +0200)
source/layout.cpp

index ccd02830924b0622eb12dcf86ba4a0aa9b5a2b74..d5437f0b0a29ed04c1ce000534174fd0d9b9fa12 100644 (file)
@@ -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)