Wed Jan 8 01:16:29 2003 Michael Jennings (mej)

Fixed a bug with non-bordered icons being rendered at 0 size.


SVN revision: 6552
This commit is contained in:
Michael Jennings 2003-01-08 06:17:12 +00:00
parent 11df91c713
commit 45cc00b37f
3 changed files with 12 additions and 2 deletions

View File

@ -4956,3 +4956,7 @@ Thu Jan 2 14:54:45 2003 Michael Jennings (mej)
Spec file update. Spec file update.
---------------------------------------------------------------------- ----------------------------------------------------------------------
Wed Jan 8 01:16:29 2003 Michael Jennings (mej)
Fixed a bug with non-bordered icons being rendered at 0 size.
----------------------------------------------------------------------

View File

@ -554,10 +554,12 @@ button_calc_size(buttonbar_t *bbar, button_t *button)
} }
#ifdef PIXMAP_SUPPORT #ifdef PIXMAP_SUPPORT
if (button->icon) { if (button->icon) {
unsigned short b = 0; unsigned short b;
if (bord) { if (bord) {
b = button->h - bord->top - bord->bottom; b = button->h - bord->top - bord->bottom;
} else {
b = button->h;
} }
imlib_context_set_image(button->icon->iml->im); imlib_context_set_image(button->icon->iml->im);
button->icon_w = imlib_image_get_width(); button->icon_w = imlib_image_get_width();

View File

@ -788,8 +788,12 @@ paste_simage(simage_t *simg, unsigned char which, Window win, Drawable d, unsign
GC gc; GC gc;
ASSERT(simg != NULL); ASSERT(simg != NULL);
REQUIRE(d != None);
D_PIXMAP(("paste_simage(%8p, %s, 0x%08x, 0x%08x, %hd, %hd, %hd, %hd) called.\n", simg, get_image_type(which), (int) win, (int) d, x, y, w, h)); D_PIXMAP(("paste_simage(%8p, %s, 0x%08x, 0x%08x, %hd, %hd, %hd, %hd) called.\n", simg, get_image_type(which), (int) win, (int) d, x, y, w, h));
REQUIRE(d != None);
REQUIRE(w > 0);
REQUIRE(h > 0);
if (which != image_max) { if (which != image_max) {
if (image_mode_is(which, MODE_AUTO) && image_mode_is(which, ALLOW_AUTO)) { if (image_mode_is(which, MODE_AUTO) && image_mode_is(which, ALLOW_AUTO)) {
char buff[255], *reply; char buff[255], *reply;