Commit Graph

8 Commits

Author SHA1 Message Date
Benjamin Otte
a6845091f9 spinbutton: Make the entry gadget be the entry's gadget
This is a big and somewhat evil hack: We replace the entry's gadget's
node with the spinbutton's entry node.
2016-01-22 13:46:01 +01:00
Benjamin Otte
8020d5f93a notebook: Don't store gadget allocation twice
If we care about a gadget's allocation, we can ask it. There's no need
to store it in GtkNotebookPage.allocation.
2016-01-11 17:05:24 +01:00
Benjamin Otte
f1e277969a gadget: Add queue_resize/allocate/draw() functions 2016-01-11 17:05:23 +01:00
Benjamin Otte
8c1a73326c gadget: Add helpers for modifying state
They will be used in future commits.

I also was too lazy to convert existing widgets.
2016-01-11 17:05:22 +01:00
Benjamin Otte
acbff85402 gadget: Handle visibility
As GtkCssNode has the visibility concept, it makes sense to mirror it in
gadgets.

Do what visibility does in widgets: Hidden gadgets can't be drawn or
allocated and request a 0x0 size.

Note that just like widgets, gadget visibility must not be changed in
size request, allocate or draw handlers.

GtkWidget::child-visible has no equivalent yet, code will have to
emulate that manually.
2015-12-29 13:48:58 -08:00
Benjamin Otte
197e42efd8 label: Position the text properly
The PangoLayout needs to be positioned according to the content
allocation of the gadget, not the widget's allocation.
2015-12-16 20:39:51 +01:00
Matthias Clasen
b14dc6b5a4 gadget: Add api to get the border allocation
This can be useful for giving input windows the right size.
2015-12-15 21:58:45 -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