]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/mixedrows.cpp
Add constraint types that allow flexible spacing between widgets
[libs/gltk.git] / source / mixedrows.cpp
index bfcf6219c0b75660c12d5d564c4290d6dd8b78b9..763702057c65429e8114ff6643520622923612d3 100644 (file)
@@ -43,8 +43,7 @@ Layout::Slot *MixedRows::create_slot(Widget &wdg)
        if(!first)
        {
                Slot *prev = slots.back();
-               if(!hsplit)
-                       slot->constraints.push_back(Constraint(RIGHT_OF, *prev));
+               slot->constraints.push_back(Constraint((hsplit ? FAR_RIGHT_OF : RIGHT_OF), *prev));
                slot->constraints.push_back(Constraint(ALIGN_TOP, *prev));
                slot->constraints.push_back(Constraint(ALIGN_BOTTOM, *prev));
                if(uniform_cols)
@@ -53,8 +52,7 @@ Layout::Slot *MixedRows::create_slot(Widget &wdg)
        else if(!slots.empty())
        {
                Slot *prev = slots.back();
-               if(!vsplit)
-                       slot->constraints.push_back(Constraint(BELOW, *prev));
+               slot->constraints.push_back(Constraint((vsplit ? FAR_BELOW : BELOW), *prev));
                if(uniform_rows)
                        slot->constraints.push_back(Constraint(COPY_HEIGHT, *prev));
        }