Matthias Clasen
c4514e7eb4
window: Remove some dead code
...
We are not attaching windows anymore.
2020-05-09 19:27:56 -04:00
Matthias Clasen
61d39a09a5
Merge branch 'gbsneto/css-dequeue-fix' into 'master'
...
csswidgetnode: Don't check for container
See merge request GNOME/gtk!1861
2020-05-08 14:55:46 +00:00
Georges Basile Stavracas Neto
2cc6c4d2d1
csswidgetnode: Don't check for container
...
The conditions to queue and dequeue a CSS validation
are different; while queueing checks if the widget is
a root, dequeueing checks that AND if the widget is
a container.
GtkWindow is not a GtkContainer anymore, and that is
causing validations to be queued, but never dequeued.
Don't require the widget to be a GtkContainer for
dequeuing.
2020-05-08 10:57:41 -03:00
Matthias Clasen
6efdaa9ffd
placeview: Hide the protocols grid when its empty
...
Seeing just the bold headings at the bottom of the
popover is confusing, so just hide the entire grid
in this case.
2020-05-08 09:20:02 -04:00
Matthias Clasen
d06cdf6318
droptarget: Fix confusion around ::leave signal
...
The leave signal should not take any arguments,
don't pass the GdkDrop. Update the documentation,
fix the emission and update users to match.
This was showing up as crash when dragging files
over the places sidebar.
2020-05-08 08:50:44 -04:00
Alexander Mikhaylenko
f4538839d4
window: Stop handling dragging and titlebar actions
...
Since GtkWindowHandle and GtkHeaderBar do it now, it can be removed from
GtkWindow, along with GTK_WINDOW_REGION_TITLE which at this point doesn't
differ from GTK_WINDOW_REGION_CONTENT.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2689 , since
GtkWindowHandle doesn't do that anymore.
2020-05-08 00:02:08 +05:00
Alexander Mikhaylenko
8ca1e0ddc3
headerbar: Include GtkWindowHandle
...
This allows it to continue being draggable when placed inside a window, and
will allow to remove the corresponding gestures from GtkWindow.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
4135276252
headerbar: Use GtkCenterBox internally
...
This will allow to easily wrap it into another widget in the next commits.
2020-05-07 23:58:16 +05:00
Alexander Mikhaylenko
8bd44cb3eb
Add GtkWindowHandle
...
This will allow to move the titlebar handling logic out from GtkWindow.
2020-05-07 23:57:58 +05:00
Alexander Mikhaylenko
6c636642df
widget: Pass parent to gtk_widget_consumes_motion()
...
Right now it assumes that the parent is a GtkWindow. This will break when
window dragging is handled by another widget.
2020-05-07 09:44:15 +05:00
Matthias Clasen
57d3719583
Fix an inspector crash
...
Fix the listmodel semantics of the controller model,
by making get_item return a reference.
This was broken in 4b9e5304cc
.
2020-05-06 22:25:51 -04:00
Matthias Clasen
236fc57329
modelbutton: Unify activation code paths
...
Opening submenus by Enter or Space wasn't working,
because we had different code paths for activation
via keynav and via click. Unify them.
2020-05-06 20:27:04 -04:00
Emmanuele Bassi
56d3a79990
Annotate gtk_text_child_anchor_get_widgets() correctly
...
We switched from returning a list to returning a C array, which means we
need to update the introspection annotation and the documentation to
match the implementation.
2020-05-06 23:09:53 +01:00
Georges Basile Stavracas Neto
962de8f1ee
Merge branch 'gbsneto/array-clear-func' into 'master'
...
icontheme: Don't free array element
Closes #2717
See merge request GNOME/gtk!1851
2020-05-06 22:02:17 +00:00
Matthias Clasen
2415c02bbd
Merge branch 'wip/exalm/polish' into 'master'
...
Random polish
See merge request GNOME/gtk!1850
2020-05-06 21:47:47 +00:00
Georges Basile Stavracas Neto
6fc706f983
icontheme: Don't free array element
...
When setting a clear function on a GArray, unlike
most other places, this free func is expected to
*not* free the array element itself -- only its
contents.
Don't free the array element.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2717
2020-05-06 18:14:36 -03:00
Alexander Mikhaylenko
059cc3b818
video: Use more appropriate revealer transition
2020-05-07 01:21:26 +05:00
Matthias Clasen
68011e99ac
Merge branch 'gbsneto/fix-text-child-header' into 'master'
...
textchild: Include <gtk/gtkwidget.h>
See merge request GNOME/gtk!1846
2020-05-06 20:13:22 +00:00
Matthias Clasen
d2b508d95c
Merge branch 'master.struct.msvc' into 'master'
...
gtk/gtkaccelgroup.c: Fix build on Visual Studio
See merge request GNOME/gtk!1785
2020-05-06 20:02:27 +00:00
Matthias Clasen
433295127c
Merge branch 'wip/exalm/row' into 'master'
...
placesview: Stop using gtk_container_add() for GtkListBoxRow
See merge request GNOME/gtk!1849
2020-05-06 20:01:45 +00:00
Alexander Mikhaylenko
24e3556c30
adwaita: Remove a redundant -gtk-icon-shadow: none
...
Buttons have no icon shadows anymore anyway.
2020-05-07 01:01:12 +05:00
Alexander Mikhaylenko
c17aa12235
adwaita: Don't style window menu button anymore
...
Those were removed with the introduction of GtkWindowControls, no need to
exclude them from the round style anymore.
2020-05-07 00:59:44 +05:00
Alexander Mikhaylenko
40c8d8ba9f
adwaita: Use tabular figures where appropriate
...
Port 82b9be3297
from GTK3.
2020-05-07 00:37:55 +05:00
Matthias Clasen
92fc2156ff
Merge branch 'drop-click-gesture-area' into 'master'
...
gestureclick: Drop the area
See merge request GNOME/gtk!1847
2020-05-06 19:25:32 +00:00
Jakub Steiner
5815604853
Merge branch 'wip/jimmac/HC-focus' into 'master'
...
HC: more contrasty focus rings
See merge request GNOME/gtk!1845
2020-05-06 19:22:27 +00:00
Alexander Mikhaylenko
f47aba05b0
adwaita: Make popover border transparent
...
Port 379669b153
from GTK3.
2020-05-07 00:19:27 +05:00
Matthias Clasen
8239186c26
Merge branch 'abolish-size-allocate' into 'master'
...
Abolish size allocate
Closes #2705
See merge request GNOME/gtk!1833
2020-05-06 19:15:31 +00:00
Alexander Mikhaylenko
3a5fdfcfda
adwaita: Update app icon shadow
...
Port f95f3c707a
from GTK3.
2020-05-07 00:15:19 +05:00
Alexander Mikhaylenko
8007891132
placesview: Stop using gtk_container_add() for GtkListBoxRow
2020-05-07 00:08:46 +05:00
Matthias Clasen
8efebbaf46
Merge branch 'wip/jimmac/dark-seuggested' into 'master'
...
Adwaita: tone down suggested focus ring for dark
See merge request GNOME/gtk!1843
2020-05-06 18:32:09 +00:00
Matthias Clasen
56e590bd31
widget: Drop the ::size-allocate signal
...
This signal is mainly used for bad things, and we
don't want to emit signals during layout if we can
avoid it.
If you are subclassing, you should either use a
layout manager or override the size_allocate vfunc.
If you are using a GtkDrawingArea or GtkGLArea,
use their ::resize signals to learn about size
changes.
Fixes : #2705
2020-05-06 14:27:45 -04:00
Matthias Clasen
64b673853b
tooltipwindow: Stop using the ::size-allocate signal
...
Instead of connecting to ::size-allocate, call
gtk_native_set_tooltip and rely on the native
to allocate the tooltip window.
2020-05-06 14:27:45 -04:00
Matthias Clasen
3872da535f
tooltipwindow: Drop some dead code
2020-05-06 14:27:45 -04:00
Matthias Clasen
1f0024a7f0
tooltip: Add private api to allocate the window
...
Add private gtk_tooltip_maybe_allocate() function
and use it from GtkWindow and GtkPopover.
This will let us stop using the ::size-allocate signal,
without having to redo all the tooltip management first.
That will happen later.
2020-05-06 14:27:45 -04:00
Emmanuele Bassi
cb94c7d69e
Explicitly update widget a11y bounds when allocating
...
The a11y machinery is using signal subscription to get notified of size
changes and notify listeners in turn. This is suboptimal for a couple of
reasons:
- if something connects to the GtkWidget::size-allocate signal we need
to emit it; currently, we have an optimization in place that will
skip the signal emission if there are no handlers, and it would be
nice to go through the fast path
- the accessibility implementation is part of GTK, and should not go
through additional hoops like any out-of-tree API consumer
2020-05-06 14:27:45 -04:00
Matthias Clasen
92bcf4c7a7
inspector: Stop using ::size-allocate
...
This signal is going away. Currently, there is no
other way for the inspector to monitor the allocation.
2020-05-06 14:27:45 -04:00
Matthias Clasen
e4894a69d4
drawingarea: Add a ::resize signal
...
This can be used as a replacement for ::size-allocate
to prepare size-dependent resources, like a backing
surface. It mirrors the GtkGLArea::resize signal.
2020-05-06 14:27:45 -04:00
Matthias Clasen
0aec11f292
a11y: Avoid a gratitious use of ::size-allocate
...
The paned widget has a position property, just
use it.
2020-05-06 14:27:45 -04:00
Matthias Clasen
7280618c7d
cellarea: Cosmetics
...
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
6c8f5f9d17
treeview: Cosmetic change
...
Remove an occurrence of size-allocate in a comment.
2020-05-06 14:27:45 -04:00
Matthias Clasen
91d261a0b3
window: Remove some outdated info from the docs
...
Remove references to ::size-allocate and ::configure-event
from the docs.
2020-05-06 14:27:45 -04:00
Matthias Clasen
8ad49b33ed
gestureclick: Drop the area
...
This is a rarely used api, and our general trend has been
to use widgets whenever we need an area singled out.
2020-05-06 14:19:50 -04:00
Georges Basile Stavracas Neto
79d6190684
textchild: Include <gtk/gtkwidget.h>
...
This header is exported, so it needs to include
the gtkwidget.h header with the gtk/ prefix.
This was broken in 289b157e32
2020-05-06 15:13:03 -03:00
Jakub Steiner
edc57e4282
HC: more contrasty focus rings
2020-05-06 19:28:05 +02:00
Jakub Steiner
3fa691a1ab
Adwaita: tone down suggested focus ring for dark
2020-05-06 19:14:19 +02:00
Jakub Steiner
053617a283
Merge branch 'wip/exalm/focus-entries2' into 'master'
...
Adwaita: Make error/warning entry focus more subtle
See merge request GNOME/gtk!1842
2020-05-06 16:53:14 +00:00
Alexander Mikhaylenko
40926a28ee
Adwaita: Make error/warning entry focus more subtle
...
Add 50% alpha to it like to the main focus color.
2020-05-06 20:23:26 +05:00
Jakub Steiner
e2058aaecd
Merge branch 'wip/jimmac/suggested-destructive-focus' into 'master'
...
Adwaita: suggested destrictive button focus
Closes #2704
See merge request GNOME/gtk!1841
2020-05-06 15:23:01 +00:00
Jakub Steiner
efd009e6d8
Adwaita: suggested destrictive button focus
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2704
2020-05-06 16:12:57 +02:00
Jakub Steiner
b32519966f
Merge branch 'wip/jimmac/global-var' into 'master'
...
Adwaita: make parser happy wrt global variables
Closes #2703
See merge request GNOME/gtk!1840
2020-05-06 13:29:29 +00:00
Matthias Clasen
8bb133072d
Merge branch 'fix-inspector-popover' into 'master'
...
inspector: Fix css tree popovers
See merge request GNOME/gtk!1838
2020-05-06 12:55:18 +00:00
Jakub Steiner
926764be0d
Adwaita: make parser happy wrt global variables
...
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2703
2020-05-06 14:12:44 +02:00
Matthias Clasen
b96509c030
Merge branch 'wip/baedert/for-master' into 'master'
...
Wip/baedert/for master
See merge request GNOME/gtk!1828
2020-05-06 03:55:55 +00:00
Matthias Clasen
81c68b86ea
inspector: Fix css tree popovers
...
Adding popovers to a treeview doesn't work. Instead,
attach them to the cssnodetree widget, which is using
a layout manager - popovers work in that case.
2020-05-05 23:51:37 -04:00
Matthias Clasen
a4cfbec5c2
widget: Drop the destroy vfunc
...
We still emit the ::destroy signal, but if you
want a vfunc, use dispose.
2020-05-05 18:25:29 -04:00
Matthias Clasen
1086acce92
container: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:29 -04:00
Matthias Clasen
d03b1524e6
placesview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:25:28 -04:00
Matthias Clasen
82f4b1630c
printunixdialog: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
77d15b1751
window: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
401f8a7f31
treeview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
3d4bb76694
textview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
327da3de9a
statusbar: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d46252ca21
notebook: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
d2cbc454f6
iconview: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
49fcf41693
shortcutssection: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8baefaf4d8
radiobutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c60ffeedfa
range: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
c8066bcd8b
spinbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
9f4cea190a
viewport: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
7639d3daa0
text: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:54 -04:00
Matthias Clasen
8683925fe0
modelbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
4c7cafdba8
label: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
03f145e868
filechooserbutton: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
1b44a64ef7
expander: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
37e381e95d
combobox: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
e0f95844c1
actionbar: Use dispose instead of destroy
...
The destroy vfunc is going away.
2020-05-05 18:23:53 -04:00
Matthias Clasen
539f06147a
Merge branch 'misc-cleanups' into 'master'
...
Misc cleanups
See merge request GNOME/gtk!1832
2020-05-05 21:02:25 +00:00
Matthias Clasen
d2b55dff2d
Merge branch 'wip/exalm/controls-dispose' into 'master'
...
windowcontrols: Unparent children in dispose rather than finalize
See merge request GNOME/gtk!1831
2020-05-05 18:19:00 +00:00
Matthias Clasen
e33da18577
window: Lower the visible focus timeout
...
Five seconds felt too long for some people in
initial feedback, so lets lower the timeout to
3 seconds.
2020-05-05 10:45:47 -04:00
Matthias Clasen
cda1a25a5a
assistant: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
a9103ccd7c
placesview: Drop the Private struct
2020-05-05 10:45:47 -04:00
Matthias Clasen
8effa10e79
searchbar: Drop the Private struct
2020-05-05 10:45:47 -04:00
Alexander Mikhaylenko
7906f09c75
windowcontrols: Unparent children in dispose rather than finalize
2020-05-05 19:43:55 +05:00
Jakub Steiner
4cdb9ed322
Merge branch 'wip/jimmac/notebook-tab-focus' into 'master'
...
Adwaita: notebook tab focus ring
See merge request GNOME/gtk!1830
2020-05-05 13:42:25 +00:00
Matthias Clasen
b74a3de299
Merge branch 'bin-removal' into 'master'
...
Bin removal
See merge request GNOME/gtk!1820
2020-05-05 12:55:50 +00:00
Jakub Steiner
774d61c682
Adwaita: notebook tab focus ring
...
- prelight the tab, not a label (visually)
2020-05-05 13:57:33 +02:00
Jakub Steiner
d827fe711d
Adwaita: old style toolbar buttons
...
- style toolbar buttons
2020-05-05 10:55:14 +02:00
Timm Bäder
d328374c94
shortcutcontroller: Check for NULL GtkNative of widget
...
And just continue in that case.
2020-05-05 08:20:10 +02:00
Timm Bäder
7f009b9952
label: Be more defensive against non-existant focus_link
2020-05-05 08:20:10 +02:00
Timm Bäder
0e73bfa202
shortcutmanager: Speed up default_remove_controller a bit
...
Only call get_n_items on the model once and remove two unnecessary
casts.
2020-05-05 08:20:10 +02:00
Timm Bäder
fb9b54d4b2
shortcutcontroller: Use a GArray instead of a linked list
2020-05-05 08:20:10 +02:00
Timm Bäder
cdb4d71125
cssprovider: Pass a GtkArray around when matching
...
We just use the resulting GPtrArray to set the values on a GtkCssLookup
and it had mostly a size of 1, in extremes a size of 11.
2020-05-05 08:20:10 +02:00
Timm Bäder
4996097219
cssselector: Use a GtkArray to count exact matches
...
The list here is at most 3 elements long in my tests.
2020-05-05 08:20:10 +02:00
Timm Bäder
0c4dcd9d57
add GtkArray
...
Try to use stack space if we can and only fall back to the GPtrArray if
we must.
2020-05-05 08:20:10 +02:00
Timm Bäder
aaecb3d84b
main: Save some type checks
...
We already have the typecheck-less versions of get_realized(),
get_parent() and is_sensitive() in gtkwidgetprivate.h, so use them here.
2020-05-05 08:20:10 +02:00
Timm Bäder
771b3ea6f3
eventcontroller: Remove some unnecessary casts
...
Instead of comparing two GtkWidget*s by casting the two GtkNative*s, we
can as well compare two GtkNative*s. Also if gtk_widget_get_native()
returns NULL, the code previously failed.
2020-05-05 08:20:10 +02:00
Timm Bäder
75e202f02b
widget: Use an unchecked cast in _get_native()
...
This is either no chagne because we know for a fact that the returned
value is a GtkNative - after all thats's the type we pass to
gtk_widget_get_ancestor().
Or it is a bug fix since casting NULL to a GtkNative using GTK_NATIVE()
is not going to work, but the API contract of gtk_widget_get_native()
explicitly allows a NULL return value.
2020-05-05 08:20:10 +02:00
Timm Bäder
94d3fd84b5
window: Remove unused private function
2020-05-05 08:20:10 +02:00
Timm Bäder
a40abcf74d
scalebutton: Shorten finalize() implementation
2020-05-05 08:20:09 +02:00
Timm Bäder
9f90eb41c8
scalebutton: Remove unused click_id member
2020-05-05 08:20:09 +02:00
Timm Bäder
4b9e5304cc
widget: Save controllers list in a GPtrArray
2020-05-05 08:20:09 +02:00
Timm Bäder
ef623aaabc
widget: Only do a IS_ROOT type check if the parent is unset
...
So we do less type checks
2020-05-05 08:20:09 +02:00
Timm Bäder
de40b0b061
placesview: Remove frame
...
We don't need a double border here.
2020-05-05 08:20:09 +02:00
Timm Bäder
356dea3349
cssselector: Avoid some GList allocations
2020-05-05 08:20:09 +02:00
Timm Bäder
63bbc79f48
icontheme: Save dir_mtimes in a GArray, not a GList
2020-05-05 08:20:09 +02:00
Timm Bäder
d80c130d7f
GdkEvent: Save history in a GArray
...
Instead of a less efficient GList.
2020-05-05 08:20:09 +02:00
Timm Bäder
14b27446a3
stylecontext: Remove _list_classes() from public API
...
Applications can use gtk_widget_get_css_classes these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
289b157e32
textchild: Return an array from get_widgets
...
Yay, one GList less.
2020-05-05 08:20:09 +02:00
Timm Bäder
61195df7a3
widget: Use early-out style in gtk_widget_realize()
...
This is much more common in the current code base and reduces the
indentation level by one.
2020-05-05 08:20:09 +02:00
Timm Bäder
ce07c0559d
shorthandproperty: Use alloca() when parsing properties
2020-05-05 08:20:09 +02:00
Timm Bäder
f4edbdfc1f
shorthandproperty: Return unset/initial/inherit as-is
...
We don't even need an array value these days.
2020-05-05 08:20:09 +02:00
Timm Bäder
526187d36c
shorthandproperty: Use alloc a for data array
2020-05-05 08:20:09 +02:00
Timm Bäder
96673d5106
popover: Remove an unused gtk_widget_get_allocation() call
2020-05-05 08:20:09 +02:00
Timm Bäder
88f5d4547c
label: Remove a debug leftover
2020-05-05 08:20:09 +02:00
Timm Bäder
34976a791c
gskpango: Make get_color a bit shorter
...
Don't copy from crenderer->fg_color just to override from the local
color again.
2020-05-05 08:20:09 +02:00
Timm Bäder
ad73afcd79
label: Unref style_attrs list
2020-05-05 08:20:09 +02:00
Matthias Clasen
3c165b3b77
Drop GtkBin
...
It is no longer used anywhere.
2020-05-04 22:53:08 -04:00
Matthias Clasen
8d0773fad0
inspector: Derive recorder from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
dec5707ca9
builder-tool: Convert former bin children
...
Convert from <child> elements to <property name="child">
for former GtkBin subclasses. Update test results
to match.
2020-05-04 22:53:08 -04:00
Matthias Clasen
0ec5a3f0d9
tooltipwindow: Derive from GtkWidget
2020-05-04 22:53:08 -04:00
Matthias Clasen
aae25c4fa0
combobox: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
ec394e805b
Use gtk_combo_box_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
5d26af06e4
combobox: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
b96d7b62d1
Add gtk_overlay_remove_overlay
...
Now that GtkOverlay is not a container anymore,
gtk_container_remove can't be used for this anymore,
so add a separate api.
2020-05-04 22:53:08 -04:00
Matthias Clasen
edd5d36159
overlay: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
77af8e303d
Use gtk_overlay_set_child throughout
...
Replace all uses of gtk_container_add on overlays
by gtk_overlay_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
53f9737dcf
overlay: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
3a9883b3ca
searchbar: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for search bars.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
99ef14b59f
Use gtk_search_bar_set_child throughout
2020-05-04 22:53:08 -04:00
Matthias Clasen
e2abe6dd29
searchbar: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
12ecbd1508
listboxrow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
b8d1a9eb0d
flowboxchild: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
41322e2a7a
revealer: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
649ae635a7
Use gtk_revealer_set_child throughout
...
Replace all uses of gtk_container_add on revealers
with gtk_revealer_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
686be577d5
revealer: Add a child property
2020-05-04 22:53:08 -04:00
Matthias Clasen
9a65ed9ada
window: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
Update the accessible implementation to match, remove
remnants of container implementations in GtkWindow
subclasses, and fix livecycle issues around destroy
vs dispose in GtkAssistant.
After this commit, using gtk_container_add on window
subclasses is not allowed anymore, but adding childing
with <child> in ui files still works.
See #2681
2020-05-04 22:53:08 -04:00
Matthias Clasen
f59f355190
Use gtk_window_set_child throughout
...
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
b9b1bf85e1
window: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
4aa5fba0b5
button: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for buttons.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
183431c918
checkbutton: Modernize
...
Stop implementing GtkContainer, and just use a box layout
instead of doing our own thing manually.
2020-05-04 22:53:07 -04:00
Matthias Clasen
af6e0ee2b3
Use gtk_button_set_child throughout
...
Replace all uses of gtk_container_add on buttons
by gtk_button_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
04e4a02cd0
button: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
9d7b77f874
scrolledwindow: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 22:53:07 -04:00
Matthias Clasen
67759d4c3e
Use gtk_scrolled_window_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
54b613392b
scrolledwindow: Add a child property
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee1f8d8d06
popover: Derive from GtkWidget
2020-05-04 22:53:07 -04:00
Matthias Clasen
8e261056b9
Use gtk_popover_set_child throughout
...
Replace all uses of gtk_container_add on popovers
by gtk_popover_set_child.
2020-05-04 22:53:07 -04:00
Matthias Clasen
ee284a560a
popover: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
e098ffb88d
viewport: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable in order to keep
the <child> element working for viewports in ui files.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
e9ddf0fda5
Use gtk_viewport_set_child throughout
...
Replace all uses of gtk_container_add on viewports
by gtk_viewport_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
937c94bab5
viewport: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
5b06b08a0e
aspectframe: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
We have to implement GtkBuildable, in order to keep
the <child> element in ui files working for aspect
frames.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
e137152520
aspectframe: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
25826eafe3
frame: Derive from GtkWidget
...
We want to remove GtkBin and GtkContainer as they don't
provide much useful functionality anymore. This requires
us to move get_request_mode and compute_expand down.
See #2681
2020-05-04 17:01:18 -04:00
Matthias Clasen
1706b80815
Use gtk_frame_set_child throughout
...
Replace all uses of gtk_container_add for
frames with gtk_frame_set_child.
2020-05-04 17:01:18 -04:00
Matthias Clasen
7f975472a7
frame: Add a child property
2020-05-04 17:01:18 -04:00
Matthias Clasen
8c1072fad1
Merge branch 'wip/jimmac/notebook-focus' into 'master'
...
Adwaita: notebook tab focus
See merge request GNOME/gtk!1825
2020-05-04 20:10:46 +00:00
Matthias Clasen
188a61f02d
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1826
2020-05-04 19:02:40 +00:00
Jakub Steiner
9dfac6fe3f
Adwaita: colorswatch focus rings
...
- there used to be different outline color for light and dark buttons,
but it's complexity I can live without. blue focus rings fit all.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/2695
2020-05-04 18:16:08 +02:00
Jakub Steiner
a3f042b5b4
Adwaita: notebook tab focus
...
- just like entries tabs need to be handled with focus-within
2020-05-04 17:54:12 +02:00
Matthias Clasen
53d86d411a
Adwaita: Style .toolbar
...
We don't have GtkToolbar anymore, so we are more likely
to meet a .toolbar style class, than a toolbar element.
2020-05-04 10:51:11 -04:00
Alexander Mikhaylenko
d2b5beffbf
Adwaita: Convert entries to the new focus rings
2020-05-04 19:24:24 +05:00
Matthias Clasen
837b141747
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1823
2020-05-04 12:31:25 +00:00
Matthias Clasen
130ae89e54
frame: Fix xalign handling
...
SEtting a nonzero xalign on frames had no
effect, since we were always using the full
allocation with here, instead of what the label
needs. Found by using testframe for a second.
2020-05-04 07:37:31 -04:00
Matthias Clasen
77cf6cd406
frame: Don't queue a resize if xalign changes
...
We only need to allocate children in this case.
While we touch it, rewrite the setter to modern
style.
2020-05-04 07:37:25 -04:00
Jakub Steiner
8127d70b8a
Adwaita: make transition offset more subtle
...
- be less like wobbly windows
2020-05-04 11:29:19 +02:00
Jakub Steiner
ab0ad4a0d7
Merge branch 'wip/jimmac/emphasize-focus-change' into 'master'
...
Adwaita: bring more attention to focus change
See merge request GNOME/gtk!1803
2020-05-04 08:49:40 +00:00
Matthias Clasen
b4d5ddcae5
Merge branch 'filechooser-translation' into 'master'
...
filechooser: Translate type column
Closes #2690
See merge request GNOME/gtk!1816
2020-05-03 01:10:24 +00:00
Matthias Clasen
817112ab3c
filechooser: Translate type column
...
When the code for this was copied from nautilus,
we forgot to adapt it for running in a library
instead of an application - gettext() doesn't work
in a library.
Fixes : #2690
2020-05-02 19:57:38 -04:00
Alexander Mikhaylenko
80867acf94
appchooserdialog: Don't show subtitle label when subtitle is null
...
Looks like 67822d0c9a
and
3f1bd3722d
collided, and subtitle can be null
now. Add a check so that we don't end up with empty label in that case.
2020-05-02 23:35:44 +05:00
Matthias Clasen
fd1fe0eed5
Merge branch 'matthiasc/for-master' into 'master'
...
docs: Add more detail to the drawing overview
See merge request GNOME/gtk!1811
2020-05-01 21:09:38 +00:00
Benjamin Otte
fa90747815
Merge branch 'wip/exalm/headerbar-title' into 'master'
...
Headerbar title/subtitle cleanups
See merge request GNOME/gtk!1807
2020-05-01 19:39:27 +00:00
Matthias Clasen
8653a5e27b
dragicon: Derive from GtkWidget
...
This wasn't meant to derive from GtkContainer.
2020-05-01 14:24:21 -04:00
Alexander Mikhaylenko
ab59562170
headerbar: Document GtkBuilder child types, add a title example
2020-05-01 21:39:32 +05:00
Florian Müllner
3f1bd3722d
appchooserdialog: Don't show broken subtitles
...
Commit 07beb6dba2
made GtkAppChooserWidget useful with no content-type,
however when used in a GtkAppChooserDialog, this will lead to a confusing
"Opening (null) files" subtitle.
Fix this by omitting the subtitle altogether in that case.
2020-05-01 18:21:53 +02:00
Alexander Mikhaylenko
6b4bed2c7a
builder-tool: Rename GtkHeaderBar:custom-title to title-widget
...
Add a test.
2020-05-01 20:11:19 +05:00
Alexander Mikhaylenko
739f681076
headerbar: Rename custom-title to title-widget
...
Now that all the other title-related properties are gone, custom title can
have a more mundane name.
2020-05-01 20:11:19 +05:00
Alexander Mikhaylenko
c2e4e1af73
headerbar: Remove user-settable title
...
Use window title, or custom title widget if it's set. Remove 'title'
property.
Update demos and tests to set the title on the window instead of
headerbar.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
35d50f88c8
headerbar: Remove subtitle
...
Also remove the box containing title and subtitle, as there's only one
label now.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
fa0509c473
filechooserdialog: Create title and subtitle manually
...
title and subtitle properties will go away in the following commits, stop
using them.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
67822d0c9a
appchooserdialog: Create title and subtitle manually
...
title and subtitle properties will go away in the following commits, stop
using them.
2020-05-01 19:48:05 +05:00
Alexander Mikhaylenko
43a453e465
headerbar: Remove has-subtitle property
...
Subtitle will go too in the next commit, but has-subtitle goes first as
it's broken right now anyway.
2020-05-01 19:48:05 +05:00
Matthias Clasen
cb056a1e8f
stack: Add a :use-underline property
...
Add GtkStackPage:use-underline, and use it when
constructing labels in the stack switcher.
2020-04-30 19:17:34 -04:00
Jakub Steiner
8165616b3c
Adwaita: bring more attention to focus change
...
- as discussed in https://gitlab.gnome.org/GNOME/gtk/-/issues/2644 it's desirable to bring attention to what's focused. Instead of pressing `alt` just simply changing focus with `tab` can have a similar effect
Extends https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1802
2020-05-01 00:14:44 +02:00
nana-4
2fa876e839
Adwaita: Use a mixin for visible focus rings
...
The focus-ring() mixin allows we to flexibly style the focus ring for
each widget. By using this, we can get rid of the "Outlines" section,
which is out of place in the _common.scss file.
This commit also has the following changes:
- Transition the focus rings on most widgets.
- Add a missing focus ring to iconview.
- Move the expander-widget focus ring to its title.
- Move the notebook focus ring to its checked tab.
Closes https://gitlab.gnome.org/GNOME/gtk/-/issues/2653
2020-05-01 02:03:23 +09:00
Matthias Clasen
3bbcaa9e8f
docs: Move menu model docs
...
It makes more sense to document the menu model XML
format in the GtkPopoverMenu docs than in
GtkApplicationWindow.
2020-04-29 20:30:40 -04:00
Chun-wei Fan
d0a8d263ac
gtk/gtkaccelgroup.c: Fix build on Visual Studio
...
Visual Studio does not allow one to initialize structure members with
non-constant expressions, caused by using strlen(s), so fix this by
using sizeof(s) - 1 instead.
2020-04-29 15:02:03 +08:00
Matthias Clasen
91d8c230f3
popover: Fix repositioning logic
...
When the arrow changes position, we need to queue
an allocation to ensure that gtk_widget_allocate
actually calls our ->size_allocate vfunc.
2020-04-28 23:26:19 -04:00
Matthias Clasen
b47e721ab6
Merge branch 'class-action-init' into 'master'
...
Reshuffle action muxer initialization
See merge request GNOME/gtk!1789
2020-04-29 02:04:37 +00:00
Matthias Clasen
c4a47e218f
Speed up class action hookup
...
No need to construct a detailed signal name for
every action when we can just look up the signal ID
once and use the quark that the GParamSpec already
has. Also, we don't need to loop over the actions
every time we get a notification.
2020-04-28 20:22:26 -04:00
Matthias Clasen
2e2121c7ad
builder-tool: Replace GtkStack:homogeneous
...
Replace this property by h/vhomogeneous.
Add a test.
2020-04-28 20:00:51 -04:00
Matthias Clasen
5f01f6f36b
Drop GtkStack:homogeneous
...
We have hhomogeneous and vhomogeneous properties
that can be set individually.
Fixes : #2673
2020-04-28 20:00:12 -04:00
Matthias Clasen
b968ced567
Reshuffle action muxer initialization
...
We were having a problem where property actions were
not getting state updates because prop_actions_connect
was triggered from some instance_init function while
the widget class is not in place yet.
Delay that call until the widget is fully constructed,
so we can guarantee that we are dealing with the
correct class private struct, and see all class actions.
2020-04-28 18:37:43 -04:00
Matthias Clasen
dc7081599d
video: Don't hide the controls while the popup is shown
...
We don't get motion events from the popup (due to grabs),
so just don't hide as long as we're grab shadowed. This
makes the controls stay up until the volume popup is
dismissed.
2020-04-28 15:11:26 -04:00
Emmanuele Bassi
65c56ea812
Merge branch 'drop-realize-invariant' into 'master'
...
Drop parent->realized => child->realized invariant
See merge request GNOME/gtk!1783
2020-04-28 14:11:55 +00:00
Alexander Larsson
c6104fe7fd
Drop parent->realized => child->realized invariant
...
We already dropped this invariant in gtk_widget_verify_invariants()
because it was not true in all cases. Also, it is not really useful
these days as we extended what it means to be a "child" to also
include widgets in different toplevels.
For example, a popup in a popup button need not be realized just
because the button is in a realized window. The main invariants
we want are:
* Parent is realized before child
* Widget is realized before it is mapped
This sounds like its not a huge deal, but in fact it is a massive win
for things like menus, because when we go between menus in a menubar
each switch between two open menus involves a lot of intermingled
crossing events to different surfaces and for each of these the
tooltip window of the toplevel gets assigned to the new surface. This
shouldn't be a huge deal, as the tooltip window is not even visible,
but due to the realized invariant it get re-realized each time it gets
re-assigned.
2020-04-28 14:32:57 +02:00
Emmanuele Bassi
555230ec9c
Annotate more functions returning GListModel
...
Now that we can have an element-type annotation, we should use it where
needed.
2020-04-28 13:31:59 +01:00
Emmanuele Bassi
2a11f5f889
Use attributes instead of element-type annotation
...
The `element-type` annotation is for GList and GSList only, and turns
out adding support for GListModel in gobject-introspection breaks Vala
and the GIR for GIO.
Instead of using `element-type`, we can use the `attributes` annotation,
which is ignored by code generators based on the GIR data.
2020-04-28 13:31:29 +01:00
Matthias Clasen
5477c1cdfe
inspector: Show the media backend
2020-04-28 00:37:54 -04:00
Matthias Clasen
75c75e001c
mediafile: Privately export function to the extension
...
We want to show this information in the inspector.
2020-04-28 00:37:54 -04:00