Bug 83572 - Improvements to zoom mode button
Summary: Improvements to zoom mode button
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Maxim Monastirsky
URL:
Whiteboard: target:4.4.0 target:4.5.0
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-06 20:45 UTC by Yousuf Philips (jay) (retired)
Modified: 2015-03-24 10:19 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-09-06 20:45:58 UTC
In the toolbar, there is a zoom group button (.uno:ZoomToolBox), which default to zoom in, but if you click it, it doesnt zoom in. If i enable to the zoom toolbar, the same zoom in button still doesnt work.

This effects 4.2.6, 4.3.2 and master, though the button has been removed from the default toolbar in master.
Comment 1 Maxim Monastirsky 2014-09-07 06:57:28 UTC
Actually it does work, but not in the way you expect. It enters into "zoom mode", so you able to choose which area you want to zoom. If you'll hover the pointer over the slide, you'll see it changed into a magnifying glass. The only bug I see here is that the button doesn't change into "pressed" state, so a user has no way to know he's entered into this "zoom mode".
Comment 2 Yousuf Philips (jay) (retired) 2014-09-07 08:49:16 UTC
Yes i see what you mean about zoom in mode, but think it should act similar to all the rest of the buttons in the drop down.

If a real zoom mode button is needed, it should be its own dedicated button and should stay active until a user changes from the zoom mode, so i could zoom in (left click or left click drag) and zoom out (shift + left click or right click) without the need to re-enable zoom mode each time. You can find this zoom behaviour in most photo editors and document viewers.

As the button is removed in 4.4, this isnt a big deal and the zoom facility is already in the statusbar. So if you want to close this, its fine by me.
Comment 3 Maxim Monastirsky 2014-09-07 09:53:02 UTC
(In reply to comment #2)
> but think it should act similar
> to all the rest of the buttons in the drop down.
Note that the last button (named "Shift") also acts in a similar way. But it's indeed very odd that the zoom in button acts differently than the zoom out one.

> If a real zoom mode button is needed, it should be its own dedicated button
> and should stay active until a user changes from the zoom mode, so i could
> zoom in (left click or left click drag) and zoom out (shift + left click or
> right click) without the need to re-enable zoom mode each time.
Agree. Also it could depend on single/double click as other tools in Impress/Draw. (For example - if you click on a rectangle once, it allows you to draw only one rectangle. But if you double-click, you can draw as many as you want, until you click the "Select" tool or press escape.)

> As the button is removed in 4.4, this isnt a big deal
It was reverted in http://cgit.freedesktop.org/libreoffice/core/commit/?id=ae218332b13a82e13f1a9a9f0fb79ef76a51ce39, so by now it's there. (And since it provides functionality that is not present on status bar, I wonder whether it's good idea to remove it.)

> So if you want to close this, its fine by me.
Why close? If it could be improved, it should be done.
Comment 4 Maxim Monastirsky 2014-09-07 10:24:53 UTC
(In reply to comment #3)
> (And
> since it provides functionality that is not present on status bar, I wonder
> whether it's good idea to remove it.)
Also note that the extended tooltip says "Displays the slide at two times its current size", so it's a quick way to get 200% of the current zoom, which is not easily possible using the status bar.
Comment 5 Maxim Monastirsky 2014-09-07 10:31:43 UTC
...and turns out it was already reported earlier in Bug 55903.

*** This bug has been marked as a duplicate of bug 55903 ***
Comment 6 Yousuf Philips (jay) (retired) 2014-09-07 15:27:13 UTC
(In reply to comment #3)
> Note that the last button (named "Shift") also acts in a similar way. But
> it's indeed very odd that the zoom in button acts differently than the zoom
> out one.

Yes i just saw the shift works in the same one use way, which is quite silly. I was going to suggest a shift type option with the one button zoom mode type button. I normally use zoom and pan quite a bit in gimp and photoshop. :)

> Agree. Also it could depend on single/double click as other tools in
> Impress/Draw. (For example - if you click on a rectangle once, it allows you
> to draw only one rectangle. But if you double-click, you can draw as many as
> you want, until you click the "Select" tool or press escape.)

I think most people would be confused/unaware with the single/double clicking of a zoom mode button. As it is a mode, the mode should be functional until the mode is turned off.

> It was reverted in
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=ae218332b13a82e13f1a9a9f0fb79ef76a51ce39, so by now it's there. (And
> since it provides functionality that is not present on status bar, I wonder
> whether it's good idea to remove it.)

Any ideas why it was removed and in which commit? Yep i'm running 2014-09-02, as i wait for a new build on @45-TDF. The only functionality that i see missing from the statusbar and scrollbars is the zoom in mode, but its not that difficult to zoom into a particular area with the a combination of shift + scrollwheel (pan left/right), scrollwheel (pan up/down) and ctrl + scrollwheel (zoom in/out).

> Why close? If it could be improved, it should be done.

Well i wasnt that keen on improving it thinking that it was being removed in 4.4. :)

(In reply to comment #4)
> Also note that the extended tooltip says "Displays the slide at two times
> its current size", so it's a quick way to get 200% of the current zoom,
> which is not easily possible using the status bar.

Unfortunately i cant find that tooltip. :(

(In reply to comment #5)
> ...and turns out it was already reported earlier in Bug 55903.

Well from this discussion, i would have likely change this bug to 'replacing zoom group button with zoom/pan mode button', which wouldnt be a duplicate. :)
Comment 7 Maxim Monastirsky 2014-09-08 08:21:25 UTC
(In reply to comment #6)
> I think most people would be confused/unaware with the single/double
> clicking of a zoom mode button. As it is a mode, the mode should be
> functional until the mode is turned off.
Yes it might be a bit confusing. There is even a proposal in Bug 39268 to get rid of those single/double click differences completely.

> Any ideas why it was removed and in which commit?
I gave a link to that commit.

> The only functionality
> that i see missing from the statusbar and scrollbars is the zoom in mode,
> but its not that difficult to zoom into a particular area with the a
> combination of shift + scrollwheel (pan left/right), scrollwheel (pan
> up/down) and ctrl + scrollwheel (zoom in/out).
Thinking of it again, you probably right. It's not worth keeping this button visible by default.

> Unfortunately i cant find that tooltip. :(
You must enable extended tooltips at Tools->Options...->LibreOffice->General. Anyway you don't need the tooltip, as you can judge from its behavior - it always zoom by 200% of the current zoom. (Just a speculation - maybe those 200% are the reason it was made to work in one use way, because when you zoom 200% each time, it turns too much zoomed very quickly.)
Comment 8 Yousuf Philips (jay) (retired) 2014-09-08 12:18:25 UTC
(In reply to comment #7)
> Yes it might be a bit confusing. There is even a proposal in Bug 39268 to
> get rid of those single/double click differences completely.

I think the behaviour for some buttons like format painter are fine, but think it would be confusing for a zoom mode, just as it is silly to have to click the shift button each time i've finished a shift, as most people pan multiple times.

> > Any ideas why it was removed and in which commit?
> I gave a link to that commit.

Was looking for the commit where it was removed. :)

> Thinking of it again, you probably right. It's not worth keeping this button
> visible by default.

Yep it isnt worth having it visible by default as more useful buttons should be placed in the toolbar, which are easily understandable. I was going over the stats from OOo on the button usage and here are where all the clicks are going.

.uno:ZoomPlus	        38.27%
.uno:ZoomMinus	        21.21%
.uno:Zoom100Percent	14.96%
.uno:ZoomPage	        11.13%
.uno:ZoomPageWidth	 7.76%
.uno:ZoomOptimal	 3.99%
.uno:ZoomObjects	 0.96%
.uno:ZoomPanning	 1.71%

Its hard to judge .uno:ZoomPlus's click ratio, as i'd assume many users would be mistakenly click it multiple times thinking that it does zoom in (me included :D). What makes it quite confusing also is that the icon and tooltip are the same as in writer's page preview mode, but they have different behaviours.


> You must enable extended tooltips at
> Tools->Options...->LibreOffice->General. Anyway you don't need the tooltip,
> as you can judge from its behavior - it always zoom by 200% of the current
> zoom. (Just a speculation - maybe those 200% are the reason it was made to
> work in one use way, because when you zoom 200% each time, it turns too much
> zoomed very quickly.)

Thanks for the info, though i enabled it and it still didnt appear. Maybe i need to restart LibO. I think the behaviour of zoom out to decrease by half is way to much.
Comment 9 Maxim Monastirsky 2014-09-08 13:17:59 UTC
(In reply to comment #8)
> Was looking for the commit where it was removed. :)
This one - http://cgit.freedesktop.org/libreoffice/core/commit/?id=b4558b508141af16d335f45a0f12bdd34521e944 ?
 
> Thanks for the info, though i enabled it and it still didnt appear.
I think it depens on the offline help pack.
Comment 10 Yousuf Philips (jay) (retired) 2014-09-08 15:19:50 UTC
(In reply to comment #9)
> This one -
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=b4558b508141af16d335f45a0f12bdd34521e944 ?

Thanks. I thought it might be Samuel who removed it. :)

> I think it depens on the offline help pack.

Yep i dont have that. :)

I just tried double-clicking on zoom in button and when doing so, it does have a pressed in state, but unfortunately it doesnt stay active after a single click. :D

So what say we change this bug to an enhancement request for the replacement of the group button with a single zoom/pan mode button, which can be disable by pressing the button again, pressing Esc and a context menu option.
Comment 11 Maxim Monastirsky 2014-09-10 10:19:04 UTC
(In reply to comment #10)
> I just tried double-clicking on zoom in button and when doing so, it does
> have a pressed in state
Good catch.

> So what say we change this bug to an enhancement request for the replacement
> of the group button with a single zoom/pan mode button
If we decide to retain some zoom related button on the toolbar, there is no need to remove the group button, it's possible to simply set some command as the default for that button, similar to the custom shapes buttons. But I'm not sure if we can combine both zoom and pan in one button, since the zoom mode allows you to select a specific area to zoom by dragging, so this conflicts with panning.
Comment 12 Yousuf Philips (jay) (retired) 2014-09-12 18:53:39 UTC
(In reply to comment #11)
> (In reply to comment #10)
> > I just tried double-clicking on zoom in button and when doing so, it does
> > have a pressed in state
> Good catch.

In addition to it not working while double-pressed, i wasnt able to unpress its state as well. :)

> > So what say we change this bug to an enhancement request for the replacement
> > of the group button with a single zoom/pan mode button
> If we decide to retain some zoom related button on the toolbar, there is no
> need to remove the group button, it's possible to simply set some command as
> the default for that button, similar to the custom shapes buttons. But I'm
> not sure if we can combine both zoom and pan in one button, since the zoom
> mode allows you to select a specific area to zoom by dragging, so this
> conflicts with panning.

Well i was suggesting this according to how gimp and photoshop do it with the zoom tool. In gimp when zoom mode is active, left click or left click drag zooms in, ctrl + left click zooms out, and space bar + mouse movement does pan. In photoshop, left click or left click drag zooms in, alt + left click zooms out, and space bar + left click mouse movement does pan. I think this type of zoom mode would be really beneficial in Draw.
Comment 13 Commit Notification 2014-09-14 13:48:06 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dffe40bc4e8be7c845d66a8118248d02dd70a707

Related: fdo#83572 Improve zoom mode



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 14 Maxim Monastirsky 2014-09-14 13:54:51 UTC
So I moved the zoom mode to a dedicated button, and made it permanent (until the user press escape or click the selection tool). Also added zoom out (by holding Ctrl), and pan (by holding Shift). I didn't use space for pan, because it isn't a modifier key, so I wasn't sure how to implement this. Also the pressed/unpressed stuff isn't fixed - I had a lot of headache with this, so left this out by now.
Comment 15 Maxim Monastirsky 2014-09-14 14:10:08 UTC
Reopening because a feedback is needed on this change.
Comment 16 Yousuf Philips (jay) (retired) 2014-09-14 15:14:47 UTC
Hi Maxim,

Thanks for working on this. Will give feedback as soon as i can get my hands on a daily build. I think the zoom mode button can be moved to the main standard toolbar in Draw as there is sufficient space there for it and believe it will be a highly used button once it easily visible to user's eyes.
Comment 17 Yousuf Philips (jay) (retired) 2014-09-14 18:54:50 UTC
Forgot to mention that it would be great if there was a shortcut key to activate/deactivate the button.
Comment 18 Yousuf Philips (jay) (retired) 2014-09-17 03:35:53 UTC
Just gave it a try and it feels great. The only suggestion i could make about the behaviour is possibly having '-' inside the magnifying glass mouse icon when its in zoom out mode, so there is some indication that its in zoom out mode.
Comment 19 Yousuf Philips (jay) (retired) 2014-09-24 01:10:24 UTC
Did some more testing and noticed that if i click the line tool and then the zoom tool, the line tool will still show as if it is selected.

I also moved the zoom tool to the main toolbar and see that if i press on it, it doesnt appear as if it is in the pressed state, so one could possibly think that its not active and may try to repeatedly click it.
Comment 20 Yousuf Philips (jay) (retired) 2014-09-24 01:14:38 UTC
Was testing some more and the weird behaviour of it showing that its in the unpressed state happens at random times whether or not another module is open.
Comment 21 Maxim Monastirsky 2014-09-24 10:31:47 UTC
Yes I'm aware of the pressed/unpressed issues. Will look into this in the coming days, if I'll find some free time.
Comment 22 Yousuf Philips (jay) (retired) 2014-11-15 23:38:11 UTC
Hi Maxim,

I hope you can get some time to look into the button pressing issue, as it is now front and center in the impress and draw toolbars as the old Zoom drop down is gone. :D

Also is there a way to set a different icon when ctrl is being pressed, as it would be good to have an magnifying glass with a minus in it. I can create the icon, just tell me where it needs to be placed. :D
Comment 23 Commit Notification 2014-11-17 08:33:12 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4450fe6d06a138c1f3b1c43546a7246be8a26c5

Related: fdo#83572 Try to fix zoom mode button state

It will be available in 4.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 24 Maxim Monastirsky 2014-11-17 08:35:45 UTC
Hope it's fixed now.
Comment 25 Maxim Monastirsky 2014-11-17 09:24:06 UTC
(In reply to Jay Philips from comment #22)
> Also is there a way to set a different icon when ctrl is being pressed, as
> it would be good to have an magnifying glass with a minus in it. I can
> create the icon, just tell me where it needs to be placed. :D
I can't find an easy way to use custom cursor. It seems that we're using only the underlying platform cursors.
Comment 26 Yousuf Philips (jay) (retired) 2014-11-17 14:05:43 UTC
(In reply to Maxim Monastirsky from comment #25)
> I can't find an easy way to use custom cursor. It seems that we're using
> only the underlying platform cursors.

Well is there a suitable platform cursor that could be used for zoom out? Maybe a minus sign. Or is there a plus sign that could be used for zoom in.

About the drag icon, it seems like its a click cursor, is there a platform icon that looks like a hand grab < http://findicons.com/files/icons/2652/gentleface/48/cursor_drag_hand_icon.png > or a move < http://findicons.com/files/icons/2698/free_mobile_icon_kit/64/cursor_drag_arrow.png >.
Comment 27 Maxim Monastirsky 2014-11-17 16:16:05 UTC
(In reply to Maxim Monastirsky from comment #25)
> It seems that we're using only the underlying platform cursors.
OK I was wrong. It seems that we do have *some* our own cursors (because not all platforms have all cursors). But this needs different changes on each supported platform.

For X11 (Linux) the cursors stored in:
http://opengrok.libreoffice.org/xref/core/vcl/inc/unx/x11_cursors/
(note that they stored as byte arrays, rather than image files! And there are 2 files for each cursor - base and mask.)

And for Windows/Mac I guess these locations:
http://opengrok.libreoffice.org/xref/core/vcl/win/source/src/
http://opengrok.libreoffice.org/xref/core/vcl/osx/res/cursors/

It also needs to tweak the platform-specific code of each platform to recognize the new cursors.

(In reply to Jay Philips from comment #26)
> Well is there a suitable platform cursor that could be used for zoom out?
> Maybe a minus sign. Or is there a plus sign that could be used for zoom in.
You can't rely on the platform cursors, as it might be different cursor on each platform, and it also depends on system icon theme.

> About the drag icon, it seems like its a click cursor, is there a platform
> icon that looks like a hand grab <
> http://findicons.com/files/icons/2652/gentleface/48/cursor_drag_hand_icon.
> png >
And this is a good example of what I said. On your system it looks like a click icon, but (for example) on Windows it looks like a hand grab.

> or a move <
> http://findicons.com/files/icons/2698/free_mobile_icon_kit/64/
> cursor_drag_arrow.png >.
Actually we alreay have a cursor called POINTER_MOVE, which looks like this at least on Windows. On Linux with Adwaita theme it looks like hand grab. Have no idea how it looks on your system. It might be anyway more suitable than the current cursor.
Comment 28 Maxim Monastirsky 2014-11-17 16:43:07 UTC
(In reply to Jay Philips from comment #26)
> Well is there a suitable platform cursor that could be used for zoom out?
> Maybe a minus sign. Or is there a plus sign that could be used for zoom in.
Forgot to say: I'm not aware of any specific zoom in/out icons, only the generic magnify one that we use now (which BTW has a plus inside under Windows).
Comment 29 Yousuf Philips (jay) (retired) 2014-11-17 19:07:16 UTC
(In reply to Maxim Monastirsky from comment #27)
> (In reply to Maxim Monastirsky from comment #25)
> > It seems that we're using only the underlying platform cursors.
> OK I was wrong. It seems that we do have *some* our own cursors (because not
> all platforms have all cursors). But this needs different changes on each
> supported platform.

Looked at the byte arrays and couldnt make heads or tails of how to do it ;D

> Actually we alreay have a cursor called POINTER_MOVE, which looks like this
> at least on Windows. On Linux with Adwaita theme it looks like hand grab.
> Have no idea how it looks on your system. It might be anyway more suitable
> than the current cursor.

Yep i checked in windows and see the icons are different from Linux Mint. :D
Comment 30 Yousuf Philips (jay) (retired) 2014-11-19 02:59:10 UTC
(In reply to Maxim Monastirsky from comment #24)
> Hope it's fixed now.

Unfortunately it isnt. :( Clicking a second time doesnt disable it.
Comment 31 Maxim Monastirsky 2014-11-19 09:12:53 UTC
(In reply to Jay Philips from comment #30)
> Unfortunately it isnt. :( Clicking a second time doesnt disable it.
That's right, because you need to click on the selection tool (or press escape), just like any other drawing tool.
Comment 32 Yousuf Philips (jay) (retired) 2014-11-19 17:27:46 UTC
(In reply to Maxim Monastirsky from comment #31)
> That's right, because you need to click on the selection tool (or press
> escape), just like any other drawing tool.

Sorry i was confused thinking that it should act similar to the format paintbrush. :)

So i did some testing and noticed that it stays active if i insert a table, picture, slide, etc. and then at various times, like when you insert a chart, its not possible to deactivate it.
Comment 33 Maxim Monastirsky 2014-11-19 18:36:00 UTC
(In reply to Jay Philips from comment #32)
> So i did some testing and noticed that it stays active if i insert a table,
> picture, slide, etc. and then at various times, like when you insert a
> chart, its not possible to deactivate it.
Yes you right, and you can see this behavior with other drawing tools as well (try with line, basic shapes etc.). But I agree that it's the most severe with the zoom button, because other drawing tools deactivate when you just click on the slide without dragging, but the zoom button zooms in this case. So when you in the chart mode, there is a way to deactivate other tools by clicking outside the chart, but with the zoom mode it will just zoom again and again.
Comment 34 Maxim Monastirsky 2014-11-22 18:03:19 UTC
I debugged the chart case a bit, and turns out that we actually disable the previous function (including zoom) before the chart insertion, but we re-enable it just after it. Not sure why it was programmed it this weird way. Do you want that I change it only for OLE object like chart, or for images/tables as well?
Comment 35 Yousuf Philips (jay) (retired) 2014-11-22 19:10:33 UTC
(In reply to Maxim Monastirsky from comment #34)
> Do you want that I change it only for OLE object like chart, or for
> images/tables as well?

I'll leave it up to what you think is best. :D
Comment 36 Commit Notification 2014-11-23 08:57:50 UTC
Maxim Monastirsky committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2497285dcaf135e55daf273607ed86575c8032ac

Related: fdo#83572 Deactivate previous function when inserting object

It will be available in 4.5.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 37 Maxim Monastirsky 2014-11-24 13:21:24 UTC
The last commit pushed to 4-4 as well:

http://cgit.freedesktop.org/libreoffice/core/commit/?h=libreoffice-4-4&id=2af68258f1c6d7a77226475ee48e28357262fda8
Comment 38 Mike §chinagl 2014-12-20 22:34:19 UTC
This bug fix comes with LibreOffice 4.4 (release notes https://wiki.documentfoundation.org/ReleaseNotes/4.4) 

Creation of a new zoom mode button that is able to zoom in, zoom out and pan with the use of Ctrl and ⇧ Shift.
Comment 39 Cor Nouws 2015-01-12 21:44:16 UTC
Love the pan-function :)