Commit Graph

2596 Commits

Author SHA1 Message Date
Michael Natterer 4656ead4b3 app: make sure the image stays in place when showing/hiding docks
also when it's rotated or flipped.
2015-11-14 00:05:23 +01:00
Michael Natterer c6b6031f31 Bug 758049 - Please add canvas flipping
Enable flipping in the canvas rotate transform matrix, and add some
menu items to control it. Rename the "Rotate" menu to "Flip & Rotate".
2015-11-13 18:51:32 +01:00
Michael Natterer 10085b118a Bug 757739 - GIMP crashes closing undocked pointer dialog
Keep a reference to GimpCursorView's context around as long as the
widget is alive.
2015-11-07 21:14:40 +01:00
Michael Natterer e00c28ec71 app: use the new icons 2015-10-26 08:14:05 +01:00
Michael Natterer 917a63d189 app: move the image thumbnail bottom-left in the window icon
the wilber is already to-right, it just needs better images for this
purpose.
2015-10-26 02:13:22 +01:00
Michael Natterer cece88ba95 app: fix call to gdk_pixbuf_composite() when rendering the window icon 2015-10-26 01:58:00 +01:00
Michael Natterer 19b984e1df app: fix the image window's thumbnail size and shape
and render a wilber on top of it, yay! Step one, this can still be
nicer...
2015-10-26 01:09:08 +01:00
Michael Natterer 5bc9ad947a app: fix gimp_display_shell_scale_to_rectangle() to also do only scrolling
which means: also scroll to the rectangle if the scale doesn't change.
2015-10-18 15:18:23 +02:00
Michael Natterer ded7c8f585 app: add gimp_display_shell_scale_to_rectangle()
and move the magnify tool's rectangle zoom logic to the new function.
2015-10-18 14:59:30 +02:00
Michael Natterer b7f471b1a3 app: change some integers in gimpdisplayshell-scale.c to gdouble
which does not have any effect by itself, but is needed for fixing
viewport calculation for rotated canvases.
2015-10-18 14:40:19 +02:00
Michael Natterer 526a3a6020 Bug 755363 - Non-void function should return a value
Use g_return_val_if_fail() in function returning non-void.
2015-09-21 20:37:29 +02:00
Michael Natterer 29fee56914 app: fix visibility of the color picker tools info window
Since commit 867b1f7e the window did always pop if it was set to
visible once, even if closed and "Use info window" disabled.

Fix this by adapting the show logic to the fact that we now keep the
widget alive across images/displays.
2015-09-20 00:37:05 +02:00
Michael Natterer 396bc89e56 app: better temporary debug output in gimp_display_shell_profile_update() 2015-09-09 21:09:31 +02:00
Michael Natterer df2a485907 Bug 754713 - On-canvas dialog of color picker tool always displays...
...in initially active tab

gimp_tool_gui_update_shell(): implement the "overlay" case and hide the
gui on the previous shell, then show it on the new one.
2015-09-08 21:53:24 +02:00
Michael Natterer b45d31072b app, libgimpcolor: refactor GimpColorManaged::get_color_profile()
to not return a reference that has to be dropped. Also allow NULL to
be returned if the managed cannot have a profile. If it can have one,
get_color_profile() still always returns a profile (either the
assigned one, or a generated built-in one).
2015-09-03 01:36:02 +02:00
Michael Natterer 9775b2083b app: simplify display update when the color management config changes
gimp_image_constructed(): connect to "notify" on GimpColorConfig
and call gimp_color_managed_profile_changed() on the image.

Remove the "notify" handler on GimpColorConfig from
gimpdisplayshell-handlers.c because it already connects to the
image's "profile-changed" signal.

Additionally, implement GimpColorManaged::profile_changed() in
GimpImage and invalidate the image and all layer previews. One step
closer to color managing image and layer previews.
2015-09-02 21:01:17 +02:00
Michael Natterer fd0203ce80 libgimpwidgets: change parameters of gimp_widget_get_color_transform()
Change GimpColorManaged to GimpColorProfile.
2015-09-01 23:40:57 +02:00
Mukund Sivaraman 74bc034638 app: Clarify message shown in unstable builds 2015-08-31 18:49:37 +05:30
Michael Natterer 8c80ee14ff Bug 748749 - picked colors don't match image colors...
...when a color profile is active

This commit doesn't fix anything, but it prepares the code to do the
right thing:

It passes the actual raw image pixels through the entire color picking
mechanism to the widgets which display colors, particularly
GimpColorFrame.

This is needed for GimpColorFrame's "Pixel" mode (as opposed to its
RGB, HSV etc. modes) which is supposed to show the raw pixel values
from the image.

Before this commit, it was recreating the raw pixel values from the
GimpRGB value it knows, which will become impossible when we correctly
pick color managed GimpRGB values soon.
2015-08-25 00:05:59 +02:00
Alexander Larsson 0e10349711 GimpImageWindow: Chain up from constructed
https://bugzilla.gnome.org/show_bug.cgi?id=751507
2015-08-17 11:35:57 +02:00
Michael Natterer cafc3b3c3e app: fix a double semikolon in gimpdisplayshell.c 2015-08-14 22:37:52 +02:00
Michael Natterer c102dde92b libgimpcolor, *: change GimpColorProfile to be a GObject
it used to be a typedef to gpointer and actually was a cmsHPROFILE.

Change its API to be more "standard", remove the public close()
function. The object caches both the cmsHPROFILE and the data/length
ICC blob, so conversions between the two become obsolete (simply call
get_lcms_profile() or get_icc_profile()).

Adapt everything to the new API, but port it in a naive way for now,
the code doesn't take advantage of the new possibilities yet (like
refcounting).
2015-07-10 22:53:59 +02:00
Michael Natterer c04c3950ee app: use gimp_item_bounds() in GimpCursorView, and simplify the code 2015-07-03 19:38:07 +02:00
Michael Natterer af1e86827f app: make gimp_display_shell_mask_bounds() use x, y, width, height
instead of x1, y1, x2, y2, and use gimp_item_bounds() instead of
gimp_channel_bounds().
2015-07-03 19:38:07 +02:00
Michael Natterer 2ed749fd26 app: use gimp_display_shell_transform_bounds()
instead of manually doing the same in gimp_display_shell_mask_bounds().
2015-07-03 19:38:07 +02:00
Michael Natterer e669c6dd05 Bug 750874 - Displayed colors look clipped after profile conversion...
...but they aren't clipped

gimp_display_shell_profile_can_convert_to_u8(): allow the shortcut of
converting directly to 8-bit for display only for GIMP_COMPONENT_TYPE_U8.

This might be an lcms bug, the code can be enabled again for U16 and
U32 if it's indeed an lcms bug and it gets fixed.
2015-06-29 10:22:22 +02:00
Michael Natterer db09d0f3d3 app: move functions to create layers to new files gimplayer-new.[ch] 2015-06-17 13:21:01 +02:00
Michael Natterer c876e281b1 Bug 750874 - Displayed colors look clipped after profile conversion...
but they aren't clipped

Add gimp_display_shell_profile_can_convert_to_u8() which returns
whether the lcms transform can safely write directly into an u8 buffer
without destroying out-of-gammut pixel values, which we assume is the
case for all integer formats. If the function returns FALSE, always
convert via the R'G'B'A float filter_buffer.

Also connect to the image's "precision-changed" signal and update the
profile transform when it's emitted.
2015-06-13 00:27:21 +02:00
Michael Natterer 5cdbf6ae33 app: always use an RGB format as source format for display color management 2015-06-12 20:15:19 +02:00
Michael Natterer 4910c28957 libgimpcolor: rename the gimp_lcms_*() functions to gimp_color_profile_*()
because it doesn't make sense to call the typedef GimpColorProfile
but the function namespace gimp_lcms_*().
2015-06-03 09:41:23 +02:00
Michael Natterer 460948e068 app: add member GimpDisplayShell.filter_format
and use it where we used to hardcode "R'G'B'A float".
2015-06-02 00:01:28 +02:00
Michael Natterer 08545ad549 app: switch gimpdisplayshell-render.c to the new profile filter code
- disable auto-adding of the lcms display filter module

- change profile convert dest formats to be always R'G'B'A, a display
  profile transform outputs something that can be displayed directly,
  so no additional gamma transform must happen when the pixels are
  copied to a cairo-ARGB32 buffer

- add a medium forest of if() branches to gimpdisplayshell-filter.c
  which cover all combinations of profile and display filter
  transforms

- all of this is still very broken when changing an image to linear,
  because the configured RGB profile from prefs will do horrible
  nonsense (things work fine though with a per-image profile that is
  for linear data)
2015-06-01 23:30:03 +02:00
Michael Natterer 1b9a8b71ba app: add gimp_display_shell_has_filter()
which checks if there are any filters active on the display.
2015-06-01 08:16:12 +02:00
Michael Natterer 2e07e938f4 app, libgimpcolor: never return NULL in GimpColorManaged::get_color_profile() 2015-05-30 22:23:25 +02:00
Michael Natterer 281a529b0c app: use gimp_color_managed_get_color_profile()
instead of gimp_image_get_color_profile() and remove all fallback
code, GimpColorManaged always returns a profile.
2015-05-30 00:58:22 +02:00
Michael Natterer e06a620d11 app: rename gimp_image_get_profile() to _get_color_profile() 2015-05-30 00:47:13 +02:00
Michael Natterer 8b824305a0 app: update the display profile transform when the color config changes 2015-05-27 12:30:32 +02:00
Michael Natterer 8ded5c40e3 app: update the display profile transform when display filter change
because they will share buffers.
2015-05-27 12:29:42 +02:00
Michael Natterer 3267218143 app: add gimpdisplayshell-profile.[ch]
which will take over display color management from the display
filter module. This is WIP, the code is still unused.
2015-05-27 12:28:33 +02:00
Michael Natterer 6b0b774302 libgimpwidgets: add gimpwidgetsutils.[ch]
Move some functions from libgimpwidgets/gimpwidgets.[ch]
and from app/widgets/gimpwidgets-utils.[ch]. Newly add
gimp_widget_get_color_profile() which is extracted from
modules/display-filter-lcms.c.
2015-05-06 22:15:30 +02:00
Michael Natterer 072cb068b2 app: add a "detach" button to all on-canvas tool dialogs
which turns them from being automatically attached/detached (depending
on canvas size) into always being a separate window.
2015-05-01 18:00:05 -04:00
Michael Natterer 4ea6f6dd28 app: minor formatting cleanup in gimpdisplayshell-tool-events.c 2015-04-18 08:40:31 +02:00
Michael Natterer 6f104ff2ac Bug 747224 - Too easy to accidentially close an image tab
Show the close button only on the active tab, so it's not
accidentially hit when changing between images.
2015-04-03 20:28:57 +02:00
Michael Natterer 2e316a342e app: change the image window icon size from 32x32 to 64x64, because it's 2015 2015-03-29 21:50:34 +02:00
Mukund Sivaraman 2c80affe4c app: Include commit hash in display shell message 2015-03-12 12:07:45 +05:30
Michael Natterer ce29043315 app: some cleanup in GimpCanvasBufferPreview 2015-03-01 00:18:10 +01:00
Marek Dvoroznak 10255eddbb app: npd-tool: add option to apply or cancel the deformation 2015-02-27 20:21:52 +01:00
Marek Dvoroznak 781f0b79f8 app: add canvas buffer preview
It is used by n-point deformation tool to preview a deformation process.
2015-02-27 20:21:52 +01:00
Joao S. O. Bueno 2746544328 Add new codes for title bar: '%e' for offsets, '%r' for rotation 2015-01-29 11:06:54 -02:00
Kristian Rietveld cea42c73d8 app: fix implicit enum casting
Silences clang.
2015-01-10 00:02:28 +01:00