Commit Graph

30874 Commits

Author SHA1 Message Date
Matthias Clasen
1f05f94885 GtkColorChooserDialog: propagate notification for ::show-editor 2012-02-14 16:36:59 -05:00
Matthias Clasen
05e2124f24 GtkColorChooserWidget: emit notification for ::show-editor 2012-02-14 16:36:59 -05:00
Matthias Clasen
1fd311803a Document gtk_color_chooser_add_palette 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
3a7ed2e7bd Remove unused variables 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
Matthias Clasen
5aaeaa7b81 Fix the build
A G_BEGIN_DECLS went missing here.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
bcc4186388 color-swatch: remove gtk_color_swatch_set_corner_radii()
It's unused now.
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
Cosimo Cecchi
73944c6e81 color-editor: don't call gtk_color_swatch_set_corner_radii()
It's going away.
2012-02-14 16:36:58 -05:00
Cosimo Cecchi
a9c2a586b1 color-swatch: don't hardcode list-add-symbolic as swatch icon
We have that as a property, we should use it.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
83de34882b color-swatch: allow styling the "active badge"
Instead of calling gtk_render_check() there, just render a symbolic
icon, falling back to a built-in one if the icon is not available.
Also, add a style class for the active badge on the swatch:
"color-active-badge".
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
1ccedc5fa4 color-swatch: use GtkThemingBackground to draw the background
This allows e.g. for the corner radii to be styled directly from the
theme.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
33e54e45be color-swatch: add a color-light/color-dark style class for intensity
Themes might want to set different colors on the badge if the displayed
color is light or dark. Use a style class for this when we set a color
on the swatch.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
46187037a3 themingbackground: make it based on GtkStyleContext
Instead of GtkThemingEngine. This will allow for the object to be also
used from inside e.g. a _draw() method.
2012-02-14 16:36:57 -05:00
Cosimo Cecchi
ae132c0a1a roundedbox: add _apply_border_radius() variations for engine/context
And make the base function just use the raw corner radii struct.
2012-02-14 16:36:56 -05:00
Cosimo Cecchi
4c61f1f663 themingengine: add a private _gtk_theming_engine_get_context()
We'll need this later.
2012-02-14 16:36:56 -05:00
Cosimo Cecchi
4e37d56d51 themingengine: move _gtk_theming_engine_set_context to private header
Where it belongs.
2012-02-14 16:36:56 -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
ed5aa953d5 testcolorchooser: Add more options
Add a --edit option that brings the color chooser up in
single-color edit mode right away.
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
03a2b338ee Small documentation tweaks in font choosers 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
1f68d7d827 Simplify GtkColorScale private api a bit 2012-02-14 16:36:55 -05:00
Matthias Clasen
6ed16b5b41 Fix up exported symbols
Only GtkColorChooser* is public for now.
2012-02-14 16:36:54 -05:00
Matthias Clasen
43ffb8521d Add a small comments 2012-02-14 16:36:54 -05:00
Matthias Clasen
1f7cc92219 Dismiss popups on show
This ensures that the editor always comes up without popups,
even when it is reused.
2012-02-14 16:36:54 -05:00
Matthias Clasen
3f92e24cb7 Add more todos 2012-02-14 16:36:54 -05:00
Matthias Clasen
cc127c64a9 Add some accessible labels 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
cd300835d7 Allow context menus on scale sliders
This will be used for a popup in the color chooser.
2012-02-14 16:36:53 -05:00
Matthias Clasen
e56adaebea Only activate on double-click 2012-02-14 16:36:53 -05:00
Matthias Clasen
dbbe4c12fa Remove an erraneous g_free call 2012-02-14 16:36:53 -05:00
Matthias Clasen
296cd814e5 Add an Adwaita hack
When the theme is Adwaita, let the thumb extend out over the
colored trough.
2012-02-14 16:36:53 -05:00
Matthias Clasen
5bd4c234fb Draw no trough for color scales 2012-02-14 16:36:52 -05:00
Matthias Clasen
4226551fff Move color scales into separate widget 2012-02-14 16:36:52 -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
d3b30bff0c Show new color chooser from color button 2012-02-14 16:36:52 -05:00
Matthias Clasen
2a8d3f78e9 Use a swatch in the editor
For now, we simply make it insensitive to turn off unwanted
interactivity.
2012-02-14 16:36:51 -05:00
Matthias Clasen
ff1f5de62f Don't waste memory 2012-02-14 16:36:51 -05:00
Matthias Clasen
1720e8ebf3 Preliminary color sliders 2012-02-14 16:36:51 -05:00
Matthias Clasen
8178578359 Make alpha optional 2012-02-14 16:36:51 -05:00
Matthias Clasen
8d1565df94 Show alpha in the palette as well 2012-02-14 16:36:51 -05:00
Matthias Clasen
9161119329 No popup menu on the button 2012-02-14 16:36:50 -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