Skip to content

Commit 4c92fc9

Browse files
committed
fix overlap of text in tux-area when pressing the new button
1 parent dbdf479 commit 4c92fc9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

TODO.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ es soll einfach der ordner stamps analysiert werden, dort die erste ebene als ka
2020

2121
# color slide effekt:
2222

23-
- wenn die colorbar ausgeblendet ist unterhalb des sliders (bzw. derr rechten toolbar) einen neuen farbwahl-button anzeigen zum reinsliden: app/src/main/assets/data/images/ui/color_picker_icon.png
23+
2424

2525
- wenn number of color rows in settings > 1 ist, dann muss dies im child mode ignorieren undtemporär auf 1 gesetzt werden
2626

app/src/main/jni/tuxpaint/src/tuxpaint.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15642,6 +15642,13 @@ static void draw_tux_text_ex(int which_tux, const char *const str, int want_righ
1564215642
if (fullscreen_ui_mode)
1564315643
r_tuxarea_offset.y += offset_y;
1564415644

15645+
/* Fix negative height - SDL_FillRect cannot clear rectangles with negative height */
15646+
if (r_tuxarea_offset.h <= 0)
15647+
{
15648+
/* Set to a reasonable minimum height or use the color bar height */
15649+
r_tuxarea_offset.h = (r_colors.h > 0) ? r_colors.h : 100;
15650+
}
15651+
1564515652
latest_tux = which_tux;
1564615653
latest_tux_text = str;
1564715654
latest_r2l = want_right_to_left;
@@ -25757,7 +25764,7 @@ static int do_new_dialog(void)
2575725764
/* Let user choose a color or image: */
2575825765

2575925766
/* Clear tux area before drawing new text to avoid overlap */
25760-
redraw_tux_text();
25767+
draw_tux_text(TUX_BORED, "", 0);
2576125768

2576225769
/* Instructions for 'New' file/color dialog */
2576325770
draw_tux_text(TUX_BORED, tool_tips[TOOL_NEW], 1);

0 commit comments

Comments
 (0)