Commit Graph

45140 Commits

Author SHA1 Message Date
Matthias Clasen
48e543fbc8 Adwaita: Update separator toolitem styling
Don't set a background for these, since we now draw background.
2015-12-15 08:41:16 -05:00
Matthias Clasen
e480fa3841 separator toolitem: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
f2dd4350b2 css node: Warn more
gtk_css_node_insert_before/after can easily create cycles
which later lead to stack overflows. Even if we're not
catching all cycles here, at least we can detect obviously
invalid arguments, such as inserting a node next to itself.
2015-12-15 08:41:16 -05:00
Matthias Clasen
e2bc77b9af Adwaita: Remove nonsensical expander theming
No red backgrounds, please.
2015-12-15 08:41:16 -05:00
Matthias Clasen
61fb3f828e expander: Convert to gadgets
As part of the conversion, add another CSS node for the title
area including the arrow and the label.
2015-12-15 08:41:16 -05:00
Matthias Clasen
f0a2f9ef96 revealer: Add CSS node docs 2015-12-15 08:41:16 -05:00
Matthias Clasen
f7466b236a stackswitcher: Stop hardcoding 100px width
We can now set a min-width in the theme, so we don't have to
hardcode the size request here anymore.

https://bugzilla.gnome.org/show_bug.cgi?id=726371
2015-12-15 08:41:16 -05:00
Matthias Clasen
ad349caa00 gadget: Add some documentation 2015-12-15 08:41:16 -05:00
Matthias Clasen
9c88256441 box: Trivial doc change
All the CSS sections are named CSS nodes, so do the same here.
2015-12-15 08:41:16 -05:00
Matthias Clasen
f3561eaa9b grid: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
e237c947c7 headerbar: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
90109cfe4c actionbar: Convert to gadgets
This is a nice example of a trivial container conversion.
2015-12-15 08:41:16 -05:00
Matthias Clasen
0f7dbc3bbd Adwaita: No padding for image buttons in popovers 2015-12-15 08:41:16 -05:00
Matthias Clasen
736d864d18 modelbutton: Port to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
782c2762bf gadget: Be more forgiving to size inconsistencies
Instead of asserting if we hit negative content sizes,
warn and continue. This is easier to work with in this
transition period.
2015-12-15 08:41:16 -05:00
Matthias Clasen
a52c3a3db9 radiobutton: Port radio buttons to gadgets
This was already mostly done by inheritance from GtkCheckButton.
To complete it, stop using the draw_indicator vfunc for radio
buttons, and instead make the indicator gadget draw either a
check or radio.
2015-12-15 08:41:16 -05:00
Matthias Clasen
233179d374 check button: Convert to gadgets
Use a gadget for the button, and for the indicator.
A complication here is that GtkCheckButton (and
GtkRadioButton) have a totally different appearance
depending on the ::draw-indicator property. If an
indicator is not required, we just reuse the
GtkButton gadget.
This mostly works; some minor sizing issues left, e.g. cranking
up the indicator-size causes the checkbutton grid in testgtk
to overlap.
2015-12-15 08:41:16 -05:00
Matthias Clasen
37e9d92632 button: Convert to gadgets 2015-12-15 08:41:16 -05:00
Matthias Clasen
a81267c28e label: Convert to gadgets
This removes some hairy code handling with borders and padding,
which may or may not be correct. The examples in testheightforwidth
all continue to work, and min-width now works for labels.
2015-12-15 08:41:16 -05:00
Matthias Clasen
ff9f3c108f Adwaita: Update color swatch styling
The adjustments here are provisional and need an artistic eye.
2015-12-15 08:41:16 -05:00
Matthias Clasen
c376e82702 colorswatch: Convert to gadgets
Use gadgets for the widget and the overlay.
2015-12-15 08:41:16 -05:00
Matthias Clasen
fcca496734 widget: Deprecate some style properties
Deprecate the ::wide-separators and ::separator-width/height
style properties.
2015-12-15 08:41:16 -05:00
Matthias Clasen
20e1ff44e8 Adwaita: Update separator styling
Separators no longer draw a line with the foreground color,
but instead just draw background.
2015-12-15 08:41:16 -05:00
Matthias Clasen
17be791b0b separator: port to gadgets
As part of this, stop using custom rendering code for wide
and non-wide separators.
2015-12-15 08:41:16 -05:00
Matthias Clasen
9e278293ca spinner: Use a gadget
This gives us min-width/height support. Currently, the spinner
still has a hardcoded minimum size of 16 and doesn't grow beyond
32. We may want to revisit that at some point.
2015-12-15 08:41:16 -05:00
Matthias Clasen
fffa84b843 progressbar: Convert to gadgets
Use gadgets for the text, the trough and the progress.
2015-12-15 08:41:16 -05:00
Benjamin Otte
1f6efbf669 iconhelper: Queue resize on invalidation
When things change in the iconhelper, queue a resize on the owner widget
so that it automatically resizes.

Only do this for iconhelpers that are used as gadgets though, not for
temporary helpers - and to check this, check if the node is transient.
2015-12-15 08:41:16 -05:00
Benjamin Otte
3a77da9df2 entry: Turn icons into gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
4dee06e04f spinbutton: Port the buttons to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
4586503e93 iconhelper: Finish gadget conversion
Implement missing vfuncs
2015-12-15 08:41:16 -05:00
Benjamin Otte
e723fccaa9 rendericon: Restore cairo matrix after rendering 2015-12-15 08:41:16 -05:00
Benjamin Otte
b79a187d47 iconhelper: Handle invalidation
When CSS, direction or scale factor change, handle the invalidation
inside the iconhelper.
This way the widgets using them don't have to.
2015-12-15 08:41:16 -05:00
Benjamin Otte
de6dca4f81 iconhelper: Use the gadget's node
... instead of looking at the widget's style context.

This removes all calls to the style context.
2015-12-15 08:41:16 -05:00
Benjamin Otte
ad22612ab2 iconhelper: Require passing a cssnode to the constructor
Note that we don't use it yet.
2015-12-15 08:41:16 -05:00
Benjamin Otte
7075d00958 iconhelper: Use the gadget's owner property
Don't keep the owner widget ourselves.
2015-12-15 08:41:16 -05:00
Benjamin Otte
25ecd8cd37 iconhelper: Turn into gadget
This is just the basic conversion to inheriting from
GTK_TYPE_CSS_GADGET.
2015-12-15 08:41:16 -05:00
Matthias Clasen
c0fd106019 image: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
49fea0b0f5 box: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
7a05016d93 container: Split out a function
Computing the clip for all children is something I want to do in other
places.
2015-12-15 08:41:16 -05:00
Benjamin Otte
0f8233bd7b switch: Port to gadgets 2015-12-15 08:41:16 -05:00
Benjamin Otte
e09eb4fc9f gadget: Add GtkCssCustomGadget
The thing you use when you want to custom-do everything.
2015-12-15 08:41:16 -05:00
Benjamin Otte
6eafe00d8f gadget: Add the concept of a "gadget"
A gadget is halfway between a widget and a CSS node. It's supposed to
provide the minimum convenicence around CSS nodes until we've figured
out how to integrate them with widgets.
2015-12-15 08:41:16 -05:00
Benjamin Otte
0fb01decba css: Add min-width/height CSS properties 2015-12-15 08:41:16 -05:00
Benjamin Otte
a920f7260c treeview: Reposition dnd button css node properly
After the drag ends, the button node went to the wrong place and then
looked like a regular button. Fix that.
2015-12-15 08:41:16 -05:00
Chun-wei Fan
c049581f79 MSVC builds: Build more tools in gtk/
Build the gtk-update-icon-cache, gtk-builder-tool and gtk-query-settings
tools and run gtk-update-icon-cache as part of the post-build
"installation" process.

Pointed out (and reminded) by Paolo Borelli in bug 759436 that we should
build, "install" and run gtk-update-icon-cache in the MSVC builds as well.
2015-12-15 15:37:33 +08:00
Benjamin Otte
26d536a69b inspector: Fix quick-fix
Constructing GtkCssStyleChange objects without styles is forbidden, so
don't do it. Instead untangle the callback from the actual update
function and call that untangled function directly.
2015-12-15 01:15:51 +01:00
Benjamin Otte
f6606c4f6f cssnode: Clear cache if reusing style
When we reuse styles that didn't change across changes to the source
CSS, make sure we clear the caches. Otherwise child nodes will pick up
styles from the old source CSS.
2015-12-15 01:15:51 +01:00
Piotr Drąg
220d2620e4 Updated POTFILES.in 2015-12-15 00:51:33 +01:00
Carlos Garnacho
5d6a2ae54f win32: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:22 +01:00
Carlos Garnacho
af54b82c0a quartz: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:21 +01:00