| [ Return to Bugs & Features | Roadmap 1.1 | SVN ⇄ GIT ]
STR #1626
Application: | FLTK Library |
Status: | 1 - Closed w/Resolution |
Priority: | 2 - Low, e.g. a documentation error or undocumented side-effect |
Scope: | 3 - Applies to all machines and operating systems |
Subsystem: | Core Library |
Summary: | fl_ask, fl_message, fl_alert icons don't scale well |
Version: | 1.1.7 |
Created By: | AlbrechtS |
Assigned To: | matt |
Fix Version: | 1.1.8 final (SVN: v5792) |
Update Notification: | |
Trouble Report Files:
Trouble Report Comments:
|
#1 | AlbrechtS 10:17 Mar 06, 2007 |
| I'll attach a patch file for src/fl_ask.cxx which limits the icon size in fl_ask(), fl_alert(), and fl_message() to max. 120x120. I tested this patch with a modified test/ask.cxx, and I'll also post a patch for this one, for testing purposes - and maybe to become part of the release version, too, because there are no other real test cases for fl_alert() and fl_message().
There are also two png files that show the bad scaling without the patch.
Please feel free to adjust the limit to another value, or modify the patch, but IMHO the icon size should be limited somehow.
The problem came up when an application showed a long text with line breaks using fl_message().
I tested it using Linux and Windows, and the look is the same.
Regards Albrecht | |
|
#2 | mike 10:47 Mar 06, 2007 |
| How about changing the dialog to use the Fl_Text_Display widget so that the contents are scrolled when longer than 120 pixels/~7 lines? We'll still be able to wrap and auto-size the dialog...
This would also have the nice side-effect of making the text selectable so that users can copy and paste the message... | |
|
#3 | AlbrechtS 10:58 Mar 06, 2007 |
| mike wrote: > How about changing the dialog to use the Fl_Text_Display widget so that > the contents are scrolled when longer than 120 pixels/~7 lines? [..]
Yes, I thought of that, too, but IMHO the fix should be done nevertheless.
Thanks for your input.
Albrecht | |
|
#4 | AlbrechtS 11:05 Mar 06, 2007 |
| Ahh, maybe I misunderstood you. Did you mean:
a) to change the application to use Fl_Text_Display, or b) to change FLTKs fl_message dialog ?
After reading it twice, I assume you meant (b), and I think that this would be a good idea.
Albrecht | |
|
#5 | matt 11:18 Mar 06, 2007 |
| My favorite would be b) with a fixed size icon and scrolling only when the box becomes taller than 2/3 of the screen height. It would even be conceivable to use an Fl_Help_View, but we would have to find a way to figure out the rendering size ahead of time. | |
|
#6 | mike 11:54 Mar 06, 2007 |
| Yeah, I meant b) so that all of the convenience dialogs would have selectable/copyable/scrollable text.
As for the fixed-size icon, I'm not sure we could come up with a single size that would be suitable/pleasant to look at for all cases. If we set the lower bounds at 35 pixels (good enough for 2 lines of text) and the upper bounds at 120 (8 lines with padding with FL_NORMAL_SIZE == 14), the size should be consistent for any particular class of messages. Anything longer than 8 lines would just be scrolled...
As for 2/3rds of the screen height, I'm thinking that (in general) modal dialogs should not be that big. If we size the dialog to no more than 1/2 the width of the current screen and no more than 8 lines (120 pixels) for the height of the message area, that *should* be sufficient for any normal usage, and you can always roll your own if you really need a full-screen modal dialog... :)
All of the usability studies and books I've read clearly show that most users don't read those pop-up alert dialogs, they instead just click on the button they recognize (which is why it is important to label buttons properly... :) | |
|
#7 | AlbrechtS 12:19 Mar 06, 2007 |
| Yes, yes, I like that idea ! :-)
Scrolling the text would be okay for me, if up to 8 (or maybe better 12?) lines could be displayed without scrolling. While I'm writing this, the text box in my browser is about 72 characters wide and 12 lines of text high, when the scrollbars are visible. That seems to be a good size.
Auto-sizing (like before), but with limits and scrolling would be a real improvement! | |
|
#8 | matt 07:20 May 01, 2007 |
| I suggest that we use an Fl_Help_View to render the text in the dialog box. It will be compatible to existing code unless someone has a dialog text strting with <HTML> which is pretty unlikely. It adds the ability to select, copy, and paste text, plus users can change fonts, colors, etc., and theorethically even add hyperlinks inside a dialog box. Neat.
Now what we are missing is code to measure an HTML text, and code to allow the user to click hyperlinks. | |
|
#9 | matt 16:24 May 01, 2007 |
| Fixed in Subversion repository.
I hope that you all like the changes. fl_message and friends can now take HTML formatting by starting the message text with "<html>". <a href=...> style links are resolved by calling fl_open_uri(). All this now works very nicely for creating a somewhat usable "About" box and much more. | |
|
#10 | matt 05:45 May 09, 2007 |
| The icon size is now fixed to 50x50 which I find pleasing.
I reverted all other features like selection and HTML rendering for now. To not lose the idea, I changed this to a q.2 feature request. | |
|
#11 | matt 15:41 Apr 22, 2008 |
| The remaining issue is covered by STR 1928. | |
[ Return to Bugs & Features ]
|
| |