Commit Graph

70 Commits

Author SHA1 Message Date
Michael Natterer 5f700549e7 Change the license URL from http://www.gnu.org/licenses/ to https:// 2018-07-11 23:29:46 +02:00
Michael Natterer 60dfc45700 libgimpwidgets: finish GimpColorScale undeprecation, and lots of cleanup
- derive it from GtkScale not GtkRange so we get the keybindings again
- remove scroll_event() implementation, the parent class does the right
  thing now
- remove lots of magic size calculation code about focus and borders
  and whatnot
- instead, style its CSS nodes using a hardcoded CSS provider and simply
  "know" the size of the slider in draw(), did this in code instead of
  the theme CSS because we do pretty evil things here and we don't want
  theme authors to think they can change much about it
2018-06-20 12:41:38 +02:00
Michael Natterer 1b7d63cce9 Use g_set_object() in a lot of places, and splrinkle some g_clear_object() 2018-06-01 12:59:52 +02:00
Michael Natterer ed023bf05e libgimpwidgets: undeprecate insensitive drawing of GimpColorSacle
the same way as in GimpColorArea.
2018-05-20 21:06:35 +02:00
Michael Natterer bb2a9d119f libgimpconfig: move all GimpColorConfig members to private 2018-05-20 21:06:33 +02:00
Michael Natterer f4f106ad26 libimp*: add private pointers to all instance structs
even if we don't have private members (yet). Also make class padding 8
pointers in all headers. This commit moves nothing to private, it just
makes all headers consistent and adjusts .c files accordigly.
2018-05-20 21:06:33 +02:00
Michael Natterer 4f0a87ffa6 app, libgimpwidgets, themes: fix some themeing
Add CSS names using gtk_widget_class_set_css_name(), remove styling in
code and instead do it properly in CSS, so far in the System theme.
All horribly incomplete but a start.
2018-05-20 21:06:30 +02:00
Michael Natterer da5e72369e libgimpwidgets: make GimpColorScale more-or-less work fine
also derive it from GtkRange directly not from GtkScale.
2018-05-20 21:06:29 +02:00
Michael Natterer f20b2d1a43 libgimpwidgets: move all GimpColorScale members to a private struct 2018-05-20 21:06:28 +02:00
Michael Natterer 1264285cff libgimpwidgets: implement GtkWidget::state_flags_changed()
instead of GtkWidget::state_changed()
2018-05-20 21:06:28 +02:00
Michael Natterer d9fac0ce6e libgimpwidgets: port GimpColorScale to GtkStyleContext 2018-05-20 21:06:27 +02:00
Michael Natterer 04c12550da libgimpwidgets: port to GtkWidget::draw() 2018-05-20 21:06:26 +02:00
Michael Natterer 582c6edd54 libgimp*: use some g_clear_object() and g_clear_pointer() 2017-09-03 15:14:51 +02:00
Elle Stone d13fa3900a Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
This patch increases the LCH Chroma slider maximum value from 100 to
200 and also makes the Chroma slider properly display out of gamut
Chroma selections for any given Hue/Lightness combinations.

The current Chroma slider only runs to 100. But quite a few sRGB
colors have LCH chroma values that are greater than 100. For example
reddest red has a chroma of 107, and bluest blue has a chroma of 131.
So it's inconvenient to have to deal with a Chroma slider limit of
100.

Also, the current Chroma slider doesn't properly show out of gamut
areas on the Chroma slider. So for example picking a given LCH Hue and
then moving the Lightness slider doesn't allow to see which Lightness
value allows for choosing the maximum in-gamut chroma for the chosen
Hue.
2017-07-16 15:13:11 +02:00
Michael Natterer f9ee38ea33 libgimp: add blurbs to all object properties for the docs
and some minor doc fixes.
2017-06-06 21:19:17 +02:00
Ell 1176482b4b libgimpwidgets: don't babl_init() in gimp_color_scale_class_init()
Woohoo!  We can actually inject this into the gtk-doc thingy!
2017-05-31 22:14:42 -04:00
Michael Natterer 2b167d6337 Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Add LCH to the color selectors, patch by Elle Stone and myself.

- Extend enum GimpColorSelectorChannel by LCH channels
- Support them in GimpColorScale, GimpColorScales and GimpColorSelect
- Did not yet remove the HSV channels until things are working 100% ok
- Change drawing in GimpColorSelect to be much faster, to compensate
  for babl_process() making the LCH modes pretty slow
- Clean up stuff in GimpColorSelect

This is WIP and should not be considered finished, biggest TODO is
displaying out-of-gamut values in GimpColorScales' spinbuttons.
2017-05-17 19:28:40 +02:00
Michael Natterer 8e65aca452 Bug 773334 - GimpColorScale's scrolling behaviour is inverted...
...(scroll up decreases the value)

Implement GtkWidget::scroll_event() and turn GDK_SCROLL_UP into RIGHT
and DOWN into LEFT. The default behaviour or good for scrollbars but
not for widgets where "right" == "higher value" == "up" like
GimpColorScale.
2016-10-23 18:38:06 +02:00
Michael Natterer 3ed305f6f5 libgimpwidgets, app: have all previews track the monitor they are on
and update their color transforms with the new monitor's color
profile. A widget is considered changing monitors when its toplevel
window's center crosses, in order to let widgets within one window
have consistent colors.
2016-06-01 22:42:00 +02:00
Michael Natterer 4ad2493283 libgimpwidgets, modules: improve set_color_config() functions a bit
Don't do anything if the config doesn't change.
2016-05-31 12:27:15 +02:00
Michael Natterer 9014fbeb32 Bug 467930 - color selectors are not color managed
Color manage GimpColorScale and GimpColorScales.
2016-05-27 00:51:32 +02:00
Michael Natterer 8005eea835 Remove the "GIMP" from all "Since: GIMP 2.x" API doc comments
because it confuses gtk-doc and breaks some links. Also change the
"Index of new symbols in GIMP 2.x" sections to be what seems to be the
modern standard (looked at the GLib and GTK+ docs), and update some
other stuff.
2015-05-31 21:18:09 +02:00
Michael Natterer 3ad73b3658 libgimpcolor: add GdkPixbuf <-> GeglBuffer utility functions
and update tons of includes in libgimp and app.
2012-05-03 03:37:20 +02:00
Michael Natterer 3e119c5af7 libgimpcolor: add gimp_rgb[a]_set,get_pixel()
which converts from/to any pixel format using Babl. Added tons of
includes and CFLAGS now that libgimpcolor publically uses Babl.
2012-05-02 17:50:43 +02:00
Mukund Sivaraman d04efe3a03 libappwidgets: Initialize arrays before use 2011-04-25 19:34:02 +05:30
Mukund Sivaraman 27db4d9fc0 libgimpwidgets: Fix typo in array index 2011-04-25 19:32:08 +05:30
Mukund Sivaraman a31d8dab79 Revert "libgimpwidgets: Don't use light[3] and dark[3] as they're both uninitialized"
This reverts commit a0ff981041.
2011-04-25 19:29:55 +05:30
Mukund Sivaraman a0ff981041 libgimpwidgets: Don't use light[3] and dark[3] as they're both uninitialized
This also removes the bogus double assignment to l[2].
2011-04-21 14:22:13 +05:30
Michael Natterer e44d3b46ef libgimpwidgets: make GimpColorScale:channel a property 2011-02-15 18:52:00 +01:00
Michael Natterer 73b5e1d8a6 libgimpwidgets: remove commented-out code 2011-01-07 19:38:34 +01:00
Michael Natterer 47c6b25f23 libgimpwidgets: transform the cr to widget coords
Get rid of allocation.foo and also kill all the rectangle intersection
that are not really optimizations on such a small widget.
2010-10-15 11:09:47 +02:00
Michael Natterer a9e6297110 libgimpwidgets: implement GObject::finalize() instead of GtkObject::destroy() 2010-10-15 02:12:33 +02:00
Michael Natterer 251177f18d libgimpwidgets: fix GimpColorScale arrows to be as small as before 2010-09-11 22:06:00 +02:00
Michael Natterer 354a640e9e libgimpwidgets: port the rest of GimpColorScale drawing to cairo 2010-09-10 21:33:00 +02:00
Michael Natterer e617ecedd9 libgimpwidgets: port GimpColorScale slider drawing to cairo 2010-09-10 20:57:06 +02:00
Michael Natterer 1f7ff98c45 libgimpwidgets: move docs from template files to inline comments
but leave the template file for gimpstock there because its contents
would be too much for gimpstock.h.
2010-07-05 18:01:28 +02:00
Michael Natterer a2c70822d4 Use accessors from GTK+ 2.20 instead of using sealed members directly 2010-04-19 19:21:07 +02:00
Michael Natterer fcd346a227 Build with GSEAL_ENABLE with a few exceptions
Use the new accessors in GTK+ 2.18 and #undef GSEAL_ENABLE where
accessors are missing or where I'm not quite sure how to fix the
stuff yet.
2009-10-17 18:51:48 +02:00
Michael Natterer 656e30cd3a Looking at widget->requisition in size_allocate() is useless
Use the passed GtkAllocation for calculating things, not
widget->requisition.
2009-08-01 18:59:58 +02:00
Michael Natterer facb13fdba Use GtkOrientable API instead of accessing range->orientation directly 2009-07-15 01:53:30 +02:00
Michael Natterer 3795f9b9c5 libgimpwidgets/gimpchainbutton.c libgimpwidgets/gimpcolorarea.c
2009-03-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpdialog.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpmemsizeentry.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimppixmap.c
	* libgimpwidgets/gimppreview.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimpruler.c
	* libgimpwidgets/gimpscrolledpreview.c
	* libgimpwidgets/gimpwidgets.c: use accessors for various members
	of GTK+ structures that don't exist any longer when GSEAL_ENABLE
	is defined.


svn path=/trunk/; revision=28190
2009-03-22 15:42:42 +00:00
Michael Natterer d9b5207aa2 Change licence to GPLv3 (and to LGPLv3 for libgimp).
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
2009-01-17 22:28:01 +00:00
Michael Natterer 58cfcd4f57 libgimp/gimpgradientselectbutton.c libgimp/gimpmenu.c
2008-06-28  Michael Natterer  <mitch@gimp.org>

	* libgimp/gimpgradientselectbutton.c
	* libgimp/gimpmenu.c
	* libgimpwidgets/gimpbrowser.c
	* libgimpwidgets/gimpcellrenderercolor.c
	* libgimpwidgets/gimpcellrenderertoggle.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorarea.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpenumwidgets.c
	* libgimpwidgets/gimpframe.c
	* libgimpwidgets/gimphelpui.c
	* libgimpwidgets/gimpoffsetarea.c
	* libgimpwidgets/gimppreviewarea.c
	* libgimpwidgets/gimppropwidgets.c
	* libgimpwidgets/gimpscrolledpreview.c: use accessors instead of
	accessing members of GTK+ widgets directly.


svn path=/trunk/; revision=26005
2008-06-28 15:09:46 +00:00
Tor Lillqvist 84fc8263a1 Don't write past end of buffer. (#399484)
2007-11-19  Tor Lillqvist  <tml@novell.com>

	* libgimpwidgets/gimpcolorscale.c
	(gimp_color_scale_render_stipple): Don't write past end of
	buffer. (#399484)


svn path=/trunk/; revision=24193
2007-11-18 22:31:08 +00:00
Michael Natterer ff63dc6b44 revert last change, it looks ugly in themes which actually draw a box
2007-06-04  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscale.c (gimp_color_scale_expose):
	revert last change, it looks ugly in themes which actually draw a
	box around the scale.


svn path=/trunk/; revision=22705
2007-06-04 15:37:20 +00:00
Sven Neumann 7588090d85 pass NULL as detail to gtk_paint_box().
2007-06-04  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorscale.c (gimp_color_scale_expose): pass
	NULL as detail to gtk_paint_box().

svn path=/trunk/; revision=22702
2007-06-04 13:55:31 +00:00
Michael Natterer 739da20929 let mouse button 1 jump to the clicked position directly (just as mouse
2007-06-03  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscale.c: let mouse button 1 jump to the
	clicked position directly (just as mouse button 2 does). Feels
	much more intuitive because the result of the operation is visible
	before and color scales have no scroll arrows either.


svn path=/trunk/; revision=22695
2007-06-03 21:41:31 +00:00
Michael Natterer 2606a93524 removed #define SHADOW 1, it's not a constant value. Use the
2006-05-31  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscale.c: removed #define SHADOW 1, it's
	not a constant value. Use the GtkRange::trough-border style
	property instead.
2006-05-31 10:16:08 +00:00
Sven Neumann 6ebcf700d1 removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15  Sven Neumann  <sven@gimp.org>

	* app/*/*.c:
	* lib*/*.c: removed erroneous semicolon after G_DEFINE_TYPE macros.
2006-05-15 09:46:31 +00:00
Sven Neumann f2df31a50e converted tabs to spaces.
2006-04-12  Sven Neumann  <sven@gimp.org>

	* libgimp*/gimp*.[ch]: converted tabs to spaces.
2006-04-12 10:53:28 +00:00