Commit Graph

45638 Commits

Author SHA1 Message Date
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
e2bc77b9af Adwaita: Remove nonsensical expander theming
No red backgrounds, please.
2015-12-15 08:41:16 -05:00
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
f0a2f9ef96 revealer: Add CSS node docs 2015-12-15 08:41:16 -05:00
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
ad349caa00 gadget: Add some documentation 2015-12-15 08:41:16 -05:00
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
f3561eaa9b grid: Convert to gadgets 2015-12-15 08:41:16 -05:00
e237c947c7 headerbar: Convert to gadgets 2015-12-15 08:41:16 -05:00
90109cfe4c actionbar: Convert to gadgets
This is a nice example of a trivial container conversion.
2015-12-15 08:41:16 -05:00
0f7dbc3bbd Adwaita: No padding for image buttons in popovers 2015-12-15 08:41:16 -05:00
736d864d18 modelbutton: Port to gadgets 2015-12-15 08:41:16 -05:00
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
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
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
37e9d92632 button: Convert to gadgets 2015-12-15 08:41:16 -05:00
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
ff9f3c108f Adwaita: Update color swatch styling
The adjustments here are provisional and need an artistic eye.
2015-12-15 08:41:16 -05:00
c376e82702 colorswatch: Convert to gadgets
Use gadgets for the widget and the overlay.
2015-12-15 08:41:16 -05:00
fcca496734 widget: Deprecate some style properties
Deprecate the ::wide-separators and ::separator-width/height
style properties.
2015-12-15 08:41:16 -05:00
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
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
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
fffa84b843 progressbar: Convert to gadgets
Use gadgets for the text, the trough and the progress.
2015-12-15 08:41:16 -05:00
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
3a77da9df2 entry: Turn icons into gadgets 2015-12-15 08:41:16 -05:00
4dee06e04f spinbutton: Port the buttons to gadgets 2015-12-15 08:41:16 -05:00
4586503e93 iconhelper: Finish gadget conversion
Implement missing vfuncs
2015-12-15 08:41:16 -05:00
e723fccaa9 rendericon: Restore cairo matrix after rendering 2015-12-15 08:41:16 -05:00
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
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
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
7075d00958 iconhelper: Use the gadget's owner property
Don't keep the owner widget ourselves.
2015-12-15 08:41:16 -05:00
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
c0fd106019 image: Port to gadgets 2015-12-15 08:41:16 -05:00
49fea0b0f5 box: Port to gadgets 2015-12-15 08:41:16 -05:00
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
0f8233bd7b switch: Port to gadgets 2015-12-15 08:41:16 -05:00
e09eb4fc9f gadget: Add GtkCssCustomGadget
The thing you use when you want to custom-do everything.
2015-12-15 08:41:16 -05:00
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
0fb01decba css: Add min-width/height CSS properties 2015-12-15 08:41:16 -05:00
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
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
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
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
220d2620e4 Updated POTFILES.in 2015-12-15 00:51:33 +01:00
5d6a2ae54f win32: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:22 +01:00
af54b82c0a quartz: Use GdkSeatDefault to implement GdkSeat 2015-12-15 00:40:21 +01:00
321154eb4b broadway: Use GdkSeatDefault to Implement GdkSeat 2015-12-15 00:40:21 +01:00
a33aefc281 wayland: Improve creation of windowing surface roles
We no longer need a grabbed seat, instead we'll just use the default
seat if this happens, not without first warning and recommending
gdk_seat_grab() for the operation.

https://bugzilla.gnome.org/show_bug.cgi?id=759309
2015-12-15 00:40:21 +01:00