Matthias Clasen
0e15b4a367
inspector: Allow picking insensitive widgets again
...
Use the new argument to gtk_widget_pick to allow picking
insensitive widgets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/51
2019-04-07 17:23:17 +00:00
Matthias Clasen
de0942b0b8
tooltip: Allow tooltips on insensitive widgets again
...
Use the new argument to gtk_widget_pick to allow picking
insensitive widgets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1816
2019-04-07 17:23:06 +00:00
Matthias Clasen
b804235aea
Add a flags argument to gtk_widget_pick
...
This will be used to let the inspector and other users
pick insensitive widgets again. For now, update all
callers to pass no flags, preserving the current
behavior.
2019-04-07 17:19:09 +00:00
Matthias Clasen
6bc32a3d5d
widget: Drop the pick vfunc
...
The way to influence picking is to implement contains,
we no longer use the pick vfunc.
2019-04-07 17:00:51 +00:00
Matthias Clasen
5e24454764
window: Stop implementing pick
...
Treat popovers as a special-case for now.
2019-04-07 16:11:20 +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
676ac380cd
widget: Make contains just be about position
...
Leave out reactiveness considerations here,
pick will handle those.
2019-04-07 15:18:37 +00:00
Matthias Clasen
dce2c58799
widget: Make contains respect rounded borders
...
We have the api for this now.
2019-04-07 15:18:37 +00:00
Matthias Clasen
8af0782261
treeview: Make expanders work again
...
These were broken by the crossing event unification.
We are now generating some more crossing events, and
the treeview was not looking closely enough at the
ones it gets.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1814
2019-04-07 12:16:20 +00:00
Matthias Clasen
a0e6353667
inspector: Disable autoloaded custom css initially
...
This is a safeguard against possible crashing css
being autoloaded.
2019-04-06 23:08:10 +00:00
Matthias Clasen
bea7ccb41f
widget: Propagate display changes to the style context
...
When a root is set on a widget, the style context may
already exist. We need to make sure that the style context
has the right display set.
This was showing up as "css spillover" in the inspector.
Closes: #https://gitlab.gnome.org/GNOME/gtk/issues/1817
2019-04-06 23:03:25 +00:00
Matthias Clasen
721a12826d
inspector: Warn if using the default display
2019-04-06 18:19:40 +00:00
Matthias Clasen
4b40cc27a9
inspector: Autosave css
...
Save and restore the contents of the css editor in a file.
2019-04-06 18:00:09 +00:00
Matthias Clasen
c92e53622f
inspector: Rearrange settings a bit
...
Keep only the software gl setting for GL, and put it together
with the simulate touchscreen setting in a 'misc' box. This
keeps all the 'show' options nicely grouped.
2019-04-06 17:39:00 +00:00
Matthias Clasen
c31185b419
inspector: Clean up on finalize
...
Just a matter of cleanliness.
2019-04-06 16:53:35 +00:00
Matthias Clasen
5ff59c12b0
inspector: Fix a copy-paste error
...
We were stuffing the layout overlay into the updates_overlay
field, leaving the layout_overlay field unused.
2019-04-06 16:53:35 +00:00
Matthias Clasen
ea527812a0
HighContrast: fix focus
...
We don't want to render focus rectangles on everything. With
the way focus is propagated nowadays, the theme has to selectively
render focus on certain widgets.
At the same time, we always want to render focus for this
theme, so use the focus pseudoclass, not focus(visible).
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1815
2019-04-06 13:19:29 +00:00
Matthias Clasen
01851e04fc
combo box: Remove leftovers in the header
...
These functions no longer exist and should not be in
the headers anymore.
2019-04-06 12:09:37 +00:00
Matthias Clasen
bfb5e6e72f
widget: Remove some leftover child-property code
2019-04-05 20:52:29 -04:00
Matthias Clasen
1fab3d9e20
builder-tool: Handle layout properties gracefully
...
If there are already layout properties in the ui
file, we shouldn't crash, even if --3to4 is given.
2019-04-05 20:52:29 -04:00
Matthias Clasen
9c9b4e6832
Merge branch 'menushell-bandaid' into 'master'
...
Make menu activation work again
Closes #1796
See merge request GNOME/gtk!721
2019-04-06 00:40:54 +00:00
Matthias Clasen
2deb0e7e1d
Make menu activation work again
...
After we stopped untranslatable delivering events, menus stopped
working 'the second time'. After some painful debugging, it appears
that this is caused by the menushell code deliberately grabbing
on the menubar *after* grabbing on the menu, causing events to
be deleivered to the wrong toplevel. This did not use to matter,
but now we drop these events.
Absent a more thorough rewrite of menus, just don't grab on
the menubar. This makes menu activation work again and does not
appear to have ill effects, on either Wayland or X.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1796
2019-04-06 00:20:21 +00:00
segfault3
d465523f65
gtkplacessidebar: Add loop devices
2019-04-05 19:58:56 +00:00
Matthias Clasen
cb3d61bb0e
inspector: Avoid a critical
...
If a layout manager does not have layout children,
quietly hide the layout page.
2019-04-05 19:44:16 +00:00
Matthias Clasen
ef9dc43474
Show layout children in the inspector
2019-04-05 19:15:55 +00:00
Matthias Clasen
74352e0bee
buildable: Remove a mention of <packing>
...
This is no longer a supported element in ui files.
2019-04-05 14:41:46 -04:00
Matthias Clasen
5c8a870510
print dialog: Rewrite example
...
The ui file example was still using GTK3 syntax
for GtkNotebooks.
2019-04-05 14:41:46 -04:00
Matthias Clasen
7a29462ca6
Fix the inspector
...
One of the inspector ui files was still using
child properties.
2019-04-05 14:41:46 -04:00
Matthias Clasen
ea7a43beb4
container: Reduce boilerplate
...
We no longer need to hand-roll the type registration,
since we no longer install our own param spec pool.
2019-04-05 12:01:43 +00:00
Matthias Clasen
70bf6d4b97
Drop child property related apis
...
We no longer have any child properties in
our containers, so drop the infrastructure for it.
2019-04-05 12:01:43 +00:00
Matthias Clasen
7cd9ea497b
builder-tool: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
a26f400576
paned: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
a97845c380
notebook: Stop using child properties
2019-04-05 12:01:43 +00:00
Matthias Clasen
08d8f2bb80
print dialog: Stop using gtk_container_child_get
...
The grid does not have child properties anymore.
2019-04-05 12:01:43 +00:00
Matthias Clasen
b14f0b8987
grid: Annotate out args as optional
...
They are optional, so annotate them as such.
2019-04-05 12:01:43 +00:00
Matthias Clasen
edbc99104f
searchbar: Fix a compiler warning
2019-04-05 05:10:33 +00:00
Matthias Clasen
285293ac17
file chooser: Fix some compiler warnings
2019-04-05 05:10:26 +00:00
Matthias Clasen
6f7d9f9613
A round of + removal
...
change GTK+ to GTK throughout gtkmain.c.
2019-04-05 05:07:32 +00:00
Matthias Clasen
fe822a0a24
builder-tool: Don't empty out <mark> elements
...
We were inadvertedly losing the content of <mark>
elements. Fix this, by marking (!) them as pcdata
elements.
2019-04-05 03:05:08 +00:00
Matthias Clasen
69d4081ff8
Merge branch 'wip/ebassi/grid-layout' into 'master'
...
Implement GtkGridLayout
See merge request GNOME/gtk!714
2019-04-05 02:42:55 +00:00
Emmanuele Bassi
cfcca335b1
Update GtkGrid definitions in GtkBuilder files
...
Convert packing properties to layout ones.
2019-04-05 00:08:18 +01:00
Emmanuele Bassi
3ea39210cd
builder-tool: Convert GtkGrid child properties
2019-04-05 00:04:14 +01:00
Emmanuele Bassi
faafd23225
Add convenience function for querying a child of GtkGrid
...
Getting the layout manager instance out of GtkGrid, and then querying
all layout properties can be tedious, especially for code that was
usually calling gtk_container_child_get().
To replace that, we can add a simple query function that returns the two
attach points and the spans.
2019-04-04 22:41:19 +01:00
Emmanuele Bassi
62acb80671
Port GtkGrid to use GtkGridLayout
2019-04-04 22:41:03 +01:00
Emmanuele Bassi
c4c897f921
Document GtkGridLayout
...
Add missing stanzas for properties and accessor functions.
2019-04-04 16:31:56 +01:00
Zander Brown
e493b9b702
inspector: Type info for misc pane
...
Replaces the class hierarchy page with a button/popover on the misc page
2019-04-03 23:50:24 +01:00
Emmanuele Bassi
6e0f1800c8
Add GtkGridLayout
...
Layout manager for grid-like widgets.
2019-04-03 19:03:58 +01:00
Matthias Clasen
2cc30f75a0
Merge branch 'wip/carlosg/drop-search-handle-event' into 'master'
...
Search improvements
See merge request GNOME/gtk!710
2019-04-03 13:28:58 +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
Carlos Garnacho
b842bf7bf5
gtk: Drop gtk_search_[entry|bar]_handle_event()
...
This is now unused, and unrecommended.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
1825aa377b
shortcutswindow: Drop usage of gtk_search_bar_handle_event()
...
Make it capture key events from the toplevel.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
e59c6abd91
filechooserwidget: Drop usage of gtk_search_entry_handle_event()
...
Just use gtk_event_controller_key_forward() to let know the search
entry of the Esc key being pressed.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
dc88a1ebc4
inspector: Fix prop-list search
...
Instead of handle_event(), use set_key_capture_widget().
Also, use the fact that we now propagate key events throughout the
stage, and connect to the GtkInspectorPropList instead of the toplevel.
We only want the search bar to be active while that widget is mapped
and able to receive events.
And also, handle the "search bar" visibility on ::search-started.
2019-04-03 13:23:34 +02:00
Carlos Garnacho
9cb9843367
searchentry: Add ::search-started signal
...
Users of search entries usually handled visibility (when initially hidden)
by checking the return value of gtk_search_entry_handle_event(). This does
not pan out with gtk_search_entry_set_key_capture_widget() since the return
value is not directly seen by the caller.
Add a ::search-started signal to cater for it, which gets emitted when the
search entry went from empty to non-empty.
2019-04-03 13:08:53 +02:00
Carlos Garnacho
95754aa71f
treeview: Fix variable typo
...
We actually want search_entry there, not search_window which is the
O-R window in the non-custom case.
2019-04-03 13:07:06 +02:00
Matthias Clasen
cf3aa570c2
inspector: Rename a few pages
...
"Global" and "Visual" are not very good names for
the content of these pages. Rename them to
"Information and "Settings".
2019-04-02 23:36:45 +00:00
Matthias Clasen
7c2ce72b5f
inspector: Manage visibility of stack pages
...
The hand-rolled stack combo we were using before
was looking at the visibility of the page itself
to show or hide items. Other stack switchers
expect us to use the GtkStackPage::visible
property for this.
2019-04-02 23:36:45 +00:00
Matthias Clasen
5371055495
inspector: Redo the object page switcher
...
The combobox for page switching was not very good.
Instead, do a sidebar that can be hidden.
2019-04-02 23:29:22 +00:00
Matthias Clasen
4d6acd5d76
inspector: Drop the child property page
...
Child properties are on the way out.
2019-04-02 23:08:17 +00:00
Matthias Clasen
285e67c044
inspector: Drop the class hierarchy page
...
This was just not useful enough to keep around.
2019-04-02 21:50:09 +00:00
Matthias Clasen
d7987e73c9
inspector: Drop the css selector page
...
This was just not useful enough to keep around.
2019-04-02 21:47:02 +00:00
Matthias Clasen
e13a8102b4
inspector: Drop the signals page
...
This was just not useful enough to keep around.
2019-04-02 21:39:47 +00:00
Matthias Clasen
12c4766dd0
inspector: Properly clean up
...
I got a crash in inspector code when I hit
cancel in the confirmation dialog for it.
2019-04-02 21:21:46 +00:00
Matthias Clasen
5c31c721af
Rename all settings schemas to avoid conflict
...
Rename all our settings schemas to the org.gtk.gtk4
prefix to avoid conflicting with the gtk3 schemas.
2019-04-02 19:27:34 +00:00
Matthias Clasen
7a08177a3d
Merge branch 'async-api' into 'master'
...
Small async api fixes
See merge request GNOME/gtk!701
2019-04-02 15:45:30 +00:00
Matthias Clasen
ad4142df19
Merge branch 'adwaita-selected-row-switch-fix-master' into 'master'
...
Adwaita: Fix switch slider border on selected row
Closes #1802
See merge request GNOME/gtk!704
2019-04-02 15:33:24 +00:00
Alex Monday
fabef39f7f
Adwaita: Fix switch slider border on selected row
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1802
2019-04-02 20:18:26 +05:00
Matthias Clasen
64fd5158bf
gdk: Change some async dnd api
...
The pattern we generally follow is to put the
async result right after the source object, in
finish functions. Do this for gdk_drop_read_finish.
2019-04-02 15:11:06 +00:00
Emmanuele Bassi
6e7748b266
Add API to access child transformations to GtkFixed
...
This is mostly convenience API around GtkFixedLayoutChild, but it should
push people towards using transformations with GtkFixed instead of just
using fixed positioning.
2019-04-02 15:48:46 +01:00
Emmanuele Bassi
447dfc029f
Remove GtkLayout
...
The need of a specialised fixed layout container that can be placed into
a GtkScrolledWindow ceased to exist once GtkScrolledWindow gained the
ability to automatically interpose a GtkViewport when adding a child
that does not implement GtkScrollable.
All the other justifications that led to the existence of GtkLayout as a
separate widget from GtkFixed have been largely made irrelevant in the
20 years since its inception.
2019-04-02 15:29:20 +01:00
Emmanuele Bassi
aed70a82c7
Add overflow:hidden to GtkFixed
...
This allows GtkFixed to clip children that are outside its allocation.
2019-04-02 15:14:53 +01:00
Matthias Clasen
e2fcca4e60
Rename debug settings to org.gtk.Settings.Debug4
...
This gives us the freedom to make changes without
interfering with GTK3.
2019-04-02 00:27:32 +00:00
Emmanuele Bassi
aacab81a3e
Fix location on renamed files
...
Commit 4152e14e32
renamed a bunch of
files, but did not fix the meson.build file that referenced them.
2019-04-01 13:52:27 +01:00
Matthias Clasen
4152e14e32
Namespace some auxiliary files
...
We install a few helper files for the ui file
format. Namespace these, to avoid conflict with
the same files in GTK3.
2019-04-01 08:30:39 -04:00
Matthias Clasen
57b3cd56d7
Drop gtkbuilder.rnc
...
This is just a leftover file in git.
2019-04-01 08:29:24 -04:00
Matthias Clasen
5b5a68c5db
Fix filechooser search
...
This makes the search entry show up again
when I type. There is still some misbehavior
where the entry loses focus again, and Escape
does not work to exit search.
2019-03-31 23:06:42 -04:00
Matthias Clasen
d2e0553384
Fix menuitem hover
...
We need to pay attention to details
of enter and leave events.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1795
2019-03-31 21:53:55 -04:00
Matthias Clasen
c2c4133eb0
Fix up the border/background-color removal
...
I overlooked one level of indirection here. Oops.
2019-03-31 20:43:19 -04:00
Matthias Clasen
058986714c
tooltips: Don't use a cursor_size of 0
...
This leads to flickering tooltips.
2019-03-31 16:17:08 -04:00
Matthias Clasen
0230cc55bc
Drop deprecated style context api
2019-03-31 15:35:20 -04:00
Matthias Clasen
6f5675ef3c
Stop using deprecated style context api
...
Use the non-deprecated one it wraps, instead.
Yes, this is cheating...
2019-03-31 15:35:20 -04:00
Matthias Clasen
396513183b
Merge branch 'fix-event-forwarding' into 'master'
...
Trigger bindings when forwarding key events
Closes #1793
See merge request GNOME/gtk!690
2019-03-31 18:27:24 +00:00
Benjamin Otte
720fd2cd40
textview: Fix comparison thinko
...
Apparently, we have no test that checks for actually drawing text, so
the thinko that caused all text to disappear in
4b07d28153
went unnoticed.
2019-03-31 20:22:05 +02:00
Matthias Clasen
da7cd6ae25
Trigger bindings when forwarding key events
...
This broke backspace handling in entries when an entry
completion is present.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1793
2019-03-31 14:04:35 -04:00
Matthias Clasen
8bae5348f9
text: Handle 'inverted' selections
...
We must handle selection_bound > cursor in
various places. This was lost in the big
entry refactoring.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1792
2019-03-31 12:36:09 -04:00
Mohammed Sadiq
56a88f107c
mediastream: fix documentation
2019-03-31 08:37:45 +05:30
Daniel Boles
96bf90abe4
Widget: Don't refer to the old get_preferred_*()
...
measure() replaced get_preferred_height() and get_preferred_width().
2019-03-30 19:47:50 +00:00
Matthias Clasen
f273eca7e3
revealer: Add a missing break
...
This was showing up as the slide-down transition
being broken.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1790
2019-03-29 10:57:51 -04:00
Benjamin Otte
9d0a42dc14
stack: Add a cube spin transition
...
Add a transition to GtkStack that pretends pages
are the sides or a cube, and switch them by
rotating the cube.
Use this transition in widget-factory.
2019-03-29 10:03:18 -04:00
Benjamin Otte
7918eaf677
picture: Don't cause warnings on load failures
...
When a file set via gtk_picture_set_file() can't be loaded, just
silently don't load it.
Reftest picture-load-invalid-file added for that case.
2019-03-29 09:56:52 +01:00
Benjamin Otte
b21882bcea
cssimagelinear: Make gradient offsets stay in [0, 1]
...
Fixes linear-gradient reftest
2019-03-29 09:56:52 +01:00
Benjamin Otte
d10a73f509
textview: Paint border windows in the right spot
...
Fixes textview-border-windows reftest
2019-03-29 09:56:52 +01:00
Benjamin Otte
38fbb6856c
headerbar: Duct-tape over the measure mess
...
Fixes various reftests.
The headerbar needs soeone to redo sizing.
2019-03-29 09:56:52 +01:00
Benjamin Otte
4b07d28153
textlayout: Allow querying empty areas
...
This only happens when the textview has no content, but it does happen
now that such a textview gets allocated 0x0 and not 1x1.
2019-03-29 09:56:52 +01:00
Benjamin Otte
5dd5ff5236
widgetpaintable: Don't emit signals on dispose
2019-03-29 09:56:52 +01:00
Matthias Clasen
6f470affef
Merge branch 'adwaita-radii-fixes-master' into 'master'
...
Adwaita radii fixes master
See merge request GNOME/gtk!628
2019-03-29 00:51:23 +00:00
Matthias Clasen
c30fc92b3e
builder-tool: Don't strip the xml declaration
...
This is useful for interoperability with other tools.
2019-03-28 19:28:05 -04:00
Matthias Clasen
7222bda146
file chooser entry: Fix a crash
...
The ::focus-out signal signature has changed. Adapt.
2019-03-28 18:55:36 -04:00
Matthias Clasen
eaae9650d9
popover menu: Fix a parameter name mismatch
2019-03-28 18:36:15 -04:00