]> git.tdb.fi Git - libs/gltk.git/commitdiff
Make sure gravity can't overpower expand
authorMikko Rasa <tdb@tdb.fi>
Thu, 25 Aug 2016 21:23:05 +0000 (00:23 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 25 Aug 2016 21:23:05 +0000 (00:23 +0300)
source/layout.cpp

index b4cd7683c6bc60d2b615c7c46323b773e4a668cf..4048e1147ac9321ab2596d1441db26b102e55a82 100644 (file)
@@ -362,7 +362,7 @@ void Layout::solve_constraints(int dir, SolveMode mode)
        columns of a widget are its position and dimension, respectively.  The
        remaining three are slack columns; see below for their purposes. */
        LinearProgram linprog(n_active_slots*5+n_slack_vars[dir]+1);
-       float weight = slots.size();
+       float weight = slots.size()+1;
        unsigned k = n_active_slots*5;
        for(list<Slot *>::iterator i=slots.begin(); i!=slots.end(); ++i)
        {