diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/SmeBSB.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/SmeBSB.c b/src/SmeBSB.c index 52a789a..0b4f94f 100644 --- a/src/SmeBSB.c +++ b/src/SmeBSB.c @@ -348,7 +348,7 @@ XawSmeBSBRedisplay(Widget w, XEvent *event, Region region) if (entry->sme_bsb.label != NULL) { int x_loc = entry->sme_bsb.left_margin; - int len = strlen(entry->sme_bsb.label); + int len = (int)strlen(entry->sme_bsb.label); char *label = entry->sme_bsb.label; int width, t_width; @@ -573,28 +573,28 @@ GetDefaultSize(Widget w, Dimension *width, Dimension *height) if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XmbTextEscapement(entry->sme_bsb.fontset, + *width = (Dimension)XmbTextEscapement(entry->sme_bsb.fontset, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + (int)strlen(entry->sme_bsb.label)); + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); *height = ext->max_ink_extent.height; - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } else { if (entry->sme_bsb.label == NULL) *width = 0; else - *width = XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, - strlen(entry->sme_bsb.label)); + *width = (Dimension)XTextWidth(entry->sme_bsb.font, entry->sme_bsb.label, + (int)strlen(entry->sme_bsb.label)); - *width += entry->sme_bsb.left_margin + entry->sme_bsb.right_margin; + *width = (Dimension)(*width + (entry->sme_bsb.left_margin + entry->sme_bsb.right_margin)); - *height = entry->sme_bsb.font->max_bounds.ascent + - entry->sme_bsb.font->max_bounds.descent; + *height = (Dimension)(entry->sme_bsb.font->max_bounds.ascent + + entry->sme_bsb.font->max_bounds.descent); - *height = ((int)*height * (ONE_HUNDRED + - entry->sme_bsb.vert_space)) / ONE_HUNDRED; + *height = (Dimension)(((int)*height * (ONE_HUNDRED + + entry->sme_bsb.vert_space)) / ONE_HUNDRED); } } @@ -678,16 +678,16 @@ GetBitmapInfo(Widget w, Bool is_left) XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.left_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.left_bitmap_width = width; - entry->sme_bsb.left_bitmap_height = height; + entry->sme_bsb.left_bitmap_width = (Dimension)width; + entry->sme_bsb.left_bitmap_height = (Dimension)height; } } else if (entry->sme_bsb.right_bitmap != None && XGetGeometry(XtDisplayOfObject(w), entry->sme_bsb.right_bitmap, &root, &x, &y, &width, &height, &bw, &depth)) { - entry->sme_bsb.right_bitmap_width = width; - entry->sme_bsb.right_bitmap_height = height; + entry->sme_bsb.right_bitmap_width = (Dimension)width; + entry->sme_bsb.right_bitmap_height = (Dimension)height; } } |