Skip to content

Commit c553562

Browse files
author
ArthurHub
committed
* fix tooltip not respecting max size
1 parent db9e1a1 commit c553562

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎Source/HtmlRenderer/HtmlToolTip.cs‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ private void OnToolTipPopup(object sender, PopupEventArgs e)
204204
}
205205

206206
//Set the size of the tooltip
207-
e.ToolTipSize = new Size((int)Math.Ceiling(_htmlContainer.ActualSize.Width), (int)Math.Ceiling(_htmlContainer.ActualSize.Height));
207+
e.ToolTipSize = new Size((int)Math.Ceiling(Math.Min(_htmlContainer.ActualSize.Width, MaximumSize.Width)),
208+
(int)Math.Ceiling(Math.Min(_htmlContainer.ActualSize.Height, MaximumSize.Height)));
208209

209210
// start mouse handle timer
210211
if( _allowLinksHandling )

0 commit comments

Comments
 (0)