instead of turning it off unconditionally in gimp_canvas_init(), so we
have full control over buffering when we are rendering images, but let
GTK+ handle a flicker-free wilber itself.
and remove all old selection drawing code. Thanks to Benjamin Otte for
pointing out the right optimization.
Also fixes bug #479875 - performance problem drawing a complex selection.
Implement GtkWidget::focus() and override GtkContainer's focus()
implementation which would always give focus to the canvas because it
is focussable. Instead, try navigating in the focussed overlay child
first, and use GtkContainer's default implementation only if that
fails (which happens when focus navigation leaves the overlay child).
and as a "side effect", speed up rendering the image significantly:
- disable double buffering on the canvas widget.
- implement background clearing ourselves (needed after turning off
double buffering).
- remove any fiddling with clipping regions on the tool drawing GCs
and pull the pause/resume code out of the actual image expose
function.
- if there are overlay widgets on the canvas, implement double
buffering manually to aviod flicker, but do it in a way that keeps
pausing/resuming the active tool *outside* the double buffered
drawing.
Implement GtkWidget::focus_in_event() and ::focus_out_event() in
GimpCanvas and don't chanin up so the default handler never runs.
Remove code that tries to do the same in the canvas' tool events
callback.
The default impl invalidates the entire widget for no reason (the
canvas doesn't draw a focus indicator anyway), and the old solution
failed for empty displays and was constantly invalidating the entire
drop zone when the toplevel window gained or lost focus.
- adapt callbacks to ignore / not block events on offscreen children
- use GimpOverlayBox' scroll API which makes sure overlay children
don't scroll along
2009-03-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.c
* app/display/gimpdisplayshell.c: use accessors for various
members of GTK+ structures that don't exist any longer when
GSEAL_ENABLE is defined.
svn path=/trunk/; revision=28192
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
2008-08-22 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: add gimp_canvas_scroll() which
scrolls the canvas and makes the result visible immediately.
* app/display/gimpdisplayshell-scroll.c
(gimp_display_shell_scroll): use the new function.
svn path=/trunk/; revision=26712
2008-08-21 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: turn into a GtkContainer subclass
mainly to reduce the diff to a local hack I'm at. Also swallow
some code that used to be called on the canvas widget externally.
* app/display/gimpdisplayshell.c (gimp_display_shell_new): remove
the swallowed code.
* app/display/gimpdisplayshell-callbacks.h: remove canvas event
mask define.
svn path=/trunk/; revision=26708
2008-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/gimpcairo-wilber.c: include a better Wilber path,
thanks to Jimmac.
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): undid
scaling "fix", instead take the offset into account. Draw with
transparency.
svn path=/trunk/; revision=25246
2008-03-26 Sven Neumann <sven@gimp.org>
* app/widgets/Makefile.am
* app/widgets/gimpcairo-wilber.[ch]: new files that renders a
Wilber image as a Cairo path. Or at least it is supposed to do
this at some point...
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): use the
scalable Wilber path. Needs more work...
svn path=/trunk/; revision=25244
2008-03-26 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.[ch]: improve wilber scaling and remove
the drop zone layout.
* app/display/gimpdisplayshell.c: add a tooltip instead.
svn path=/trunk/; revision=25241
2008-03-21 Sven Neumann <sven@gimp.org>
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): tweaked
opacity calculation so that the opacity is only increased with
smaller font sizes.
svn path=/trunk/; revision=25166
2008-03-21 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): make sure
the drop label's opacity scales with its size so we don't end up
with tiny text at 10% opacity.
svn path=/trunk/; revision=25149
2008-03-19 Michael Natterer <mitch@gimp.org>
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): make the
scale factor of the label 4/5 instead of 2/3 of the canvas and
move the factor out of the MIN().
svn path=/trunk/; revision=25132
2008-03-19 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
(gimp_display_shell_canvas_expose): return FALSE so that the
default drag highlighting works.
* app/display/gimpdisplayshell-dnd.c: only set the canvas as
drop
target, not the whole shell.
* app/display/gimpdisplayshell.c: delay the call to
gimp_display_shell_dnd_init() until after the canvas has been
created.
svn path=/trunk/; revision=25127
2008-03-19 Sven Neumann <sven@gimp.org>
* app/widgets/gimpdockable.c
* app/widgets/gimpwidgets-utils.[ch]: moved utility function for
setting attributes on a PangoLayout out of gimpdockable.c.
* app/display/gimpcanvas.c (gimp_canvas_draw_drop_zone): use a
bold font and paint the layout with transparency.
svn path=/trunk/; revision=25116