After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 737239 - Evince too wide to snap half view/split (It does not respond to Super+L/R arrow shortcut)
Evince too wide to snap half view/split (It does not respond to Super+L/R arr...
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.14.x
Other Linux
: High normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 739262 739772 740150 740181 740262 743313 745370 787894 (view as bug list)
Depends on: 732289
Blocks:
 
 
Reported: 2014-09-24 08:17 UTC by Darcy
Modified: 2018-05-22 15:55 UTC
See Also:
GNOME target: ---
GNOME version: 3.13/3.14


Attachments
before-minimum-toolbar-width (10.71 KB, image/png)
2014-10-22 16:45 UTC, Hashem Nasarat
  Details
Reduce the padding around the widgets. (2.64 KB, patch)
2014-10-28 19:45 UTC, Darcy
needs-work Details | Review
Remove the 3 characters from the zoom widget and disp. only integer zoom levels (1.38 KB, patch)
2014-10-28 19:47 UTC, Darcy
needs-work Details | Review
Blank PDF file with 9 pages (3.81 KB, application/pdf)
2015-02-08 01:52 UTC, fb.bugs.gn
  Details
Blank PDF file with 10 pages (4.15 KB, application/pdf)
2015-02-08 01:52 UTC, fb.bugs.gn
  Details

Description Darcy 2014-09-24 08:17:06 UTC
Bug:
Evince does not snap to half view when put against left or right hand side of screen by dragging or 'Super+left/right'.  Works when snap to top when dragged to top or 'Super+up'.  

This behaviour does not occur with normal DPI screen and was noticed after fix for HIDPI screens on laptop.

Steps to reproduce:
Attach HIDPI display and attempt to snap PDF to side.

Versions:
3.13.3.1 (compiled in F20) and 3.13.91 (stock F21 alpha release).

Thanks.
Comment 1 Hashem Nasarat 2014-10-22 16:45:39 UTC
Created attachment 289151 [details]
before-minimum-toolbar-width

The narrowest you can make evince 3.14 is ~690px. The way gnome-shell (or is it mutter?) snapping works is that it only enables side snaps if screenwidth/2 >= min window width.

Evince is slightly too wide to allow snapping on common horizontal resolutions like 1024 and 1366 (1366/2=683, so it's very close for this one).

It's very frustrating to not be able to half tile/snap.
Comment 2 Hashem Nasarat 2014-10-22 16:49:16 UTC
As a workaround for those with 1366 horizontal resolution, if you open gnome-tweak tool and set Fonts > Scaling Factor to 0.91 then evince will be narrow enough to enable half snapping.

Maybe a good enough fix would be to make the minimum width of the center title slightly smaller. This would at least fix it for 1366 screens.
Comment 3 Germán Poo-Caamaño 2014-10-22 17:14:23 UTC
This might be a consequence of using gtkheaderbar, which might be exacerbated when using the buttons to minimize/maximize/close windows.
Comment 4 José Aliste 2014-10-22 17:39:48 UTC
Thanks this is a super catch I was noticing this bug but couldn't figure out why it is happening...
Comment 5 Darcy 2014-10-22 21:53:38 UTC
I'm not using any extra buttons (minimize etc) but the horizontal resolution of my screen is 2560 real, with a scaling factor of 2 so effectively a resolution of 1280?  That little black box that comes up when re-sizing the window reads 1329 at full width and will only let me reduce the width until 723.

Would dropping accuracy on the zoom label shave off a few precious pixels?  I don't want to upset those who like 2 decimal place accuracy when using their viewer.
Comment 6 Hashem Nasarat 2014-10-25 13:33:36 UTC
Darcy, the HiDPI window scaling factor only works in whole numbers. The Font scaling factor is the one that should probably be tweaked.
Comment 7 Darcy 2014-10-26 23:05:12 UTC
(In reply to comment #6)
> Darcy, the HiDPI window scaling factor only works in whole numbers. The Font
> scaling factor is the one that should probably be tweaked.

I'm aware of what you are trying to do by reducing the text size.  This still makes the window too large to snap across (but it's close) with your suggested size on this hardware.  Going smaller works but makes the global text size too small for me.
Comment 8 Germán Poo-Caamaño 2014-10-27 20:59:46 UTC
*** Bug 739262 has been marked as a duplicate of this bug. ***
Comment 9 Darcy 2014-10-28 10:23:48 UTC
I changed the zoom factor to gint type and reduced the label by 3 'width units' in shell/zoom-action.c  .  This allowed evince to snap half view.
Comment 10 Hashem Nasarat 2014-10-28 14:41:04 UTC
Nice Darcy! Care to attach the patch to this bug?
https://wiki.gnome.org/GnomeLove/CodeContributionWorkflow#Submitting_patches
Comment 11 Darcy 2014-10-28 19:45:00 UTC
Created attachment 289541 [details] [review]
Reduce the padding around the widgets.

This one is required in addition to removing 3 characters from the zoom widget.
Comment 12 Darcy 2014-10-28 19:47:19 UTC
Created attachment 289542 [details] [review]
Remove the 3 characters from the zoom widget and disp. only integer zoom levels

Display integer types in zoom level and remove the 3 additional characters spacing for 123.xy%
Comment 13 Darcy 2014-10-28 19:49:15 UTC
(In reply to comment #10)
> Nice Darcy! Care to attach the patch to this bug?
> https://wiki.gnome.org/GnomeLove/CodeContributionWorkflow#Submitting_patches

Sure.  Try the zoom_to_int patch first and if that doesn't let you snap to half then try the other one.  For some reason it only lets me snap to half when I have gone full screen then do 'super + left / right'.
Comment 14 Germán Poo-Caamaño 2014-10-28 20:45:17 UTC
Review of attachment 289542 [details] [review]:

::: shell/ev-zoom-action.c
@@ +99,3 @@
                 zoom_str = g_strdup_printf ("%d%%", (gint)zoom_perc);
         else
+                zoom_str = g_strdup_printf ("%d%%", (gint)zoom_perc);

If you change this line, the condition does not make sense anymore.

So, if you are going to propose to not use decimal, then, you should get rid of the condition as well.
Comment 15 Germán Poo-Caamaño 2014-10-28 20:48:35 UTC
Review of attachment 289541 [details] [review]:

Spacing of 6 is the recommendation of HIG.
See "General guidelines" in https://developer.gnome.org/hig/stable/visual-layout.html.en

Probably you might want to talk with the designers.
Comment 16 Darcy 2014-10-28 20:52:56 UTC
(In reply to comment #14)
> Review of attachment 289542 [details] [review]:
> 
> ::: shell/ev-zoom-action.c
> @@ +99,3 @@
>                  zoom_str = g_strdup_printf ("%d%%", (gint)zoom_perc);
>          else
> +                zoom_str = g_strdup_printf ("%d%%", (gint)zoom_perc);
> 
> If you change this line, the condition does not make sense anymore.
> 
> So, if you are going to propose to not use decimal, then, you should get rid of
> the condition as well.

Yes I thought this might come up.  Removing the floating point zoom will change the reference to EPSILON being used to see if the number is close enough to a round number.  

If you actually wanted this to be a solution to the snap problem then I'd have to remove this code for a future patch.
Comment 17 Germán Poo-Caamaño 2014-10-28 20:57:24 UTC
Carlor has the last word.

It might worth to keep in mind why some things were introduced, in this case, arbitrary zoom levels was reported and discussed in Bug 410633.
Comment 18 Juanjo Marín 2014-10-29 13:04:10 UTC
I think that reducing space as Darcy is doing is a good enough approach in this case. 

Apart from that, a more general solution could be to set some icons in the header bar as optional or secundary, so they are only shown when there is enough space available for them. This can be a good balance for supporting small resolutions without limiting too much the number of controls in the header bar. 

As side effect, it opens also the posibility to customize the header bar with icons chosen by the user (In evince could be print, rotation, etc).

Any way, as a general solution, the main part of the code must go in GTK+ itself, not in Evince.
Comment 19 Germán Poo-Caamaño 2014-11-07 18:13:15 UTC
*** Bug 739772 has been marked as a duplicate of this bug. ***
Comment 20 Germán Poo-Caamaño 2014-11-14 22:37:20 UTC
*** Bug 740150 has been marked as a duplicate of this bug. ***
Comment 21 Carlos Garcia Campos 2014-11-15 11:30:25 UTC
I agree we should try to reduce the minimum window size, but I'm not sure about the solutions proposed. I guess we need to rethink the design once again, and try to remove some elements from the toolbar (for example the history navigation buttons, the view menu button, etc). I think Allan has some new designs.
Comment 22 Germán Poo-Caamaño 2014-11-15 18:49:16 UTC
*** Bug 740181 has been marked as a duplicate of this bug. ***
Comment 23 el 2014-11-15 19:28:37 UTC
Why not come up with a design that hides less important buttons dynamically? It seems kind of weird to remove functionality permanently just for the smallest width not needed by everyone. (then again this bug affects me too and it's very annoying, so I can understand you want to do something about it)

E.g. compare to what nautilus does with the folder breadcrumb bar: it dynamically shrinks as the available space decreases.
Comment 24 el 2014-11-15 19:51:22 UTC
A few suggestions for Document Viewer 3.14.1 which don't remove functionality entirely or require new alternate ways to access it:

* for the page view, "X| of Y" the maximum number doesn't seem very vital at the smallest width -> drop "of Y"

* the minimum width for the title part seems a bit high, you could get away with roughly 75% of that are for the default font size in GNOME 3.14.1

* the zoom box thing in the title bar saves some clicks to do zooming, but it doesn't seem essential since you can still use the menu and the keyboard shortcuts to do that, so I'd consider this the next candidate for dropping

This should save enough space to decrease the minimum width considerably.
Comment 25 Carlos Garcia Campos 2014-11-16 08:12:32 UTC
(In reply to comment #23)
> Why not come up with a design that hides less important buttons dynamically? It
> seems kind of weird to remove functionality permanently just for the smallest
> width not needed by everyone. (then again this bug affects me too and it's very
> annoying, so I can understand you want to do something about it)
> 
> E.g. compare to what nautilus does with the folder breadcrumb bar: it
> dynamically shrinks as the available space decreases.

I don't plan to remove any functionality, I'm talking about a redesign of the UI to make the toolbar less cluttered, but keeping all the current features.
Comment 26 Carlos Garcia Campos 2014-11-16 08:18:29 UTC
(In reply to comment #24)
> A few suggestions for Document Viewer 3.14.1 which don't remove functionality
> entirely or require new alternate ways to access it:
> 
> * for the page view, "X| of Y" the maximum number doesn't seem very vital at
> the smallest width -> drop "of Y"
> 
> * the minimum width for the title part seems a bit high, you could get away
> with roughly 75% of that are for the default font size in GNOME 3.14.1

This is more difficult, I would probably just hide the title entirely. The thing is that GTK+ internally uses a minimum size of 20 chars for the title to make it centered, so we would need to implement our own title widget just for this.

> * the zoom box thing in the title bar saves some clicks to do zooming, but it
> doesn't seem essential since you can still use the menu and the keyboard
> shortcuts to do that, so I'd consider this the next candidate for dropping
> 
> This should save enough space to decrease the minimum width considerably.
Comment 27 Germán Poo-Caamaño 2014-11-17 18:18:47 UTC
*** Bug 740262 has been marked as a duplicate of this bug. ***
Comment 28 Allan Day 2014-11-18 11:03:57 UTC
I have some draft guidelines on this issue, that I'm planning to add to the HIG in the not too distant future. They recommend that windows intended to be half-screened should have a minimum width of no more than 640px - ensuring that it works on displays that are 1280px and wider.

The padding between widgets in the header bar is indeed a bit wider than it should be, although I personally feel that the number of widgets is the real issue here. Even if you do reduce the padding, you still end up with an almost useless title.
Comment 29 Matt 2015-01-21 01:22:50 UTC
I am running Fedora 21 with 3.14.1 on a dell studio 1558 and I am having the same issue. I am unable to snap evince to half the screen. I am able to with every other application so it seems to be evince specific.
Comment 30 Germán Poo-Caamaño 2015-01-21 20:56:00 UTC
*** Bug 743313 has been marked as a duplicate of this bug. ***
Comment 31 Luis Henrique Mello 2015-02-03 18:15:52 UTC
Well, with the upgrade to gtk3 3.14.8 this seems to be fixed for me.
Comment 32 fb.bugs.gn 2015-02-08 01:52:19 UTC
Created attachment 296357 [details]
Blank PDF file with 9 pages
Comment 33 fb.bugs.gn 2015-02-08 01:52:47 UTC
Created attachment 296358 [details]
Blank PDF file with 10 pages
Comment 34 fb.bugs.gn 2015-02-08 01:54:38 UTC
I am running Fedora 21 with Evince 3.14.1 and gtk3 3.14.8. The problem still occurs with PDF files with more than 9 pages... For PDF file with less than 10 pages, there is no problem.
Attached files for testing.
Comment 35 José Aliste 2015-02-08 02:09:37 UTC
This bug will hopefully be fixed in Evince 3.16. I am working on it. See 
https://raw.githubusercontent.com/gnome-design-team/gnome-mockups/master/evince/evince-header-bar.png

for an idea of what evince 3.16 would look like.
Comment 36 fb.bugs.gn 2015-02-08 04:06:17 UTC
Thank you Jose for your answer. Actually, for me, there is no problem with the actual design even if the next one will be certainly better ! At this time, the problem only occurs with PDF files with more than 9 pages (really). I've done many tests (filename length, PDF format, number of pages) with different PDF files on my Fedora 21 system before adding a comment here.
Comment 37 Germán Poo-Caamaño 2015-03-02 19:45:54 UTC
*** Bug 745370 has been marked as a duplicate of this bug. ***
Comment 38 william.chan4 2015-03-10 06:04:00 UTC
I also can't snap Evince to one side of the screen only 1366*768 screen due to this bug. Surely such a restrictive minimum window width is not even necessary for display purposes.
Comment 39 Janosch Maier 2015-04-22 08:58:52 UTC
Unfortunately the design in evince 3.16. is not yet in a way that fixes this bug for me. My screen size is 2560 px with a scaling factor 2 making it 1280 px effectively.
Comment 40 José Aliste 2015-04-22 12:26:10 UTC
yes, I know... unfortunately there was a  issue I couldn't solve for 3.16. so we could nt merge the solution :( i should get to this hopefully in the net month.
Comment 41 Víctor Cuadrado 2015-07-10 16:05:49 UTC
This bug is not fixed in Evince 3.16.1.

This bug has been fixed on Gedit 3.16.2 by allowing ellipsis on the document file name when it is snapped to the left or the right. Maybe that's the solution.
Comment 42 Luis Henrique Mello 2015-07-11 05:11:07 UTC
(In reply to Víctor Cuadrado from comment #41)
> This bug is not fixed in Evince 3.16.1.
> 
> This bug has been fixed on Gedit 3.16.2 by allowing ellipsis on the document
> file name when it is snapped to the left or the right. Maybe that's the
> solution.

Victor can you please show the code/patch you mentioned on gedit 3.16.2?
Comment 43 Víctor Cuadrado 2015-07-11 12:14:10 UTC
I am no Gnome developer, and have no knowdledge of Gnome's codebase, but making a grep ellips on gedit 3.16.2 sources has pointed me to this part, with states the ellipsizing:

    https://git.gnome.org/browse/gedit/tree/gedit/gedit-window.c?h=gnome-3-16#n1096 

and later this part, which sets the GTK_HEADER_BAR:

    https://git.gnome.org/browse/gedit/tree/gedit/gedit-window.c?h=gnome-3-16#n1181


Hope this helps.
Comment 44 h.tulk 2015-09-24 09:41:18 UTC
Please fix this bug for the next version of GNOME. It shouldn't be that hard but it is actually one of those that you might call a "GNOME love bug", because its really annoying...

Thanks!
Comment 45 Luis Henrique Mello 2016-04-02 19:03:55 UTC
Arch Linux here, with

evince 3.18.2-2
mutter 3.18.3-2
gtk3 3.18.9-1

Snap half view/split is working as it should in Evince even with large (over 100, 200 pages) documents.

I don't know where #732289 fits here anymore.
Comment 46 Janosch Maier 2016-04-04 08:15:56 UTC
I can confirm as well that it works. Tested on my Arch Linux HiDPI laptop, and it snaps correctly with evince version 3.18.2.
Comment 47 Germán Poo-Caamaño 2016-04-05 13:24:41 UTC
Luis, Janosh: It depends on the resolution.  On 1280w screen it does not work.
Comment 48 Luis Henrique Mello 2016-07-04 22:20:43 UTC
I also noticed that in GNU Denemo (gtk3 build) the same problem happens. I have a 1366w display.
Comment 49 Giuseppe Castagna 2017-05-10 12:41:47 UTC
Does not work with standard settings and a 2560w screen. But it works after reducing the font scaling factor from .90 to .89 with Gnome Tweaks. Just a matter of few pixels more
Comment 50 Germán Poo-Caamaño 2017-10-02 14:05:04 UTC
*** Bug 787894 has been marked as a duplicate of this bug. ***
Comment 51 GNOME Infrastructure Team 2018-05-22 15:55:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/515.