It is currently Fri Apr 19, 2024 5:36 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Auto-Zoom
PostPosted: Fri Jul 25, 2014 11:37 am  (#1) 
Offline
New Member

Joined: Jul 25, 2014
Posts: 2
GIMP Version: 2.8.10
Operating System: Linux
OS Version: Trusty 14.04 x64
GIMP Experience: Intermediate Level



I am a CAD Drafter by trade, and GIMP & AutoCAD use mostly similar view modifications with the mouse. Such as: Middle click to pan, (ctrl+) wheel to zoom, which I've customized to not need ctrl (like it is in AutoCAD). However, in AutoCAD, when you double-click the middle button, it zooms to extents.

This is what I'm looking to do, unsure if it is possible. Looking at the Input Controllers section there is not a 'double-click' nor even 'click' for the 'mouse wheel'. I tried looking under 'Mouse Buttons' and it threw me an error about not being able to use more than one mouse controller. So, for testing, I removed the mouse wheel controller, and added mouse buttons controller. Again, in the mouse button controller, no 'double-click' just modifier keys+clicks (oddly there were only buttons 8-11 available). Therefore I feel like the base functionality may not even be there.


The end result I hope (if possible) to achieve is when double-clicking on the middle button, GIMP will zoom to 100%. When shift+double-click with the middle button, it zooms to fit the entire image to the window.

Any help would be greatly appreciated.

I also have access to a Gimp 2.8 installation on a win7x64 machine.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Auto-Zoom
PostPosted: Fri Jul 25, 2014 7:11 pm  (#2) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
GIMP does have some interface limitations which I believe will preclude you from doing exactly what you want directly from within GIMP. In particular, double-clicking in the image window is unrecognized as such (there are only a couple instances where double-clicking IS recognized). To be fair, these limitations stem from an effort to keep the codebase reasonably sane, while being able to run across a wide variety of different platforms (whereas Autocad runs on Windows, GIMP runs on Windows, GNU/Linux, Solaris, MacOS, BSD, and a few others).

You could, however, achieve something fairly close to what you want with some X11 event mapping. For example, if you have xdotool and xbindkeys installed and add the following lines to your .xbindkeysrc configuration, then holding down ALT while middle-clicking will perform a zoom to 100%:
"xdotool key --clearmodifiers 1"
  Mod1 + b:2

Similarly, the following lines would assign ALT+SHIFT+middle-click to performing a zoom to fit:
"xdotool key --clearmodifiers ctrl+shift+j"
  Mod1 + Shift + b:2


I do not believe xbindkeys can handle double-clicking (but you might want to ask on their IRC or mailing list), hence the ALT+middle-click. Your particular window manager may offer a better solution that does accept double-click events; xbindkeys is more generic and designed to work with any X window manager (traditionally, double-clicking was more of an Apple/Microsoft paradigm and not especially common in the Unix world).

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Auto-Zoom
PostPosted: Fri Jul 25, 2014 8:34 pm  (#3) 
Offline
New Member

Joined: Jul 25, 2014
Posts: 2
Thanks for the reply.

I was afraid that any handling of double-clicking, especially with an 'alternative' button was unsupported.

I'll look into xbindkeys but, I'm currently running my Win7 machine, so I'll have to experiment with xbindkeys or window manager tweaks later.

Thanks again for the great info. I'll post back with what I end up going with.


Top
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Zoom

7

No new posts Attachment(s) My First Infinite Zoom In Gimp

20

No new posts Animation playback zoom

3

No new posts Auto Installer

7

No new posts Attachment(s) Help with Unified tool when ZOOM in SOLVED !!

6



* Login  



Powered by phpBB3 © phpBB Group