Commit Graph

39 Commits

Author SHA1 Message Date
Matthias Clasen
db986ddc4f color chooser: give GSettings schema a path
The code is always instantiating this schema at a fixed location, so why
is it relocatable?

Add a path so that it shows up properly in dconf-editor, and from the
gsettings commandline tool.
2013-01-23 07:48:26 -05:00
Matthias Clasen
01cfe1b595 Plug a leak 2012-09-16 00:49:04 -04:00
Matthias Clasen
33004cb5e6 colorchooser: Fix default palette orientation
The switch from boolean to orientation failed to account
for the default palette.
2012-03-07 21:12:32 -05:00
Benjamin Otte
4d6a6be897 API: colorchooser: Use GtkOrientation for orientation
Unfortunately, this swaps the values from the previous state.
But it's definitely a nicer API.
2012-03-07 03:11:05 +01:00
Christian Persch
5a8dba7eac colorchooser: Allow removing the palettes again
https://bugzilla.gnome.org/show_bug.cgi?id=671057
2012-03-04 00:29:04 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
140e884868 Symbol exporting fixes 2012-02-21 01:50:19 +01:00
Cosimo Cecchi
e76bdb1b98 color-chooser-widget: set a name on the "Add color" button
So we can easily catch it from the theme.
2012-02-20 13:53:10 +01:00
Matthias Clasen
453aecd346 Improve a11y names for colors
Only read alpha if it is != 1, and read percentages also for
'unnamed' palette colors.
2012-02-14 16:37:04 -05:00
Matthias Clasen
18ea4825cf Mark color names as translatable 2012-02-14 16:37:04 -05:00
Cosimo Cecchi
6dbb4d6384 color-widget: don't use a GtkAlignment to center the color editor
We can just use a GtkBox, and set hexpand=TRUE/halign=CENTER to allocate
the editor in the middle of the box.
2012-02-14 16:37:01 -05:00
Matthias Clasen
92618eb8e2 GtkColorSwatch: Use widget state instead of a custom 'selected' 2012-02-14 16:37:00 -05:00
Matthias Clasen
9cc827fcd1 A11y improvements 2012-02-14 16:37:00 -05:00
Matthias Clasen
dc1929a9de Avoid a 10th custom color 2012-02-14 16:37:00 -05:00
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