first steps in merging cBox into constraint packer

This commit is contained in:
Paul Davis 2020-07-10 13:33:14 -06:00
parent 860d43697c
commit af60c50990
2 changed files with 13 additions and 4 deletions

View file

@ -37,12 +37,13 @@ using std::vector;
using kiwi::Constraint;
using namespace kiwi;
ConstraintPacker::ConstraintPacker (Canvas* canvas)
ConstraintPacker::ConstraintPacker (Canvas* canvas, Orientation o)
: Container (canvas)
, width (X_("packer width"))
, height (X_("packer height"))
, in_alloc (false)
, _need_constraint_update (false)
, _orientation (o)
{
set_fill (false);
set_outline (false);
@ -52,12 +53,13 @@ ConstraintPacker::ConstraintPacker (Canvas* canvas)
_solver.addEditVariable (height, kiwi::strength::strong);
}
ConstraintPacker::ConstraintPacker (Item* parent)
ConstraintPacker::ConstraintPacker (Item* parent, Orientation o)
: Container (parent)
, width (X_("packer width"))
, height (X_("packer height"))
, in_alloc (false)
, _need_constraint_update (false)
, _orientation (o)
{
set_fill (false);
set_outline (false);