Commit Graph

25 Commits

Author SHA1 Message Date
Matthias Clasen
05e2124f24 GtkColorChooserWidget: emit notification for ::show-editor 2012-02-14 16:36:59 -05:00
Matthias Clasen
7f44feab19 Fix use_alpha initialization and propagation
We must set use_alpha to TRUE initially, and when passing it
down to the swatches, we must iterate over the custom box, too.
2012-02-14 16:36:59 -05:00
Matthias Clasen
bad24bc119 Consistently private headers
Add a 'private' suffix to all newly introduced private
headers.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
74a53b542b color-widget: use a GtkBox for the custom section
Since we only allow a single row there, it's better to just use a
GtkBox, and use :first-child, :last-child and :only-child to style
swatches in there.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
9da3d8b7b9 color-widget: add LEFT/RIGHT/TOP/BOTTOM style classes to the swatches
As we add them to the grid, for setting theming properties.
2012-02-14 16:36:58 -05:00
Matthias Clasen
8f201d62d9 Add API to set palettes
I'm not really convinced by this; the API is a little complicated.
May need more thought.
2012-02-14 16:36:56 -05:00
Matthias Clasen
d7cff0797e Misc cleanups 2012-02-14 16:36:56 -05:00
Matthias Clasen
cb128cc6e9 Deprecate old color selection widgets
GtkColorSelectionDialog, GtkColorSelection and GtkHSV have
been superseded by the GtkColorChooser* family of widgets.
2012-02-14 16:36:55 -05:00
Matthias Clasen
23a5f7a22c Add docs 2012-02-14 16:36:55 -05:00
Matthias Clasen
c5cfb6e02b Rework the API a bit
Rename get/set_color to get/set_rgba and show_alpha to use_alpha,
to match existing GtkColorButton API and let GtkColorButton implement
GtkColorChooser.
2012-02-14 16:36:55 -05:00
Matthias Clasen
43ffb8521d Add a small comments 2012-02-14 16:36:54 -05:00
Matthias Clasen
327e36e360 Mark strings for translation 2012-02-14 16:36:53 -05:00
Matthias Clasen
f2aaffaf07 Finishing touches
Implement popups in the editor, fix window sizing, fix RTL flipping.
GtkColorPlane is now using adjustments, and GtkColorEditor is using
adjustments as its model as well.
2012-02-14 16:36:53 -05:00
Matthias Clasen
bdb8931bda Fix a few problems with custom color replacement
We were allowing one too many custom colors in, and when one
of them was dropped, we did not update the shape of the penultimate
one.
2012-02-14 16:36:52 -05:00
Matthias Clasen
3a35895a00 Make color chooser always come up with palette 2012-02-14 16:36:52 -05:00
Matthias Clasen
8178578359 Make alpha optional 2012-02-14 16:36:51 -05:00
Matthias Clasen
9b81322409 Make saving custom colors work as intended
The custom colors are now pushed over to the right as new ones
are added, and everything beyond the 9th row gets dropped.
Customized colors are added to the custom colors array.
2012-02-14 16:36:50 -05:00
Matthias Clasen
e1bf3b6650 Choose a different initial color when adding custom colors
Going for pure red 'hides' the hairline at the edge of the
plane. This color makes it nicely visible.
2012-02-14 16:36:50 -05:00
Jon McCann
efccf87961 Show editor when clicking custom button 2012-02-14 16:36:50 -05:00
Jon McCann
2c24e3cb6a Align label with swatches 2012-02-14 16:36:50 -05:00
Jon McCann
ce8212c5a8 Add Tangoish grayscales 2012-02-14 16:36:50 -05:00
Jon McCann
ea6ac7131e Use the Tango palette by default 2012-02-14 16:36:49 -05:00
Matthias Clasen
e06ccb0fbb Move the plane into a separate widget 2012-02-14 16:36:49 -05:00
Matthias Clasen
021f5e0365 Initial work on a color editor
This replaces GtkHSV with a compound widget featuring
a hue slider and an sv-plane, amongst others.
2012-02-14 16:36:49 -05:00
Matthias Clasen
3b6e316e74 Initial cut at implementing a new color chooser
This is a partial implementation of
https://live.gnome.org/GnomeOS/Design/Whiteboards/ColorSelection
The new color editor has not been implemented yet.
2012-02-14 16:36:49 -05:00