GNOME Bugzilla – Bug 754841
Fixed width diary entries
Last modified: 2015-10-12 17:13:18 UTC
When the user maximizes the Almanah Diary main window, all the text for the current entry spreads along the width, which turns it really difficult to read the content. Following design guidelines for GNOME Notes[1] and in concrete #751442, limit the entry content to a maximum width (not the window, just the text content). Allan Day suggests that "more than 12 words long [the text] become difficult to read". 1. https://blogs.gnome.org/aday/2015/06/24/notes-future-plans/
Alternatively, render into fixed-width columns, like a newspaper: http://arneberg.com/columns/ch/2012/0729.bike_dells/pics/2012.0729.bike_dells.jpg (This should probably be discussed with a designer if you want to implement it.)
Created attachment 311718 [details] [review] UI: Main entry text widget fixed width The GtkTextView has been centered into a GtkEventBox, which allow us to draw the background with the same color of the GtkTextView, so the space around the GtkTextView looks like paper.
(In reply to Philip Withnall from comment #1) > Alternatively, render into fixed-width columns, like a newspaper: > http://arneberg.com/columns/ch/2012/0729.bike_dells/pics/2012.0729. > bike_dells.jpg > > (This should probably be discussed with a designer if you want to implement > it.) Looks interesting. Something like that requires a new TextView, don't you think?
(In reply to Álvaro Peña from comment #3) > (In reply to Philip Withnall from comment #1) > > Alternatively, render into fixed-width columns, like a newspaper: > > http://arneberg.com/columns/ch/2012/0729.bike_dells/pics/2012.0729. > > bike_dells.jpg > > > > (This should probably be discussed with a designer if you want to implement > > it.) > > Looks interesting. Something like that requires a new TextView, don't you > think? Probably. It would probably be very complex to implement. Perhaps best left for the future. :-)
Review of attachment 311718 [details] [review]: If I enter a very long line of ‘dddddddddddd’ (for example), this still results in a horizontal scroll bar appearing and no line wrapping taking place. Is that what you intended?
Oh bother, I just accidentally pushed this as 7f79c8df0f387d073556ada0bfe3d5eeb4b5665f. Sorry. Any changes to it will have to happen as follow-up commits.
(In reply to Philip Withnall from comment #5) > Review of attachment 311718 [details] [review] [review]: > > If I enter a very long line of ‘dddddddddddd’ (for example), this still > results in a horizontal scroll bar appearing and no line wrapping taking > place. Is that what you intended? Nop, looks like I have selected the wrong "wrap-mode" for the GtkTextView, thanks for pointing.
(In reply to Philip Withnall from comment #6) > Oh bother, I just accidentally pushed this as > 7f79c8df0f387d073556ada0bfe3d5eeb4b5665f. Sorry. > > Any changes to it will have to happen as follow-up commits. Don't worry Philip. At the moment there are two problems right now (plus the wrap-mode): 1. the GtkTextView doesn't scrolls the scrolled window when the user moves the text pointer to an off-screen place. 2. The main window width can be less than the GtkTextView width, so a horizontal scroll bar appear. The main window can't be less than the GtkTextView width.
Created attachment 313072 [details] [review] UI: Fixed main text view scroll background Just adding the "view" class to the ScrolledWindow has been enough to turn the background into white, and no intermediated widgets has been neccesary. Thanks to Florian Müllner for pointing me to this solutions!
Created attachment 313113 [details] [review] UI: Fixed main text view scroll background Just adding the "view" class to the ScrolledWindow has been enough to turn the background into white, and no intermediated widgets has been neccesary. Thanks to Florian Müllner for pointing me to this solutions!
Review of attachment 311718 [details] [review]: Commited.
Comment on attachment 313113 [details] [review] UI: Fixed main text view scroll background Attachment 313113 [details] pushed as e2b11c5 - UI: Fixed main text view scroll background
So now just remains one thing: The fixed width of the GtkTextView depends on the current font size, so at start time, and every time that the default font changes, calculate the required size for a sample sentence with at least 12 words.
(In reply to Álvaro Peña from comment #13) > So now just remains one thing: > > The fixed width of the GtkTextView depends on the current font size, so at > start time, and every time that the default font changes, calculate the > required size for a sample sentence with at least 12 words. Nop, I'm going to finish this thing in https://bugzilla.gnome.org/show_bug.cgi?id=754842