GNOME Bugzilla – Bug 778000
Sidebar: thumbnails in two columns if i18n or font size to big
Last modified: 2017-12-02 13:27:13 UTC
Problem: Under certain conditions the thumbnail view always shows two pages in a row/two columns. This means the user has less space for the PDF if he/she wishes to display thumbnails. How to reproduce: Choose locale with long words (e.g. German) or / and set font size higher. E.g. 17 for English. Try to reduce the width of the sidebar and fail. Here a video from a reddit thread: https://vid.me/HoFT
Yes, the problem is the "Add" and "Delete" buttons on the Bookmarks section of the sidebar, they don't let the sidebar to shrink more.. locales where the labels of these buttons are more verbose (like in German) show more wasted space.. this video shows the problem: https://vid.me/hOwqA I will attach a patch that solves this by removing the "Delete" button, as imo it's not needed because bookmarks already have a "Delete bookmark" action on their right click popup menu.
Created attachment 364439 [details] [review] ev-sidebar-bookmarks: Remove "Delete" button from bookmarks section As bookmarks can already be deleted from an specific popup menu action and the "Delete" and "Add" buttons were preventing the sidebar to shrink past them. ------- After that, the limit is now on the "Thumbnails" label + Close button, but the situation has improved and now is more difficult that a verbose locale plus bigger font triggers a double column thumbnail view.
What about the symbols '+' and '-' instead? I have not checked if that has been discussed in the past.
(In reply to Germán Poo-Caamaño from comment #3) > What about the symbols '+' and '-' instead? > > I have not checked if that has been discussed in the past. Good idea too, I'm attaching a patch using '+' and '-' plus setting the label of sidebar toggle button to be ellipsizable, this makes it possible to shrink the sidebar to the limit of the thumbnail width, so giving the user the option to having more space for the document view. Like this (video of patch applied): https://vid.me/vnKbh
Created attachment 364760 [details] [review] sidebar: allow to shrink the sidebar more so we can give more space to the document view, and also because sidebar minimum width was too much in verbose locales (because of bookmark button labels) which was almost causing it to switch to a two columns layout. Fixed by: - Switching the bookmarks section button labels from "Add" and "Remove" to be "+" and "-" along with corresponding tooltip and accesible names. - Set the label of the main sidebar toggle button to be ellipsizable, so the sidebar can be resized to reduce width even more.
(In reply to Nelson Benitez from comment #5) > Created attachment 364760 [details] [review] [review] > sidebar: allow to shrink the sidebar more > I forgot to explain the change from GtkButtonBox to GtkBox in the patch, that is because GtkButtonBox didn't let shrink past its required min width, and the reason we were using GtkButtonBox in the first place was because it gave the buttons an homogeneous size, which we now don't need as '+' and '-' are the same length.
Review of attachment 364760 [details] [review]: Excellent
(In reply to Carlos Garcia Campos from comment #7) > Review of attachment 364760 [details] [review] [review]: > > Excellent Pushed as commit 93164eb52bc51b4cef9d476f1de9419b8a035e1c Thank you!