Timm Bäder
36ab70ddf5
widget: Add baseline and out_clip parameters to size-allocate
...
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.
This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
7012950f9f
modelbutton: Compute clip directly
2017-07-19 21:27:14 -04:00
Timm Bäder
495fba41db
modelbutton: Use GtkIcon as indicator
2017-07-19 21:27:13 -04:00
Timm Bäder
fc5c2f2030
modelbutton: Remove last gadget usages
...
And fix the clip calculation
2017-07-19 21:27:11 -04:00
Timm Bäder
1269585804
modelbutton: Stop using the button's gadget
2017-07-19 21:27:11 -04:00
Carlos Garnacho
5836beee78
gtkbutton: Handle crossing events without the event window
...
The event shall no longer be "directed" to the event window, but the
widget. Getting a enter/leave event is enough now to know whether the
pointer is inside or outside the widget.
2017-05-25 16:25:58 +02:00
Timm Bäder
91932ffbc7
button: Remove baseline_align value
...
It's unused.
2017-05-05 11:18:05 +02:00
Timm Bäder
56a58655fe
Remove unnecessary gtk_widget_show calls
2017-01-22 14:38:21 +01:00
Timm Bäder
f4341ee9f7
widget: Remove show-all property
...
Doesn't make sense anymore now that gtk_widget_show_all is gone.
2017-01-20 21:37:07 +01:00
Timm Bäder
47d4ad71fb
Remove gtk_container_snapshot_child
...
Replace it with the already existing gtk_widget_snapshot_child.
2017-01-07 17:19:30 +01:00
Benjamin Otte
0dbdf0c428
gadget: Remove gtk_css_gadget_draw()
...
And with it, remove the draw func from custom gadgets, that has been
NULL everywhere.
All gadgets are snapshot now.
2016-12-20 18:01:12 +01:00
Timm Bäder
36377e9964
Remove gtk_widget_get_preferred_height_and_baseline_for_width
...
It's just a wrapper around gtk_widget_measure nowadays.
2016-12-03 13:19:25 +01:00
Benjamin Otte
ab47479045
snapshot: Convert GtkButton and subclasses
2016-11-15 17:48:45 +01:00
Benjamin Otte
da207c9fdd
snapshot: Add a snapshot function to GtkCssCustomGadget
2016-11-15 17:48:45 +01:00
Timm Bäder
3b970f4555
button: Remove _get_event_window
2016-11-05 11:56:36 +01:00
Timm Bäder
90292b1aa3
modelbutton: Convert to indirect rendering
2016-10-28 16:33:03 +02:00
Timm Bäder
9992a616ef
widget: Use ::measure vfunc to measure size
...
Add a new ::measure vfunc similar to GtkCssGadget's that widget
implementations have to override instead of the old get_preferred_width,
get_preferred_height, get_preferred_width_for_height,
get_preferred_height_for_width and
get_preferred_height_and_baseline_for_width.
2016-10-22 19:05:47 +02:00
Timm Bäder
a985e62b25
Use gtk_popover_popdown/popup where appropriate
...
https://bugzilla.gnome.org/show_bug.cgi?id=769706
2016-08-16 11:49:26 -04:00
Benjamin Otte
a72c4576b2
cssimagebuiltin: Remove icons that don't draw anything anymore
2016-05-03 12:59:13 +02:00
Timm Bäder
c5369356e8
Various documentation fixes
...
Always have Since: annotations at the very bottom, use the correct
ClassName::signal-name/ClassName:property-name syntax, fix a few typos
in type names, wrong function names, non-existing type names, etc.
2016-02-08 22:56:52 +01:00
Timm Bäder
299b32438d
modelbutton: Use indicator state for button gadget if iconic
2016-01-27 16:34:22 +01:00
Matthias Clasen
ea4cff1ea4
Use convenience API that was introduced recently
...
Use gtk_css_gadget_set_state in all the places where we previously
were getting a node from a gadget, just to call gtk_css_node_set_state.
2016-01-13 00:19:31 -05:00
Timm Bäder
ff7e2797f6
modelbutton: Don't include margins in input window size
...
https://bugzilla.gnome.org/show_bug.cgi?id=760509
2016-01-12 21:56:49 +01:00
Timm Bäder
0b96b8a1ee
GtkModelButton: Remove some margins
...
Now that we can use margins from css for this, remove the margins we set
in code and use css instead.
2016-01-07 19:37:18 +01:00
Timm Bäder
2f61bc1866
GtkModelButton: Remove always-zero variable
2016-01-07 19:37:18 +01:00
Matthias Clasen
ea01921d09
modelbutton: Stop saving cairo state
...
GtkBuiltinIcon does this now on its own.
2015-12-20 01:04:59 -05:00
Matthias Clasen
f7236b261b
modelbutton: Fix state confusion
...
Checked buttons were getting the wrong image.
2015-12-19 21:56:05 -05:00
Matthias Clasen
7aeb57cdfd
modelbutton: Hide checks initially
...
Manually constructed model buttons were always ending up
with a check. Fix that by hiding the indictator node initially.
2015-12-19 20:16:51 -05:00
Matthias Clasen
bca4755228
modelbutton: Use a builtin icon for the arrow
...
No need to do this manually.
2015-12-19 14:53:57 -05:00
Matthias Clasen
86ecdc7a44
model button: Document iconic layout
...
Document how the CSS nodes look if iconic is TRUE. Add
a .model style class for this case and use it in Adwaita.
2015-12-16 11:37:49 -05:00
Matthias Clasen
2f544655f9
Revise CSS node documentation
...
Clarify the use of brackets in the CSS node diagrams:
[] means optional nodes or classes, <> means child widgets.
2015-12-16 10:58:47 -05:00
Matthias Clasen
fdb9625f4f
modelbutton: Remove debug spew
2015-12-15 13:14:49 -05:00
Matthias Clasen
736d864d18
modelbutton: Port to gadgets
2015-12-15 08:41:16 -05:00
Benjamin Otte
971a277419
cssnode: Change style-changed signal
...
Instead of having old and new style, now have a GtkCssStyleChange opaque
object that will compute the changes you are interested in for you.
This simplifies change signal handlers quite a bit and avoids lots of
repeated computation in every signal handler.
2015-12-12 02:16:04 +01:00
Benjamin Otte
3513e5e87b
Chain up in state_flags_changed
...
When introducing handlers for state_flags_changed in the node
transitions, chaining up was forgotten.
2015-12-02 04:36:31 +01:00
Matthias Clasen
09f7c8511b
model button: Add diagrams to the CSS node documentation
2015-11-03 12:51:52 -05:00
Matthias Clasen
19b34a44b2
model button: Complete the CSS node conversion
...
There was still style context saving in the draw function,
and the CSS node was not always properly updated and positioned.
Fix these things, and use the same CSS node for the arrow
drawing as well.
2015-11-03 12:20:53 -05:00
Matthias Clasen
e2e198aae4
model button: Propagate state
...
Propagate the state to the CSS node for the indicator.
2015-10-31 00:08:00 -04:00
Matthias Clasen
8894e46183
model button: Convert to CSS nodes
...
Follow the same approach as used for the toggle button family:
Keep the button element name for button-like rendering, and
use a distinct modelbutton name otherwise, and add a subnode
for the indicator with name check or radio.
2015-10-30 00:40:50 -04:00
Carlos Garnacho
33f9cbafcd
gtkmodelbutton: Plug a leak
...
The private struct had some data that needed freeing, but this widget
didn't have any destroy/dispose/finalize handlers.
2015-06-25 15:09:56 +02:00
Philip Withnall
3d88899072
gtk: Fix various tiny typos in documentation comments
...
e.g. Invalid syntax in introspection annotations, typos in object names,
accidentally using a gtk-doc comment for an internal function.
2015-02-18 11:38:37 +00:00
Matthias Clasen
d0d41dfeba
GtkModelButton: Add docs
2014-11-23 19:44:01 -05:00
Matthias Clasen
ff4f918a69
GtkModelButton: specify the proper default values
...
Caught by the defaultvalue test: ::text starts out as "", and
::iconic should be FALSE by default.
2014-11-23 18:30:13 -05:00
Matthias Clasen
45cfb405c0
GtkModelButton: Don't show both text and icon
...
The intention was that ::iconic indicates which representation is
preferred (text or icon). We fall back to the other representation
if one is missing.
2014-11-19 21:14:30 -05:00
Matthias Clasen
f229f96d69
GtkModelButton: protect against show_all
...
We don't want the labels to be shown when there's already
an icon.
2014-11-06 15:03:51 -05:00
Matthias Clasen
6e001acbf9
Add documentation
...
Document GtkModelButton and GtkPopoverMenu.
2014-10-29 06:49:59 -04:00
Matthias Clasen
689363a782
GtkModelButton: Don't require an explicit role
...
When we have an action-name, we can deduce the role from the
action that is looked up by the action helper.
2014-10-29 06:49:59 -04:00
Matthias Clasen
14e394d3d7
GtkModelButton: Rename action-role to role
...
Rename action-role to role, and make all properties readable.
2014-10-29 06:49:59 -04:00
Matthias Clasen
e776c665b0
GtkModelButton: Drop unused :accel property
2014-10-29 06:49:59 -04:00
Matthias Clasen
ef22be9bb7
Drop GtkModelButton:has-submenu
...
Replace the has-submenu property with checking menu-name != NULL.
2014-10-29 06:49:59 -04:00