X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fgeometry.cpp;h=0e46743b626ecf9edfffaa3b2b2de00bd0d2d25b;hb=3db68f2604b657e79f1b2b317c19c41c2d5a985b;hp=584a1aac55d934185e7bc68e793329a11d935a68;hpb=a9d04a73afcdf40c33d889090d303117b7fd3a7d;p=libs%2Fgltk.git diff --git a/source/geometry.cpp b/source/geometry.cpp index 584a1aa..0e46743 100644 --- a/source/geometry.cpp +++ b/source/geometry.cpp @@ -61,12 +61,12 @@ void Alignment::apply(Geometry &geom, const Geometry &parent, const Sides &margi geom.x+=margin.left; geom.y+=margin.bottom; - if(parent.w>geom.w) + if(pw>geom.w) { geom.w+=static_cast((pw-geom.w)*w); geom.x+=static_cast((pw-geom.w)*x); } - if(parent.h>geom.h) + if(ph>geom.h) { geom.h+=static_cast((ph-geom.h)*h); geom.y+=static_cast((ph-geom.h)*y);