Commit Graph

54 Commits

Author SHA1 Message Date
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 80985692a4 libgimpwidets: port GimpColorScales to GtkGrid 2018-05-20 21:06:30 +02:00
Michael Natterer 8447e775ab Bug 783680 - Allow to hide color models in GimpColorScales
Redo the entire thing again:

- Rename the values of enum GimpColorSelectorModel to include "MODEL"
- Change GimpColorSelector API from set_model() to set_model_visible()
  so visibility of each model can be toggled individually and is not
  exclusive any longer
- The GUI is back to what it was before, except that the "GIMP" page
  now honors the model visibility and has a resonable minimum height
2018-03-19 23:11:27 +01:00
Jehan 37e9be3a4f libgimpwidgets: arrange color models in tabs in GimpColorScales.
This allows to have a smaller and cleaner color dock instead of just
listing all possible channels (which may only grow up as we may add more
color spaces).
The API gimp_color_scales_(set|get)_show_hsv() are removed in favor of
more generic gimp_color_selector_(set|get)_model(). I assume this is
ok since they have only been available in the dev version (commit
6258d525ae, a month ago).
2018-01-21 18:37:18 +01:00
Michael Natterer 1e99b12aba libgimpwidgets: several GimpColorSelector cleanups / changes
- make RED the default channel and reorder RGB before LCH/HSV
- use more of the new getters
- also use more of the previously existing setters
2017-12-31 19:05:54 +01:00
Michael Natterer 6258d525ae Bug 770054 - High bit-depth color selection widgets
This is WIP in the middle of cleaning up GimpColorSelector subclasses:

Add the possibility to switch between LCH and LSV and between 0..100
and 0..255 RGB in to GimpColorScales. Works almost fine, but needs
different UI to change the options...
2017-12-31 17:53:13 +01: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 c61500066c libgimpwidgets: a bit of s/GtkObject/GtkAdjustment/
only the GtkObjects in the public API left now, can't change these until 3.x
2017-05-22 22:39:28 +02:00
Michael Natterer 6ab57a12cf Bug 749902 - Add Hue-Chroma operation/tool and LCH color selector
Last bit for now: allow GimpColorScales' spinbuttons to go further
than its color scales. Please review the new min/max values of the
individual channels.
2017-05-18 19:53:47 +02: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 dda54c1df8 Deprecate stock items for good and change all icon defines to GIMP_ICON_*
Try to sort all GIMP_ICON_* defines into FDO categories like in
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html

Add defines for all icons we override, rename some icons to their FDO
standard names, and mark the ones we duplicate with a comment so we
don't forget to rename those to standard names in 3.0.
2017-03-05 16:01:59 +01:00
Øyvind Kolås c9520bae6d libgimpwidgets: make color chooser scales range to 100.0 instead of 255
Still using perceptual TRC - making 50% middle gray.  This for all of 8bit and
16bit integer, as well as for floating point precisions. Also added a decimal point, to make use of more precision for both RGB and HSV entries.
2016-12-30 17:45:00 +01: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 1debefb20f Bug 756019 - Color pickers UX inconsistencies
Increase spacing between the HSV and RGB slider groups in
GimpColorScales. Yes there was spacing before, but hardly visible.
2015-10-06 23:39:49 +02:00
Michael Natterer 1ec64abb8b libgimpwidgets: add GimpColorSelectorClass::icon_name
and deprecate its stock_id.
2014-05-10 08:34:42 +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
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
Martin Nordholts eb6bef33e4 Use gtk_widget_set_visible()
In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
2009-10-17 15:07:34 +02: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 d9bc8db7a3 app/widgets/gimplayertreeview.c libgimpwidgets/gimpcolorscales.c
2008-08-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimplayertreeview.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimppropwidgets.c
	* libgimpwidgets/gimpscaleentry.c
	* libgimpwidgets/gimpwidgets.c: use gtk_adjustment_get_value()
	instead of adjustment->value.


svn path=/trunk/; revision=26815
2008-08-29 15:54:10 +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
Sven Neumann c30c5f60a3 libgimpbase/gimpchecks.c libgimp/gimpunitcache.c
2008-01-06  Sven Neumann  <sven@gimp.org>

	* libgimpbase/gimpchecks.c
	* libgimp/gimpunitcache.c
	* libgimpwidgets/gimppageselector.c
	* libgimpwidgets/gimpcolorscales.c: removed redundant checks for
	enum values (which are unsigned) >= 0.


svn path=/trunk/; revision=24546
2008-01-06 02:14:44 +00:00
Sven Neumann c9c38e5e0d fixed range check.
2007-10-28  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorscales.c 
(gimp_color_scales_set_channel):
	fixed range check.


svn path=/trunk/; revision=23981
2007-10-28 19:15:44 +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
Sven Neumann 37da566934 app/core/gimpcontext.c app/core/gimpimage.c app/paint-funcs/paint-funcs.c
2006-04-06  Sven Neumann  <sven@gimp.org>

	* app/core/gimpcontext.c
	* app/core/gimpimage.c
	* app/paint-funcs/paint-funcs.c
	* app/widgets/gimpcontrollerkeyboard.c
	* app/widgets/gimpcontrollerwheel.c
	* app/widgets/gimpcursor.c
	* app/widgets/gimpdockable.c
	* app/widgets/gimpdockbook.c
	* app/widgets/gimpdockseparator.c
	* libgimp/gimpbrushselect.c
	* libgimp/gimpfontselect.c
	* libgimp/gimpgradientselect.c
	* libgimp/gimppaletteselect.c
	* libgimp/gimppatternselect.c
	* libgimpwidgets/gimpchainbutton.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimpstock.c: sprinkled some const qualifiers.
2006-04-06 12:43:58 +00:00
Michael Natterer 33ae55f873 libgimp/*.c libgimpconfig/*.c libgimpmodule/*.c libgimpthumb/*.c port to
2005-12-20  Michael Natterer  <mitch@gimp.org>

	* libgimp/*.c
	* libgimpconfig/*.c
	* libgimpmodule/*.c
	* libgimpthumb/*.c
	* libgimpwidgets/*.c: port to G_DEFINE_TYPE() and friends. Some
	related cleanup.
2005-12-20 20:35:23 +00:00
Sven Neumann 3ca90a182e Use the canonical form for signal names in lots of places (but by far not
2005-05-27  Sven Neumann  <sven@gimp.org>

	* (lots of files): Use the canonical form for signal names in lots
	of places (but by far not all).
2005-05-27 13:05:26 +00:00
Michael Natterer bcc88a5281 changed gimpwidgetsenums.c rule to include the bits for "desc" and "help"
2005-05-22  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/Makefile.am: changed gimpwidgetsenums.c rule to
	include the bits for "desc" and "help" support.

	* libgimpwidgets/gimpwidgetsenums.h: added "desc" and "help"
	strings for the GimpColorSelectorChannel enum.

	* libgimpwidgets/gimpwidgetsenums.c: added to CVS because it
	contains translatable strings now.

	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c: removed duplicated arrays of
	strings here and get them from the type system.
2005-05-22 20:57:23 +00:00
Sven Neumann 6f32d586c9 minor changes, fixing earlier commits 2005-05-20 12:47:21 +00:00
Sven Neumann 3d6478c8b5 put the hex entry above the color history again.
2005-05-20  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorselection.c: put the hex entry above the
	color history again.

	* libgimpwidgets/gimpcolorscales.c: do not allocate row spacing
	for the alpha row if it isn't visible.
2005-05-20 10:43:38 +00:00
Sven Neumann 38f5546f5b removed the hex entry from the GimpColorScales widget.
2005-05-19  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorscales.c: removed the hex entry from the
	GimpColorScales widget.

	* libgimpwidgets/gimpcolorselection.c: added it here instead.

	* app/widgets/gimpcoloreditor.[ch]: and here, next to the FG/BG
	editor.
2005-05-19 17:08:03 +00:00
William Skaggs 89a76c042f Bill Skaggs <weskaggs@primate.ucdavis.edu>
* libgimpwidgets/gimpcolorscales.c (gimp_color_scales_update_scales):
	Block callback when updating hex entry, fixes bug #169882.
2005-03-20 23:16:15 +00:00
Sven Neumann 0620ee069e no need to set a size_request here.
2004-08-18  Sven Neumann  <sven@gimp.org>

	* app/gui/color-notebook.c: no need to set a size_request here.

	* libgimpwidgets/gimpcolorselection.c: HIG-ified spacings.

	* libgimpwidgets/gimpcolorscales.c
	* modules/colorsel_cmyk.c: don't set a minimum width on the color
	scales. Improves behaviour for narrow color dockables.
2004-08-18 21:50:26 +00:00
Simon Budig 084f814e1b emit the COLOR_CHANGED signal when the hex entry is changed.
2004-08-07  Simon Budig  <simon@gimp.org>

	* libgimpwidgets/gimpcolorscales.c: emit the COLOR_CHANGED signal
	when the hex entry is changed.
2004-08-07 18:53:32 +00:00
Sven Neumann e0b4899157 libgimpcolor/gimprgb-parse.c added new function gimp_rgb_list_names() that
2004-07-26  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/gimprgb-parse.c
	* libgimpcolor/gimprgb.h: added new function gimp_rgb_list_names()
	that gives access to the list of SVG color keywords.

	* libgimpwidgets/Makefile.am
	* libgimpwidgets/gimpwidgets.h
	* libgimpwidgets/gimpwidgetstypes.h
	* libgimpwidgets/gimpcolorhexentry.[ch]: added new widget that
	allows to enter colors in hex notation or by using color names.

	* libgimpwidgets/gimpcolorscales.c: use a GimpColorHexEntry.
2004-07-26 15:20:18 +00:00
Sven Neumann 0cb50e20f2 accept SVG color names in the hex entry. Not very intuitive but probably a
2004-07-26  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorscales.c (gimp_color_scales_hex_events):
	accept SVG color names in the hex entry. Not very intuitive but
	probably a nice experts feature and it can be improved later.
2004-07-26 12:07:01 +00:00
Sven Neumann a14bddae8a libgimpcolor/Makefile.am libgimpcolor/gimprgb-parse.c added more RGB
2004-07-22  Sven Neumann  <sven@gimp.org>

	* libgimpcolor/Makefile.am
	* libgimpcolor/gimprgb-parse.c
	* libgimpcolor/gimprgb.[ch]: added more RGB parsers and moved the
	code to a dedicated file.

	* libgimpcolor/gimpcolor.def: added new symbols.

	* libgimpwidgets/gimpcolorscales.c: use gimp_rgb_parse_hex().
2004-07-22 17:26:22 +00:00
Sven Neumann 45a7f5e459 libgimpwidgets/gimpcolorbutton.c libgimpwidgets/gimpcolornotebook.c
2004-07-13  Sven Neumann  <sven@gimp.org>

	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolornotebook.c
	* libgimpwidgets/gimpcolorscale.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* libgimpwidgets/gimpcolorselection.c
	* libgimpwidgets/gimpframe.c
	* libgimpwidgets/gimppickbutton.c
	* libgimpwidgets/gimpunitmenu.c: some code review and cosmetics.
2004-07-13 14:55:16 +00:00
Sven Neumann 4f82e87d62 don't do lazy binding on GIMP modules. We can't recover from missing
2003-11-18  Sven Neumann  <sven@gimp.org>

	* libgimpmodule/gimpmodule.c (gimp_module_open): don't do lazy
	binding on GIMP modules. We can't recover from missing symbols
	later.

	* libgimpwidgets/gimpquerybox.[ch]: renamed "help_page" parameter
	to "help_id" and changed the docs accordingly.

	* libgimpwidgets/gimpcolordisplay.[ch]
	* libgimpwidgets/gimpcolorselector.[ch]: renamed the "help_page"
	struct members of GimpColorDisplay and GimpColorSelector to
	"help_id".

	* app/gui/color-notebook.c
	* app/widgets/gimpcoloreditor.c
	* libgimpwidgets/gimpcolorbutton.c
	* libgimpwidgets/gimpcolornotebook.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c
	* modules/*.c: changed accordingly. Specify a help id instead of
	a HTML page.
2003-11-18 23:44:35 +00:00
Sven Neumann aa4448db64 app/gui/info-window.c libgimpcolor/gimpcolorspace.c libgimpcolor/gimprgb.c
2003-06-13  Sven Neumann  <sven@gimp.org>

	* app/gui/info-window.c
	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c: use ROUND() where appropriate.

	* libgimpwidgets/gimpcolorarea.c (gimp_color_area_render): use
	gimp_rgb_get_uchar().
2003-06-13 16:44:21 +00:00
Sven Neumann 08879c9f90 app/gui/info-window.c libgimpwidgets/gimpcolorscales.c applied some
2003-06-11  Sven Neumann  <sven@gimp.org>

	* app/gui/info-window.c
	* libgimpwidgets/gimpcolorscales.c
	* libgimpwidgets/gimpcolorselect.c: applied some slightly modified
	patches from Michael Bushey that fix rounding errors when
	converting between color values in gdouble and guchar
	representation (bug #109241).

	* libgimpcolor/gimpcolorspace.c
	* libgimpcolor/gimprgb.c: similar fixes here.
2003-06-11 15:55:48 +00:00
Michael Natterer 998ae3e156 set the hex entry's width to 8 chars (works around bug #109594). Set the
2003-04-02  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscales.c: set the hex entry's width to 8
	chars (works around bug #109594). Set the hex entry to its old
	value if the user typed in unparseable garbage.
2003-04-02 12:14:41 +00:00
Manish Singh 1a44f2126c cleanup, removed unecessary G_OBJECT() casts. Should do the same for
2003-01-05  Manish Singh  <yosh@gimp.org>

        * many files in app, modules and libgimp*: cleanup, removed unecessary
        G_OBJECT() casts. Should do the same for plug-ins, when more of them
        get undeprecated.
2003-01-05 22:07:10 +00:00
Michael Natterer af35e90997 mark "Scales" for translation.
2002-12-19  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscales.c: mark "Scales" for translation.
2002-12-19 17:46:45 +00:00
Manish Singh 2b16283b32 moved FINITE definition to $extra code. Changed to use #elif, much
2002-11-24  Manish Singh <yosh@gimp.org>

        * tools/pdbgen/pdb/image.pdb: moved FINITE definition to $extra
        code. Changed to use #elif, much cleaner.

        * app/pdb/image_cmds.c: regenerated

        * app/core/gimpenvirontable.[ch]: added support for app internal
        environment variable settings. These override any *.env files if
        there are collisions. Not sure on that policy. Also, envp is now
        generated on the first get_envp call.

        * app/gui/gui.[ch]: added gui_environ_init, which uses
        gimp_environ_table_add. Moved the setting of DISPLAY to here.
        Added setting of GDK_DISPLAY instead for the fb backends. Hm,
        perhaps GDK should do this itself...

        * app_procs.c: call gui_environ_init.

        * libgimpwidgets/gimpcolorscale.c
        * libgimpwidgets/gimpcolorscales.c: #include <string.h> for
        strlen and memcpy.

-Yosh
2002-11-25 00:04:26 +00:00
Michael Natterer 2743f9fae1 added virtual functions set_toggles_visible() and set_toggles_sensitive().
2002-11-05  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorselector.[ch]: added virtual functions
	set_toggles_visible() and set_toggles_sensitive(). Added a
	stock_id. Emit "color_changed" and "channel_changed" on
	set_color() and set_channel() resp.

	* libgimpwidgets/gimpcolornotebook.[ch]: implement the new
	methods.  Added gimp_color_notebook_set_has_page() to control
	which selectors a notebook contains.

	* libgimpwidgets/gimpcolorscales.[ch]: removed the toggle
	API and implement the new methods.

	* libgimpwidgets/gimpcolorselect.c: added toggle buttons for the
	channels so the widget doesn't need external ones.

	* app/gui/color-notebook.c: changed accordingly.

	* libgimpwidgets/gimpstock.[ch]
	* themes/Default/images/Makefile.am
	* themes/Default/images/stock-color-triangle-16.png: added a
	(bad) icon for the triangle color selector.

	* modules/colorsel_triangle.c: use the new icon.
	* modules/colorsel_water.c: use the "Paintbrush" icon for now.

	* app/widgets/gimpcoloreditor.[ch]: new widget for editing the
	FG/BG color featuring a color notebook, stock buttons for
	selecting the pages and a GimpPickButton.

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h: changed accordingly.

	* app/gui/dialogs-constructors.[ch]
	* app/gui/dialogs.c: added a dockable wrapper for GimpColorEditor.

	* app/gui/menus.c: added it to the menus. Also added separate
	Layers, Channels and Paths entries. Bind <ctrl>L to the new
	callback so it doesn't always create a new layers dialog.
2002-11-05 00:02:56 +00:00
Michael Natterer 41ca3053dd fixed rendering for partial expose events.
2002-10-30  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolorscale.c: fixed rendering for partial
	expose events.

	* libgimpwidgets/gimpwidgets.[ch]: added gimp_color_scale_entry_new().

	* libgimpwidgets/gimpcolorscales.c: use the color scales.
2002-10-30 16:10:18 +00:00
Michael Natterer 0ea33ada16 create the notebook labels with mnemonics.
2002-10-30  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpcolornotebook.c: create the notebook labels
	with mnemonics.

	* libgimpwidgets/gimpcolorselect.c
	* modules/colorsel_triangle.c
	* modules/colorsel_water.c: added mnemonics to the tab strings.

	* libgimpwidgets/gimpcolorscale.c: looks finished now.

	* libgimpwidgets/gimpcolorscales.c: tie the test color scale to
	the right channel adjustment and update its color and channel
	accordingly. Added mnemonics for the channels.
2002-10-30 14:52:58 +00:00