Timm Bäder
9e0bf35941
paned: Fix up the docs once more
2020-05-13 09:42:51 +02:00
Matthias Clasen
b230ea2140
paned: Don't ignore the type attribute
...
We were meaning to only handle <child> here for
compatibility, not <child type="somethingelse">.
2020-05-12 16:27:25 -04:00
Matthias Clasen
a37dc29850
paned: Drop the Private struct
2020-05-12 16:25:58 -04:00
Emmanuele Bassi
58774eea72
docs: Add annotations for GtkPaned new getters
...
Which means also adding gtk-doc stanzas.
2020-05-12 18:52:45 +01:00
Matthias Clasen
2a24b8c653
Replace most remaining uses of container api
...
These are all on GtkBox or enumerating children.
2020-05-11 22:38:21 -04:00
Matthias Clasen
bc6643f3c2
paned: Redo the api
...
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.
Update all users.
See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
fc9873e9ef
paned: Drop some dead code
2020-05-11 22:21:14 -04:00
Matthias Clasen
edc31a264c
widget: Add a :focusable property
...
Add back a property that determines whether an individual
widget will accept focus or not. :can-focus prevents the
focus from ever entering the entire widget hierarchy
below a widget, and :focusable just determines if grabbing
the focus to the widget itself will succeed.
See #2686
2020-05-10 23:24:48 -04:00
Matthias Clasen
b55195fa2e
Move the idle sizer to GtkWindow
...
This was only living in gtkcontainer.c for historic
reasons. Move it closer to where it belongs, and
rename it from 'idle' to 'layout', since it is
really about the layout phase of the frame clock,
nowadays.
2020-04-20 16:30:45 -04:00
Matthias Clasen
d756c6e282
Move set_focus_child to GtkWidget
...
Move the set_focus_child vfunc from GtkContainer
to GtkWidget. This removes the last focus functionality
from GtkContainer.
Update the two users.
2020-04-20 16:30:43 -04:00
Matthias Clasen
edae2a8dc5
frame: Drop shadow-type
...
Frames that don't draw frames are not very useful,
so just drop the shadow-type property.
2020-04-17 10:57:36 -04:00
Matthias Clasen
46ff9f891a
gizmo: Allow passing changing focus behavior
...
We need this in popovers. Maybe it could be done better
by defining one-off custom widgets.
2020-04-09 17:50:29 -04:00
Benjamin Otte
6ff94f3637
paned: Port bindings to use shortcuts
2020-03-25 22:36:03 -04:00
Matthias Clasen
31db615885
Revert "Merge branch 'disable-window-test' into 'master'"
...
This reverts commit 3ac4c76b18
, reversing
changes made to 6ec96d2e98
.
2020-03-19 18:03:16 -04:00
Benjamin Otte
a70635f760
paned: Port bindings to use shortcuts
2020-03-18 23:00:50 -04:00
Matthias Clasen
31bf9da63a
Strip const from GdkEvent
...
Events are refcounted structs, and we generally don't
pass these as const.
2020-02-21 00:51:02 -05:00
Timm Bäder
655711fef2
Rename gtk_widget{get,set,has}_style_class to _css_class
...
We want to use css instead of style everywhere now.
2020-02-07 13:16:45 -05:00
Timm Bäder
b7ee2cbc28
Start using GtkWidget's new style class API
2020-02-07 13:16:32 -05:00
Benjamin Otte
546a748cd8
widget: Replace style-updated signal with css_changed vfunc
...
1. Rename the thing
2. Turn it from a signal to a vfunc
3. Pass the GtkCssStyleChange to it
We don't export any public API about the GtkCssStyleChange yet, it's
just a boring opaque struct.
2020-02-05 02:46:13 +01:00
Matthias Clasen
2ee04ee8ed
GtkPaned: Pay attention to style changes
...
Make GtkPaned redraw and resize when style change
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
112aed590f
Remove builtin icons altogether
...
This removes support for GtkCssImageBuiltin and
GtkCssImageBuiltinType from everywhere.
2020-01-10 14:34:56 -05:00
Matthias Clasen
7447abb52b
Stop using gtk_widget_get_toplevel
...
All uses of it can be replaced by gtk_widget_get_root.
2019-05-28 20:25:16 +00:00
Matthias Clasen
948347afa9
Stop using gtk_widget_is_toplevel
2019-05-28 20:25:16 +00:00
Matthias Clasen
18788c2a86
Remove gtk_widget_get/set_has_surface
...
These serve no purpose anymore - widgets don't
have surfaces, unless they're a GtkNative.
2019-05-28 20:25:15 +00:00
Matthias Clasen
749c9720ce
paned: Make final
2019-05-27 03:25:34 +00:00
Matthias Clasen
d9cf0ff684
paned: Drop the pick vfunc
...
Implement contains on the handle, instead of pick on the paned.
2019-04-07 16:03:27 +00:00
Matthias Clasen
5b78a3048f
gizmo: Add a contains_func
...
Let GtkGizmo override the contains() implementation.
Update all callers to pass NULL for the contains_func.
2019-04-07 15:47:24 +00:00
Matthias Clasen
a26f400576
paned: Stop using child properties
2019-04-05 12:01:43 +00:00
Carlos Garnacho
c9839b2069
paned: Set cursor on gizmo widget
...
We may avoid setting it on the paned widget depending on the pointer
position altogether, since the handle is now a widget. Also is more
likely to be correct as the implicitly grabbed widget will probably
be that one.
Fixes the paned losing the resize cursor after button press.
2019-04-03 13:26:40 +02:00
Matthias Clasen
26de69eaae
paned: Replace the child properties
...
Replace the resize and shrink child properties
by resize-child1/2 and shrink-child1/2 properties.
2019-03-27 21:48:12 -04:00
Benjamin Otte
8fb797866d
paned: hide the handle widget when <2 children are visible
2019-03-19 08:48:50 +01:00
Benjamin Otte
96a677e5ca
paned: Refactor
...
Don't call a useless function, call gtk_widget_set_child_visible()
directly.
2019-03-19 08:48:41 +01:00
Matthias Clasen
1196380f28
paned: Don't use a grab
...
It does not seem necessary for proper functioning
of the drag handle.
2019-03-17 18:55:00 -04:00
Matthias Clasen
2bf1561b48
Port widgets to the root focus API
2019-03-16 21:24:44 -04:00
Benjamin Otte
01f7f255b5
gtk: Check return value of compute_bounds()
...
Half of these calls will completely break if anybody ever uses CSS
transforms with them, but hey...
2019-02-20 05:26:31 +01:00
Timm Bäder
0739399766
paned: Implement increased handle area using pick()
...
Otherwise, we do report the widgets below the invisible handle area as
hovered or active.
2019-02-16 11:19:29 +01:00
Benjamin Otte
c07cd23aa9
paned: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Timm Bäder
131e8d8905
Remove some unnecessary gtkwindow.h includes
2019-02-05 08:11:43 -05:00
Timm Bäder
c49cc977fa
gizmo: return void from snapshot func
...
This boolean return was from the old gadget code and we weren't using it
in the new gizmo code.
2019-01-18 19:43:50 +01:00
Timm Bäder
ade171a2ed
widget: Don't pass a position to ->size_allocate
...
The values have been 0/0 for a long time now, so just drop the
GtkAllocation argument and replace it with width and height.
2018-11-13 16:28:54 +01:00
Timm Bäder
9fbcbc55d7
Revert "paned: Use a GtkIcon as separator"
...
This reverts commit 749ef4d71c
.
The GtkIcon and GtkGizmo measure code is different, the former uses
-gtk-icon-size.
2018-08-27 18:55:31 +02:00
Timm Bäder
749ef4d71c
paned: Use a GtkIcon as separator
...
And save a few lines that way.
2018-08-25 08:06:11 +02:00
Timm Bäder
2d6955285c
paned: Allocation x/y are always 0
...
The allocation position we get passed to size_allocate is always 0/0
these days.
2018-06-18 17:35:03 +02:00
Timm Bäder
10a0d6252e
paned: Remove handle_pos member
...
Query the handle bounds on demand instead.
2018-06-18 17:35:03 +02:00
Timm Bäder
f8ddc42638
paned: Chain up in snapshot
...
No need to snapshot all child widgets ourselves, the implementation in
GtkWidget can just do it for us.
2018-06-18 17:35:02 +02:00
Timm Bäder
e9a9bb069f
paned: Remove unnecessary local variable
...
We can just pass the given allocation on.
2018-06-18 17:35:02 +02:00
Timm Bäder
df79f02310
paned: Don't unnecessarily redraw handle in size_allocate
...
We size_allocate it after all, which will redraw it.
2018-06-18 17:35:02 +02:00
Timm Bäder
bd99ca2f04
paned: Store GParamSpecs
...
So we can use the more efficient g_object_notify_by_pspec everywhere.
2018-06-18 17:35:02 +02:00
Timm Bäder
da27627696
paned: Don't reorder css nodes based on text direction
2018-06-18 17:35:02 +02:00
Benjamin Otte
4f3058f195
eventcontrollermotion: Port to new API model
2018-04-26 17:59:42 +02:00