From: Holger Schemel Date: Tue, 12 Mar 2024 20:50:25 +0000 (+0100) Subject: fixed left text alignment for drawing area gadgets in level editor X-Git-Tag: 4.4.0.0-test-1~194 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b26718d0bbcf4aa13b2b4d66798663478114b44f;p=rocksndiamonds.git fixed left text alignment for drawing area gadgets in level editor --- diff --git a/src/editor.c b/src/editor.c index 6da69dfd..2d945fb5 100644 --- a/src/editor.c +++ b/src/editor.c @@ -6406,7 +6406,7 @@ static int getTextWidthForDrawingArea(char *text) if (text == NULL) return 0; - return (getTextWidth(text, FONT_TEXT_1) + ED_DRAWINGAREA_TEXT_DISTANCE); + return (getTextWidth(text, FONT_TEXT_1) + ED_DRAWINGAREA_BORDER_SIZE); } static int getRightGadgetBorder(struct GadgetInfo *gi, char *text) @@ -8313,7 +8313,7 @@ static void MapDrawingArea(int id) int area_ysize = gi->drawing.area_ysize; int xoffset_left = getTextWidthForDrawingArea(drawingarea_info[id].text_left); int xoffset_below = getTextWidth(drawingarea_info[id].text_below, font_nr); - int x_left = gi->x - xoffset_left; + int x_left = gi->x - xoffset_left - ED_DRAWINGAREA_BORDER_SIZE; int x_right = gi->x + gi->width + ED_DRAWINGAREA_TEXT_DISTANCE; int x_above = gi->x - ED_DRAWINGAREA_BORDER_SIZE; int x_below = gi->x + (gi->width - xoffset_below) / 2;