1. 16 Nov, 2016 1 commit
  2. 09 Aug, 2016 2 commits
    • Ell's avatar
      app: make rulers rotation aware · 5bdb20c8
      Ell authored
      Place the rulers' origin at the top-left corner of the canvas
      (screen space) bounding box, and set their scale to the image-
      space scale along the screen-space horizontal/vertical directions
      (in other words, measuring a distance using the rulers should
      give the same results as the measure tool; note that rotation
      comes into play here only when the horizontal and vertical
      image or screen resolutions are different, since otherwise the
      scale is direction invariant.)
      
      Make scrollbar step match ruler step under the new behavior.
      5bdb20c8
    • Ell's avatar
      app: fix a few canvas scroll/scale rounding inconsistencies · 720b73ca
      Ell authored
      Apply rounding more consistently across some of the scroll/scale
      functions, to avoid annoying one-pixel-off scrollbar size/position
      issues.
      720b73ca
  3. 05 Jan, 2016 6 commits
  4. 18 Oct, 2015 1 commit
  5. 18 Apr, 2013 2 commits
  6. 18 Jun, 2010 1 commit
  7. 03 Feb, 2010 1 commit
  8. 17 Jan, 2009 1 commit
    • Michael Natterer's avatar
      Change licence to GPLv3 (and to LGPLv3 for libgimp). · d9b5207a
      Michael Natterer authored
      2009-01-17  Michael Natterer  <mitch@gimp.org>
      
      	* all files with a GPL header and all COPYING files:
      
      	Change licence to GPLv3 (and to LGPLv3 for libgimp).
      
      	Cleaned up some copyright headers and regenerated the parsers in
      	the ImageMap plugin.
      
      
      svn path=/trunk/; revision=27913
      d9b5207a
  9. 02 Oct, 2008 1 commit
    • Martin Nordholts's avatar
      Bug 553534 – centering issues after image scaling and setting zoom · 259801e3
      Martin Nordholts authored
      to 100%
      
      * app/display/display-enums.h: Added a GimpZoomFocus enum with
      'best guess', 'pointer' or 'image center' values.
      
      * app/display/gimpdisplayshell-scale.[ch]
      (gimp_display_shell_scale): Take a GimpZoomFocus parameter and
      pass it on to
      
      (gimp_display_shell_scale_get_zoom_focus): which returns the
      requested zoom focus point if one was given, else makes a best
      guess.
      
      * app/actions/view-commands.c
      * app/display/gimpstatusbar.c
      * app/display/gimpnavigationeditor.c
      * app/display/gimpdisplayshell-callbacks.c
      * app/display/gimpdisplayshell-scale-dialog.c: For explicit-zoom
      commands like "zoom to 100%", always use the image center as the
      zoom focus point. For all other zooming, continue to use the
      best-guess method.
      
      * app/display/display-enums.c: Regenerated.
      
      svn path=/trunk/; revision=27104
      259801e3
  10. 16 Aug, 2008 2 commits
    • Sven Neumann's avatar
      app/display/Makefile.am app/display/gimpdisplayshell-scale.[ch] split · f9ebb8c9
      Sven Neumann authored
      2008-08-16  Sven Neumann  <sven@gimp.org>
      
      	* app/display/Makefile.am
      	* app/display/gimpdisplayshell-scale.[ch]
      	* app/display/gimpdisplayshell-scale-dialog.[ch]: split scale
      	dialog into a new file.
      
      	* app/actions/view-commands.c: changed accordingly.
      
      svn path=/trunk/; revision=26590
      f9ebb8c9
    • Martin Nordholts's avatar
      Support axis independence. · ab419f2e
      Martin Nordholts authored
      2008-08-16  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_display_shell_scale_get_zoom_focus)
      	(gimp_display_shell_scale_image_is_within_viewport): Support axis
      	independence.
      
      	* app/display/gimpdisplayshell.c
      	(gimp_display_shell_zoom_button_callback): Adapt to new
      	gimp_display_shell_scale_image_is_within_viewport().
      
      svn path=/trunk/; revision=26585
      ab419f2e
  11. 14 Aug, 2008 2 commits
    • Martin Nordholts's avatar
      New function. · c8ae8f67
      Martin Nordholts authored
      2008-08-14  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-draw.[ch]
      	(gimp_display_shell_draw_get_scaled_image_size_for_scale): New
      	function.
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_display_shell_scale): When zooming out and the image
      	starts to fit the viewport on a given axis, center on that
      	axis.
      
      	(gimp_display_shell_scale_image_starts_to_fit): New function.
      
      	(gimp_display_shell_calculate_scale_x_and_y): New function.
      
      	* app/display/gimpdisplayshell.c
      	(gimp_display_shell_scale_changed): Use
      	gimp_display_shell_calculate_scale_x_and_y().
      
      	* app/display/gimpdisplayshell-scroll.c
      	(gimp_display_shell_scroll_center_image): Bail out if neither
      	vertical nor horizontal centering is requested.
      
      svn path=/trunk/; revision=26562
      c8ae8f67
    • Martin Nordholts's avatar
      Split this up in gimp_display_shell_scale_update_scrollbars() and · ecd95dcf
      Martin Nordholts authored
      2008-08-14  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.c
      	(gimp_display_shell_update_scrollbars_and_rulers): Split this up
      	in gimp_display_shell_scale_update_scrollbars() and
      	gimp_display_shell_scale_update_rulers().
      
      svn path=/trunk/; revision=26555
      ecd95dcf
  12. 13 Aug, 2008 2 commits
    • Martin Nordholts's avatar
      Make this a private function because we want to be in full control over · ccdac058
      Martin Nordholts authored
      2008-08-13  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_display_shell_scale_to): Make this a private function
      	because we want to be in full control over what pixel to focus on
      	when zooming in and out.
      
      	* app/display/gimpdisplayshell-callbacks.c
      	(gimp_display_shell_canvas_tool_events): Use
      	gimp_display_shell_scale() here instead of
      	gimp_display_shell_scale_to(). We figure out (and can override if
      	we wish) the coordinates that were previously passed explicitly.
      
      svn path=/trunk/; revision=26531
      ccdac058
    • Martin Nordholts's avatar
      New function. · 47b34e97
      Martin Nordholts authored
      2008-08-13  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.c
      	(gimp_display_shell_scale_image_is_within_viewport): New function.
      
      	* app/display/gimpdisplayshell.c (gimp_display_shell_new): When
      	the zoom button is toggled, implicitly do a View -> Fit Image in
      	Window if the (scaled) image is within the viewport.
      
      svn path=/trunk/; revision=26529
      47b34e97
  13. 10 Aug, 2008 3 commits
    • Martin Nordholts's avatar
      Move the zoom-revert updating logic into this new helper function so that · 0687c331
      Martin Nordholts authored
      2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.c
      	(gimp_display_shell_scale_handle_zoom_revert): Move the
      	zoom-revert updating logic into this new helper function so that
      	we can update zoom-revert from other places.
      
      svn path=/trunk/; revision=26485
      0687c331
    • Martin Nordholts's avatar
      Rename gimp_display_shell_scale_setup() to · 2eacb5cf
      Martin Nordholts authored
      2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]:
      	Rename gimp_display_shell_scale_setup() to
      	gimp_display_shell_update_scrollbars_and_rulers(), because that's
      	exactly what that function does.
      
      	* app/display/gimpdisplayshell.c
      	* app/display/gimpdisplayshell-scroll.c
      	* app/display/gimpdisplayshell-handlers.c
      	* app/display/gimpdisplayshell-callbacks.c: Adapt to new name.
      
      svn path=/trunk/; revision=26484
      2eacb5cf
    • Martin Nordholts's avatar
      Put functions to center the image in the display shell where they belong, · a736df49
      Martin Nordholts authored
      2008-08-10  Martin Nordholts  <martinn@svn.gnome.org>
      
      	Put functions to center the image in the display shell where they
      	belong, and give them proper names.
      
      	* app/display/gimpdisplayshell-scale.[ch]: Get rid of functions
      	and use the new names.
      
      	* app/display/gimpdisplayshell-scroll.[ch]: Put the functions here
      	and call them gimp_display_shell_scroll_center_image() and
      	gimp_display_shell_scroll_center_image_on_next_size_allocate().
      
      	* app/display/gimpdisplayshell.c:
      	* app/display/gimpdisplayshell-handlers.c: Use the new names.
      
      svn path=/trunk/; revision=26470
      a736df49
  14. 03 Aug, 2008 1 commit
    • Martin Nordholts's avatar
      Further work for completing bug #362915 that makes changes to the image · 6c48f2b6
      Martin Nordholts authored
      2008-08-03  Martin Nordholts  <martinn@svn.gnome.org>
      
      	Further work for completing bug #362915 that makes changes to the
      	image size (e.g when cropping) be much more nicely handled by
      	display shell.
      
      	* app/core/gimpimage.[ch]: Add new signal
      	GimpImage::size-changed-detailed that is emited whenever
      	GimpViewable::size-changed is. The new signal provides additional
      	information, namely the previous origin relative to the current
      	origin. Cliens choose what specific signal to listen to depending
      	on how much info they need.
      
      	* app/display/gimpdisplayshell-handlers.c: Connect to
      	GimpImage::size-changed-detailed instead of
      	GimpViewable::size-changed since the shell wants information about
      	the previous image origin.
      	(gimp_display_shell_resolution_changed_handler): Use
      	gimp_display_shell_scale_resize() instead to avoid display
      	garbage.
      
      	* app/display/gimpdisplayshell-scale.[ch]: Add new utility
      	function gimp_display_shell_center_image_on_next_size_allocate().
      
      	* app/display/gimpdisplayshell-scroll.[ch]
      	(gimp_display_shell_handle_size_changed_detailed): New function
      	that replaces logic in gimp_display_shell_handle_size_changed and
      	that takes previous-origin of the image into account and adjusts
      	the offset so that the image content that remains doesn't move. If
      	the window is resized on image resize, just center the image
      	afterwards.
      
      	* app/core/gimpimage-undo-push.[ch]
      	(gimp_image_undo_push_image_size): Add previous-origin paremeters.
      
      	* app/core/gimpimageundo.[ch]: Add and manage previous-origin
      	properties so that the display shell offset can be appropriately
      	adjusted also when undoing.
      
      	* app/core/gimpundo.h
      	* app/core/gimpimage-undo.c: Add previous_origin members to the
      	undo accumulator and emit that information when the size of the
      	image changes due to the undo.
      
      	* app/core/gimpimage-crop.c (gimp_image_crop)
      	* app/core/gimpimage-scale.c (gimp_image_scale)
      	* app/core/gimpimage-rotate.c (gimp_image_rotate)
      	* app/core/gimpimage-resize.c (gimp_image_resize_with_layers):
      	Supply information about the previous-origin of the image to the
      	size-changed signals and the undo system.
      
      svn path=/trunk/; revision=26354
      6c48f2b6
  15. 13 Jul, 2008 2 commits
    • Martin Nordholts's avatar
      Allow to choose what axes to center on. · 805a3f5f
      Martin Nordholts authored
      2008-07-13  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_display_shell_center_image): Allow to choose what axes to
      	center on.
      
      	(gimp_display_shell_scale_fill)
      	(gimp_display_shell_scale_fit_in): Explicitly center on both axes.
      
      	* app/display/gimpdisplayshell.c (gimp_display_shell_fill): Center
      	the image in the filled display shell. Rather hackish, but seems
      	to work fine.
      
      svn path=/trunk/; revision=26185
      805a3f5f
    • Martin Nordholts's avatar
      New function. (gimp_display_shell_scale_fill) · 909e46c9
      Martin Nordholts authored
      2008-07-13  Martin Nordholts  <martinn@svn.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.c
      	(gimp_display_shell_center_image): New function.
      	(gimp_display_shell_scale_fill)
      	(gimp_display_shell_scale_fit_in): Center the image at the end.
      
      svn path=/trunk/; revision=26176
      909e46c9
  16. 23 Mar, 2008 1 commit
    • Michael Natterer's avatar
      Never shrink the empty display when filling it, only grow: · f8e5aa31
      Michael Natterer authored
      2008-03-23  Michael Natterer  <mitch@gimp.org>
      
      	Never shrink the empty display when filling it, only grow:
      
      	* app/display/gimpdisplayshell.[ch]
      	* app/display/gimpdisplayshell-scale.[ch]: add "gboolean
      	grow_only" parameters to shrink_wrap() APIs which restricts
      	resizing of the window to growing.
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_displaY_shell_scale_resize): remove boolean "redisplay"
      	parameter because is was always passed as TRUE. Add boolean
      	"grow_only" instead and pass it on to shrink_wrap()
      
      	* app/actions/view-commands.c
      	* app/display/gimpdisplayshell-handlers.c: pass grow_only = FALSE.
      
      	* app/display/gimpdisplayshell.c (gimp_display_shell_idle_fill):
      	pass grow_only = TRUE.
      
      
      svn path=/trunk/; revision=25178
      f8e5aa31
  17. 19 Mar, 2008 1 commit
    • Sven Neumann's avatar
      app/display/gimpdisplayshell.[ch] moved · b7de9142
      Sven Neumann authored
      2008-03-19  Sven Neumann  <sven@gimp.org>
      
      	* app/display/gimpdisplayshell.[ch]
      	* app/display/gimpdisplayshell-scale.[ch]: moved
      	gimp_display_shell_set_initial_scale() to gimpdisplayshell-scale.c.
      
      	* app/display/gimpdisplayoptions.c: reverted last change, we want
      	to keep the status-bar around.
      
      svn path=/trunk/; revision=25119
      b7de9142
  18. 16 Dec, 2007 1 commit
    • William Skaggs's avatar
      Bill Skaggs <weskaggs@primate.ucdavis.edu> · 6d92a4a6
      William Skaggs authored
      	* app/widgets/gimphelp-ids.h
      	* app/display/gimpdisplayshell-scale.[ch]
      	* app/display/gimpnavigationeditor.[ch]
      	* app/actions/view-commands.[ch]
      	* app/actions/view-commands.c:
      
      	Changed "Fit Image to Window" to "Fill Window", and changed
      	"fit-to" to "fill" in all the related things.  Fixes
      	bug #490364.
      
      svn path=/trunk/; revision=24370
      6d92a4a6
  19. 07 Feb, 2007 1 commit
    • Sven Neumann's avatar
      app/actions/view-actions.c app/actions/view-commands.[ch] · ea4ed72e
      Sven Neumann authored
      2007-02-07  Sven Neumann  <sven@gimp.org>
      
      	* app/actions/view-actions.c
      	* app/actions/view-commands.[ch]
      	* app/display/gimpdisplayshell.[ch]
      	* app/display/gimpdisplayshell-scale.[ch]
      	* app/widgets/gimphelp-ids.h
      	* menus/image-menu.xml.in: applied patch from Robert Helgesson 
      that
      	adds "Revert Zoom" functionality (bug #338168).
      
      
      svn path=/trunk/; revision=21855
      ea4ed72e
  20. 09 Dec, 2006 1 commit
  21. 24 Sep, 2005 1 commit
    • David Odin's avatar
      Moved the GimpZoomType enum from here... · f94f48f1
      David Odin authored
      * app/widgets/widgets-enums.h: Moved the GimpZoomType enum from	here...
      
      * libgimpwidgets/gimpwidgetsenums.h: ...to here.
      
      * app/widgets/widgets-enums.c
      * libgimpwidgets/gimpwidgetsenums.c: regenerated.
      
      * app/display/gimpdisplayshell-scale.[ch]: removed
        gimp_display_shell_scale_zoom_step and
        gimp_display_shell_scale_get_fraction from here...
      
      * libgimpwidgets/gimpzoommodel.[ch]: ... to here so we can use these
        utility functions in plug-ins and in the core.
        Also removed the step-size property since the zoom-model now use
        gimp_zoom_model_zoom_step.
      
      * app/actions/view-commands.c
      * app/display/gimpdisplayshell-title.c
      * app/display/gimpdisplayshell.c
      * app/tools/gimpmagnifytool.c: modified accordingly.
      
      * libgimp/gimpzoompreview.c: don't pass any argument to the
        gimp_zoom_model_new function.
      
      * libgimpwidgets/gimpwidgets.def: added gimp_zoom_model_zoom_step
        (gimp_zoom_model_get_fraction was already there)
      
      * devel-docs/app/app-sections.txt: removed
        gimp_display_shell_scale_zoom_step and
        gimp_display_shell_scale_get_fraction.
      f94f48f1
  22. 28 Apr, 2005 1 commit
    • Sven Neumann's avatar
      corrected variable names. · fedce533
      Sven Neumann authored
      2005-04-28  Sven Neumann  <sven@gimp.org>
      
      	* app/display/gimpdisplayshell-scale.h: corrected variable names.
      fedce533
  23. 14 Apr, 2005 1 commit
  24. 13 Apr, 2005 1 commit
  25. 20 Jun, 2004 1 commit
    • Philip Lafleur's avatar
      Changed "Zoom to Fit Window" command to "Fit Image in Window" and added · c7364a64
      Philip Lafleur authored
      2004-06-20  Philip Lafleur  <plafleur@cvs.gnome.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]:
      	* app/display/gimpnavigationview.[ch]:
      	* app/actions/view-actions.c:
      	* app/actions/view-commands.[ch]:
      	* app/widgets/gimphelp-ids.h:
      	* menus/image-menu.xml.in: Changed "Zoom to Fit Window" command
      	to "Fit Image in Window" and added another command, "Fit Image
      	to Window", that zooms according to the opposite dimension. Fixes
      	bug #144597.
      c7364a64
  26. 29 Jan, 2004 1 commit
    • Simon Budig's avatar
      Store the zoom factor as float, not as a ratio. · 645a1ab6
      Simon Budig authored
      2004-01-29  Simon Budig  <simon@gimp.org>
      
      	* app/display/gimpdisplayshell.[ch]: Store the zoom factor as
      	float, not as a ratio.
      
      	* app/display/gimpdisplayshell-scale.[ch]: change the API to
      	expose the Float instead a weirdly encoded integer. Implement
      	functions to get a ratio from the scale factor. Implement a set
      	as presets as discussed on the mailinglist. Changed Zoom->Other
      	dialog to enable entering a float.
      
      	* app/display/gimpdisplayshell-title.c
      	* app/display/gimpnavigationview.c
      	* app/gui/image-menu.c
      	* app/gui/info-window.c
      	* app/tools/gimpmagnifytool.c: changed accordingly.
      
      	* app/core/gimp.[ch]
      	* app/display/gimpdisplay.[ch]
      	* app/gui/gui-vtable.c
      	* app/widgets/widgets-enums.h: Made the various display-creating
      	functions accept a float for the scale. Introduce a new
      	GimpZoomType: GIMP_ZOOM_TO. Generally adjust the API to use
      	floats instead of weird integers.
      
      	* app/core/gimp-edit.c
      	* app/core/gimptemplate.c
      	* app/display/gimpdisplayshell-callbacks.c
      	* app/file/file-open.c
      	* app/gui/image-commands.c
      	* app/gui/view-commands.[ch]
      	* tools/pdbgen/pdb/display.pdb
      	* app/widgets/gimpimageview.c
      	* app/widgets/gimptoolbox-dnd.c: changed accordingly
      
      	* app/pdb/display_cmds.c: regenerated
      645a1ab6
  27. 05 May, 2003 1 commit
    • Michael Natterer's avatar
      new utility function which takes GimpZoomType and zooms "scalesrc" and · 1204865d
      Michael Natterer authored
      2003-05-05  Michael Natterer  <mitch@gimp.org>
      
      	* app/display/gimpdisplayshell-scale.[ch]
      	(gimp_display_shell_scale_zoom_fraction): new utility function
      	which takes GimpZoomType and zooms "scalesrc" and "scaledest".
      	(gimp_display_shell_scale_calc_fraction): new utility function
      	which takes an exact double scale factor and calculates "scalesrc"
      	and "scaledest".
      
      	(gimp_display_shell_scale): use the first.
      	(gimp_display_shell_scale_fit): use the second.
      
      	* app/tools/gimpmagnifytool.[ch]: use the first to click-zoom and
      	the second to area-zoom. Fixes bug #112115. Removed zoom_in() and
      	zoom_out() utiliy functions. Removed "GimpZoomType op" from the
      	GimpMagnifyTool struct. Cleanup.
      1204865d