XCB version working - except libPNG version issue

This commit is contained in:
Vadim Lopatin 2014-03-14 17:39:56 +04:00
parent bf57f2f26f
commit a3d195fb8b
1 changed files with 424 additions and 419 deletions

View File

@ -84,6 +84,8 @@ class Widget {
@property Rect padding() const {
// get max padding from style padding and background drawable padding
Rect p = style.padding;
DrawableRef d = style.backgroundDrawable;
if (!d.isNull) {
Rect dp = style.backgroundDrawable.padding;
if (p.left < dp.left)
p.left = dp.left;
@ -93,6 +95,7 @@ class Widget {
p.top = dp.top;
if (p.bottom < dp.bottom)
p.bottom = dp.bottom;
}
return p;
}
/// set padding for widget - override one from style
@ -259,7 +262,9 @@ class Widget {
Rect rc = _pos;
applyMargins(rc);
DrawableRef bg = style.backgroundDrawable;
if (!bg.isNull) {
bg.drawTo(buf, rc);
}
applyPadding(rc);
_needDraw = false;
}