Fix buttons overlapping icon in message box (#826)

This commit is contained in:
Matthias Melcher 2023-11-07 14:09:36 +01:00
parent d7768b76d0
commit 90d7737254
1 changed files with 8 additions and 0 deletions

View File

@ -259,6 +259,14 @@ void Fl_Message::resizeform() {
if (w > max_w)
max_w = w;
// if the button horizontally overlap the icon, make sure that they are drawn
// below to icon by making the text part at least as tall as the icon.
if (w > message_w && text_height < icon_size) {
int pad_h = icon_size-text_height;
message_h += pad_h;
text_height += pad_h;
}
message_w = max_w - 10 - icon_size;
w = max_w + 20;