Implement our own dialog form for display of text messages#1423
Implement our own dialog form for display of text messages#1423CharliePoole merged 2 commits intomainfrom
Conversation
|
I'll start review tomorrow when I'm back home. |
| for (int index = entries.Count; --index >= 0;) | ||
| if (!File.Exists(entries[index])) | ||
| entries.RemoveAt(index); | ||
|
|
There was a problem hiding this comment.
This change isn't really necessary for using the new dialog. But I noticed that we had not carried out our decision to automatically remove such files and did it here. Of course, we could the feature to one of our settings pages if that seems better, but I thought I'd try this approach first.
There was a problem hiding this comment.
Good decision! And I prefer to keep it simple without introducing a setting.
There was a problem hiding this comment.
I decided to do a second commit, removing the TextBox from the form. Drawing of the text is now in OnPaint just as for TipWindow. Probably, I could have made the TextBox work, but this was easier and I no longer have to add in any unexplained extra height.
rowo360
left a comment
There was a problem hiding this comment.
Looks fine: the size calculation looks similar to TipWindow. Of course, it's difficult to review the effect by looking only at the code, but I'll check also after merge if some deviations exists (e.g. 4k display)
Number 11 solved 🎉!
|
OK, I'll do some more on it.
Meanwhile, I'll experiment with short messages - I focused on large messages when I wrote it. |
|
I have everything fixed but the positioning. I'll work on that tomorrow. In fact, the text message dialog is displayed in your image at the correct location, but it's taken as relative to the screen rather than the controlling settings dialog. |




Fixes #11 at last!
@rowo360 Please take a close look at how I calculate the size needed for the text. It's very similar to how I do it for the
TipWindowclass, but doesn't come out quite right. I'd prefer not to add in the extra "fudge factor" for the height. Main difference fromTipWindowis the use of aTextBoxrather than writing directly to the window.Once this is merged, I'll rebase the issue-1418 branch and continue to work on that issue.