Matthias Clasen
2fd2c61d37
dialog: Stop using GtkHeaderBar::pack-type
...
We want to get rid of child properties.
2019-03-27 13:36:24 -04:00
Matthias Clasen
7843382784
text: Allow growing entries
...
Add a propagate-text-width property, which, when set,
makes the entry request a natural width that is just
enough to fit the content, within the limits given
by width-chars and max-width-chars.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1721
2019-03-27 01:42:00 -04:00
Matthias Clasen
544fe83864
search entry: Fix sizing
...
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
search entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8a9290d0ba
password entry: Fix sizing
...
Use the same sizing approach we use for GtkEntry:
ignore icons when measuring. This ensures that
password entries don't change size as icons come
and go.
2019-03-27 01:42:00 -04:00
Matthias Clasen
8d4343a550
Merge branch 'get_caret_offset_negative_one' into 'master'
...
Return -1 for AtkText::get_caret_offset on failure
See merge request GNOME/gtk!666
2019-03-26 23:14:48 +00:00
Matthias Clasen
c0aaa43122
Rename gdk_device_get_surface_at_position_double
...
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
562cc8b9ab
gtk: Stop using gtk_device_get_surface_at_position
...
We should always use the double variant of the api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
03eb455c93
Rename gdk_device_get_position_double
...
We can drop the double suffix now.
2019-03-26 18:12:55 -04:00
Matthias Clasen
7e4707642a
gtk: Stop using gdk_device_get_position
...
We should always use the double variant of this api.
2019-03-26 18:12:55 -04:00
Matthias Clasen
21580309d3
Rename gdk_surface_get_device_position_double
...
Drop the _double suffix, now that the int version is gone.
2019-03-26 18:12:54 -04:00
Matthias Clasen
2d10a7b9c4
gtk: Stop using gdk_surface_get_device_position
...
Use the double version directly.
2019-03-26 18:08:32 -04:00
Matthias Clasen
eb4e7b9172
Remove GtkWindow::gravity
...
This was used to interpret the position passed
to gtk_window_move. Since that is gone, gravity
is no longer useful.
2019-03-26 17:55:29 -04:00
Matthias Clasen
0481f123ea
Drop gtk_window_move and gtk_window_get_position
...
These functions operate with global coordinates,
which are not available on Wayland.
2019-03-26 17:55:29 -04:00
Matthias Clasen
6f072c80db
treeview: Stop using gtk_window_move
...
It is going away. The search popup needs to be
redone using popovers.
2019-03-26 17:55:29 -04:00
Matthias Clasen
2ed533c3e1
file chooser: Stop using gtk_window_get_position
...
It is going away.
2019-03-26 17:55:29 -04:00
Matthias Clasen
f7d3815fa8
a11y: Don't support changing widget size and position
...
This does not make sense.
2019-03-26 17:55:29 -04:00
Matthias Clasen
d45996c728
Avoid root coordinates in begin_drag/move apis
...
Change the all the begin_drag and begin_move apis in
GdkSurface and GtkWindow to expect surface coordinates.
Update the x11 implementation to translate to root
coordinates where it matters. Wayland is ignoring the
coordinates anyway.
2019-03-26 15:57:11 -04:00
Emmanuele Bassi
060e30de3f
Turn GtkFixedLayoutChild:position into a transformation
...
This way we can transform children instead of just allocating them at an
offset.
2019-03-26 19:17:26 +00:00
Emmanuele Bassi
dd5c981b63
Use GtkFixedLayout in GtkFixed
...
Drop the child properties and the sizing code.
2019-03-26 18:15:13 +00:00
Emmanuele Bassi
9a4c19349e
Add GtkFixedLayout
...
A layout manager for fixed positioning.
2019-03-26 17:43:53 +00:00
Emmanuele Bassi
3389ddf6fc
Do not connect to a non-existing signal
...
The GtkWidget::parent-set signal was removed in ff6cd8f7
.
Instead of removing GtkLayoutChild instances associated to a widget
using notifications when the widget's parent changes, we can have
gtk_widget_unparent() call a method on GtkLayoutManager to remove any
eventual GtkLayoutChild instances associated to the widget.
2019-03-26 17:37:49 +00:00
Emmanuele Bassi
341660e056
Drop warning from GtkLayoutManager::get_request_mode()
...
We can return a sensible default value, so we don't really need to warn
about a missing implementation.
2019-03-26 17:37:49 +00:00
Martin Robinson
c8d250deb1
Return -1 for AtkText::get_caret_offset on failure
...
ATK now expects this virtual method to return -1 on failure. This allows
ATs to distinguish between a caret at position 0 and a failure.
2019-03-26 15:38:20 +01:00
Emmanuele Bassi
65965bed16
Changes after review
...
- Rename GtkLegacyLayout to GtkCustomLayout
- Use for() to iterate over children in GtkBinLayout
- Whitespace fixes for code imported from GtkBox
- Store the GtkLayoutChild instances inside LayoutManager
- Simplify the GtkLayoutManager API by dropping unnecessary arguments
- Fix the ownership model of GtkLayoutManager
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
630442f31c
Parse layout properties
...
If a widget has a LayoutManager instance, then we want to parse layout
properties in UI description files; the grammar is similar to packing
properties in GtkContainer:
<child>
<object ...>
<property name="...">...</property>
<layout>
<property name="pname">value</property>
</layout>
</object>
</child>
The properties are applied after a child has been added to its parent,
to the parent's layout manager property should be set.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
d6dfa41f10
Add GtkBinLayout
...
Like GtkBin, but lets you lay out multiple children instead of just one.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
8cf06befc0
Port GtkSwitch to GtkLegacyLayout
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
128a34fe37
Add GtkLegacyLayout
...
GtkLegacyLayout is a layout manager for the transitional period between
the introduction of layout managers and the removal of GtkWidget virtual
functions for the size negotiation.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
1fed357752
Port GtkBox to GtkBoxLayout
...
We can delegate all the layout management to a GtkBoxLayout, now that we
have one.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
ef9863ab63
Add GtkBoxLayout
...
The same layout policy of GtkBox, without all the GtkContainer calories.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
5cbf6f5fbd
Add GtkLayoutChild
...
Layout managers needs a way to store properties that control the layout
policy of a widget; typically, we used to store these in GtkContainer's
child properties, but since GtkLayoutManager is decoupled from the
actual container widget, we need a separate storage. Additionally, child
properties have their own downsides, like requiring a separate, global
GParamSpecPool storage, and additional lookup API.
GtkLayoutChild is a simple GObject class, which means you can introspect
and document it as you would any other type.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
15fda18791
Rename the internal GtkLayoutChild type
...
The type is completely private to GtkLayout, so there's really no need
to namespace it.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
f7856e887e
Add GtkWidget:layout-manager
...
We can use a constructor property for existing container widgets with
a layout policy, and move the layout policy implementation out of the
widget itself and into a LayoutManager subclass.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
1b8595b5f2
Hook GtkLayoutManager into GtkWidget
...
We delegate the size request mode, the measuring, and the allocation of
a widget through a GtkLayoutManager instance, if one has been attached
to the widget; otherwise, we fall back to the widget's own implementation.
2019-03-26 00:11:27 +00:00
Emmanuele Bassi
24754c3259
Add GtkLayoutManager
...
A base abstract class for layout manager delegate objects.
Layout managers are associated to a single widget, like event
controllers, and are responsible for measuring and allocating the
children of the widget they are bound to.
2019-03-26 00:11:27 +00:00
Timm Bäder
ab7507150b
Doc comment fixup
2019-03-25 15:57:31 +01:00
Timm Bäder
e657d9d553
popover: Always measure contents gizmo
...
Otherwise we're getting warnings about allocating a widget we haven't
measured first, which is fair. The contents gizmo itself will later take
care about whether or not the real popover child is NULL.
2019-03-25 15:57:31 +01:00
Timm Bäder
36e00ae95e
popover: Don't try to compute_bounds of a NULL child
2019-03-25 15:57:30 +01:00
Matthias Clasen
160f1e581a
Remove a dead file
...
We are not using this anymore.
2019-03-24 20:48:35 -04:00
Matthias Clasen
661e195ffc
color editor: Don't warn if editing is cancelled
...
Thats a valid way to end color picking.
2019-03-24 20:47:26 -04:00
Benjamin Otte
551ced9ae4
Fix compile warning
2019-03-23 03:08:20 +01:00
Benjamin Otte
799cb39e08
Remove win32 themeing support
...
It was unused through all of GTK 3, so it is not worth supporting.
The best Windows themes do not make use of it at all.
2019-03-22 22:30:01 +01:00
Matthias Clasen
1ada7bbc02
Fix hover state handling
...
We were not paying enough attention to detail when updating
hover and focus state while generating crossing events. The
invariant that we need to preserve here is that when a widget
has focus or hover, its parent does too.
2019-03-22 16:35:20 -04:00
Matthias Clasen
81658105f7
Stop walking parent surfaces for crossing event generation
...
We basically don't have child surfaces anymore (the last
use in popovers is on the way out). This really needs
to be done in terms of widgets, not surfaces. For now,
just stop walking parent surfaces.
2019-03-22 16:35:20 -04:00
Benjamin Otte
d9ef734458
cssparser: Simplify
...
Remove the uint parser (and use the int parser in the one user of it).
And avoid unnecessarily going through a macro.
2019-03-22 19:55:34 +01:00
Benjamin Otte
73760e5835
cssparser: Remove unused functions
2019-03-22 19:55:34 +01:00
Matthias Clasen
5638882dca
Remove debug spew
2019-03-22 14:44:51 -04:00
Matthias Clasen
56df49971a
entry: Disconnect text signals in dispose
...
This was showing up as crashes when closing
the file chooser.
2019-03-21 19:15:55 -04:00
Matthias Clasen
0bf136a902
Merge branch 'adwaita-remove-selectionmode-assets-master' into 'master'
...
Adwaita: Drop checkbox-selectionmode assets
See merge request GNOME/gtk!634
2019-03-20 14:10:18 +00:00
Matthias Clasen
2479d60012
Merge branch 'adwaita-selectionmode-checkboxes-master' into 'master'
...
Adwaita: Fix selection-mode checkboxes
Closes #28
See merge request GNOME/gtk!629
2019-03-20 14:10:05 +00:00
Matthias Clasen
6990f73940
Merge branch 'adwaita-headerbar-switch-margins-master' into 'master'
...
Adwaita: Adjust switch margins on headerbars
Closes #1759
See merge request GNOME/gtk!651
2019-03-20 14:06:19 +00:00
Matthias Clasen
254c27acbe
Merge branch 'wip/jimmac/focus-ring-radii' into 'master'
...
Adwaita: draw bigger radius for focus rings
Closes #1756
See merge request GNOME/gtk!649
2019-03-20 12:32:15 +00:00
Matthias Clasen
558405e1bc
window: Update state flags
...
When the window gets active / inactive, we
don't propagate events, but just send focus-in / -out
to the current focus_widget. Improve this by updating
its state flags as well.
2019-03-19 21:33:38 -04:00
Matthias Clasen
f47c376fb1
main: Fix crossing event generation for parented roots
...
We were walking the parent chain here, which now
always needs to consider whether it should stop
at roots. Like this one should.
The symptom was that a label with a popup attached to
it would end up with an unintentional focus ring that
would not go away.
2019-03-19 21:33:38 -04:00
Alex Monday
5679b9a687
Adwaita: Adjust switch margins on headerbars
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1759
2019-03-19 19:59:05 +05:00
Jakub Steiner
24235f61ab
Adwaita: draw bigger radius for focus rings
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1756
2019-03-19 14:07:10 +01:00
Benjamin Otte
a44ac75e65
gtk: Don't include gtkstylecontext.h from gtkcsstypesprivate.h
...
And make sure it's included everywhere it's needed.
2019-03-19 08:53:25 +01:00
Benjamin Otte
85c8e29d78
stylecontext: Move atk.h include where it belongs
2019-03-19 08:49:15 +01: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
Benjamin Otte
07054ca20d
singleselection: Add forgotten notify emission
...
Also, add docs for the model property while I'm looking at the file.
2019-03-19 08:48:22 +01:00
Benjamin Otte
8f6a48832d
revealer: Always use identity transform for revealed child
...
Refactor the child allocation machinery, so that the complex allocation
paths are only run when the animation is running.
And in particular, ensure that when no animation is running, the
identity transform is allocated.
2019-03-19 08:48:06 +01:00
Matthias Clasen
0d91481587
One forgotten leave signal handler
2019-03-18 15:35:07 -04:00
Matthias Clasen
8650980797
Adapt to motion controller api change
...
The signature of the enter/leave signals changed.
Adapt all users.
2019-03-18 09:24:42 -04:00
Matthias Clasen
2b0d1bca43
motion controller: Install the properties
...
Oops
2019-03-18 08:44:35 -04:00
Matthias Clasen
f7e328e5f7
Merge branch 'paned-no-grab' into 'master'
...
paned: Don't use a grab
See merge request GNOME/gtk!644
2019-03-18 11:50:42 +00:00
Matthias Clasen
b40743121b
Merge branch 'crossing-details' into 'master'
...
motion controller: add details to signals
See merge request GNOME/gtk!621
2019-03-18 01:49:45 +00:00
Matthias Clasen
93c1353c69
Merge branch 'wip/carlosg/include-constructors-header' into 'master'
...
gdk: Include copy of glib/gconstructor.h
See merge request GNOME/gtk!642
2019-03-18 01:10:06 +00: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
26f99bf20c
editable: Fix a thinko
...
When dealing with subclasses of GtkEntry, we were not
getting the property offset that is stored on the GtkEntry
type.
This was showing up as criticals when trying to set
::width-chars on a GtkFileChooserEntry.
2019-03-17 18:46:18 -04:00
Carlos Garnacho
65d9b7ee86
gdk: Include copy of glib/gconstructor.h
...
This is named gdkconstructor.h to avoid any possible conflicts. This fixes
the current usages of G_HAS_CONSTRUCTORS, as that header is not installed
by glib.
2019-03-17 21:29:59 +01:00
Matthias Clasen
430ea05aea
widget: Fix a mission annotation
2019-03-17 01:11:22 -04:00
Matthias Clasen
17f4211e4f
motion controller: Add getters for crossing event targets
...
This information can be needed in signal handlers,
so make it available.
2019-03-16 23:52:58 -04:00
Matthias Clasen
ecd6446d08
motion controller: Add focus properties
...
Add boolean properties, is-pointer-focus and
contains-pointer-focus, that track whether the pointer
is in the widget itself or in one of its descendants.
2019-03-16 23:32:31 -04:00
Matthias Clasen
1540797237
motion controller: add details to signals
...
The ::enter and ::leave signals get emitted up and down the
connecting path between the old an the new pointer location.
The signals are less useful if you can't find out where along
the path you are. That is what crossing mode and detail are
about, so add those to the signals.
2019-03-16 23:03:41 -04:00
Matthias Clasen
1ce5327058
xim: Stop using GtkWidget::event
...
It does not exist anymore. I'm removing this code now
because our CI tests are using xim and fail due to this.
Eventually, this code should be ported to use a popover.
2019-03-16 22:16:10 -04:00
Matthias Clasen
6ddb61119a
Use root in gdk_synthesize_crossing_events
2019-03-16 21:30:48 -04:00
Matthias Clasen
492a38c229
Make gtk_widget_get_focus_child public
...
It doesn't really make sense to have only
the setter, but not the getter public.
2019-03-16 21:24:45 -04:00
Matthias Clasen
93905a8513
key controller: Enforce limitations of key forwarding
...
We now set current_event for focus-change as well,
so make sure to check the event type.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4f06b669c5
key controller: Improve the docs
...
Mention the limitations of the key forwarding api.
2019-03-16 21:24:45 -04:00
Matthias Clasen
f3ed3e99c3
key controller: Add getters for focus event targets
...
This information can be needed in signal handlers,
so make it available.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4f5a8207bc
key controller: Add focus properties
...
Add boolean properties, is-focus and contains-focus, that
track whether the focus is in the widget itself or in
one of its descendants.
2019-03-16 21:24:45 -04:00
Matthias Clasen
2f1194c0c1
key controller: Fix a copy/paste error
...
Prefix the finalize function properly.
2019-03-16 21:24:45 -04:00
Matthias Clasen
921eccb459
Pass mode and detail to focus-in/out signals
...
This information is useful when maintaining a
'last focus' field.
Update all users.
2019-03-16 21:24:45 -04:00
Matthias Clasen
888b92674f
Move maintaining the focus chain
...
Put this code in the same place where we generate
the crossing events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
7d354b5084
Some fixes to crossing event generation
...
In the inferior and ancestor cases, we were missing
the initial/final event.
2019-03-16 21:24:45 -04:00
Matthias Clasen
4238a04c7b
window: Use gtk_synthesize_crossing_events
...
Emit focus change events in the same way as crossing events.
Also change the code to only emit focus change events for
the master keyboard - we only maintain a single focus location,
so sending multiple focus change events for different devices
seems confusing.
2019-03-16 21:24:45 -04:00
Matthias Clasen
adb547a147
Export gtk_synthesize_crossing_events internally
...
We want to use this for focus changes, now that
it can emit focus change events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
cdcd2bb073
Share crossing and focus change event code
...
Make a single function that can emit both
enter/leave and focus change events.
2019-03-16 21:24:45 -04:00
Matthias Clasen
c73972f7df
gdk: Rename gdk_event_set_user_data
...
Lets call it what it is, the target.
All of this is private api anyway.
Update all callers.
2019-03-16 21:24:45 -04:00
Matthias Clasen
a3abf0693d
Clarify grab_focus docs
2019-03-16 21:24:45 -04:00
Matthias Clasen
7ca24f12d7
window: Remove initial-focus builder support
...
With focus-widget now a property, this is no longer needed.
2019-03-16 21:24:45 -04:00
Matthias Clasen
f68855341e
window: Remove ::set-focus
...
The focus-widget is now a property, so we don't need
this signal anymore.
2019-03-16 21:24:45 -04:00
Matthias Clasen
31d9ecb5c3
popover: Stop using ::set-focus
...
This will change completely when GtkPopover becomes a
root. For now, stop using ::set-focus and just use the
focus-widget property.
2019-03-16 21:24:44 -04:00
Matthias Clasen
f13e6179e8
filechooser: Stop using ::set-focus
...
We can achieve the same with the focus-widget property.
2019-03-16 21:24:44 -04:00
Matthias Clasen
d279c666a9
inspector: Stop using ::set-focus
...
The focus-widget is just a regular property now that shows
up on the property page. No need to special-case it on
the misc page anymore.
2019-03-16 21:24:44 -04:00
Matthias Clasen
7819a5aab9
Drop gtk_widget_send_focus_change
...
Replace this with gtk_widget_set_has_focus + gtk_widget_event.
2019-03-16 21:24:44 -04:00
Matthias Clasen
15300f839e
widget: Add a private setter for has-focus
2019-03-16 21:24:44 -04:00
Matthias Clasen
94b0e99be5
Exclude non-drawable widgets from focus
...
This was showing up as confusion between palette
and editor in the color chooser.
2019-03-16 21:24:44 -04:00
Matthias Clasen
8c1d852a84
widget: Drop the ::focus signal
...
The focus vfunc is an implementation detail
of GTK focus handling, and having external
signal handlers interfere with it is not
a good idea.
2019-03-16 21:24:44 -04:00
Matthias Clasen
2738926dcb
Simplify the move_focus api
...
No need to pass the array in from the outside.
2019-03-16 21:24:44 -04:00
Matthias Clasen
029ec38e63
Move a check to gtk_window_set_focus
...
gtk_widget_grab_focus is just a wrapper for
gtk_window_set_focus. We should do all the enforcement
there.
2019-03-16 21:24:44 -04:00
Matthias Clasen
2bf1561b48
Port widgets to the root focus API
2019-03-16 21:24:44 -04:00
Matthias Clasen
bd44831987
window: Implement the root focus api
...
This just uses the existing get/set_focus functions.
We keep them public for now.
2019-03-16 21:24:44 -04:00
Matthias Clasen
ab5d3e756b
root: Add focus
...
Add a getter and a setter for the focus widget.
The default implementations do nothing.
2019-03-16 21:24:44 -04:00
Matthias Clasen
92f1bdcf45
Redo focus handling
...
GtkWindow has a focus_widget that points to the current input focus.
GtkWidget has a focus_child that points to the child that contains
the input focus. Following the focus_child chain from the toplevel
always leads to the focus_widget. We never unset focus_child, we only
set it. We bubble focus change events.
2019-03-16 21:24:44 -04:00
Matthias Clasen
64b9114d98
password entry: Fix property notification
...
Both placeholder-text and activates-default were not
up to our usual standards for property notification,
and the tests complained.
2019-03-16 21:23:28 -04:00
Matthias Clasen
a1cc809c60
search entry: Fix property notification
...
Both placeholder-text and activates-default were not
up to our usual standards for property notification,
and the tests complained.
2019-03-16 21:23:28 -04:00
Matthias Clasen
7ca528b896
widget: Check rootness for invisibility
...
Make the function that determines initial visibility
look at whether the class implements GtkRoot. That is
the eventual goal for this check. For now, allow
popovers in here as well.
2019-03-16 21:23:28 -04:00
Matthias Clasen
f14d998c95
password entry: Don't show both icons
...
It can be a bit confusing to have an indicator
and an action next to each other, and with the
peek icon, the need for the Caps Lock warning is
reduced, since you can just reveal the text to
see that it is capitalized.
Therefore, only show the Caps Lock warning if
the peek icon is disabled.
2019-03-15 14:35:25 -04:00
Matthias Clasen
a3b73a416e
password entry: Add a way to see the content
...
Add a ::show-peek-icon property and show a clickable
icon when it is set. Clicking it toggles the visibility
of the content. The same functionality is also accessible
via a context menu item.
This is a common feature of password entries.
2019-03-14 20:31:45 -04:00
Matthias Clasen
d3cecd65a5
password entry: Make the Caps Lock icon less prominent
...
Set a style class, and theme the Caps Lock icon to
be less promient, so it does not appear clickable.
2019-03-14 20:03:34 -04:00
Matthias Clasen
470720e11a
password entry: Use text cursor for Caps Lock indicator
...
We don't want it to appear clickable, but we still
need to keep it pickable for the tooltip to work,
so explicitly give it the same cursor that we use
for the text.
2019-03-14 19:17:39 -04:00
Matthias Clasen
c3f43cf1f2
entry: Make progress bar not pickable
...
There is no need for that, we don't want to
handle input here at all.
2019-03-14 19:15:31 -04:00
Matthias Clasen
5251253fc0
password entry: a better Caps Lock icon
...
This is more in line with how Caps Lock
is typically indicated.
2019-03-14 19:00:37 -04:00
Matthias Clasen
56ee1f3566
password entry: Add placeholder-text and activates-default
...
Add ::placeholder-text and ::activates-default properties.
Password entries are going to be used in dialogs, where
these two properties are useful.
2019-03-14 18:42:07 -04:00
Matthias Clasen
4afad781fe
password entry: Initialize capslock state
...
The icon was erroneously showing up before the first
focus-in event.
2019-03-14 17:58:10 -04:00
Matthias Clasen
8e4c441f78
a11y: More entry fixes
...
Remove the GtkEntry assumption from more places.
2019-03-14 17:58:02 -04:00
Alex Monday
d07cd892e7
Adwaita: Drop checkbox-selectionmode assets
2019-03-13 14:12:45 +05:00
Alex Monday
4bba279085
Adwaita: Fix selection-mode checkboxes
...
Use object-select-symbolic as a check icon, adjust styles.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/28
2019-03-12 22:05:08 +05:00
Alex Monday
36539a22d7
Adwaita: Adjust entry border-radius
...
Replace entry border-radius value with $button_radius variable.
2019-03-12 20:42:48 +05:00
Alex Monday
ad96220448
Adwaita: Replace spinbutton border-radii with variables
...
Replace hardcoded border-radius values with $button_radius
variable on spinbuttons.
2019-03-12 20:34:38 +05:00
Alex Monday
73139d524b
Adwaita: Replace all %linked radii with variables
...
Some of hardcoded border-radius values on linked elements were left
unchanged during Adwaita refresh.
2019-03-12 20:32:14 +05:00
Benjamin Otte
3863e44360
text: Simplify
...
The previous arguments were equivalent to using NULL.
2019-03-08 14:12:17 +01:00
Benjamin Otte
8566218485
text: Remove two unused member variables
2019-03-08 14:12:04 +01:00
Benjamin Otte
1475575799
text: Use gtk_widget_set_overflow()
2019-03-08 13:39:52 +01:00
Benjamin Otte
bc901ffa5a
text: Remove 2 unused variables
...
One is always 0, the other is always equal to gtk_widget_get_width()
2019-03-08 13:33:54 +01:00
Benjamin Otte
b114d45c5f
colorswatch: Use gtk_widget_set_overflow()
2019-03-08 13:20:17 +01:00
Benjamin Otte
9a1c698070
widget: Make overflow respect rounded corners
...
Fixes !574
2019-03-08 13:20:17 +01:00
Benjamin Otte
ad5c5d477e
revealer: Add swing transitions
...
And make the revealer on page 2 of the widget-factory use one.
2019-03-07 15:06:12 +01:00
Timm Bäder
39fbf13fcb
entry: Update CSS node docs
...
Remove all the nodes that are subnodes of GtkText nowadays and refer to
the GtkText docs instead.
2019-03-06 09:03:17 +01:00
Benjamin Otte
3a3b325f8e
transform: Add perspective()
...
This commit adds gsk_transform_perspective(), gtk_snapshot_perspective()
and support for perspective() in the CSS syntax.
2019-03-05 20:46:00 +01:00
Benjamin Otte
bd113aa85c
transform: Redo querying API
...
Make the API expect a tranform of the proper category instead of
doing the check ourselves and returning TRUE/FALSE.
The benefit is that the mai use case is switch (transform->category)
statements and in those we know the category and don't need to check
TRUE/FALSE.
Using the wrong matrix will now cause a g_warning().
2019-03-04 23:41:51 +01:00
Benjamin Otte
3545abc7a1
transform: Implement gsk_transform_invert()
...
And use it.
And test it.
2019-03-04 23:41:51 +01:00
Benjamin Otte
b391aea2b3
widget: Make transform a GskTransform
...
This concludes pushing transforms down into GskTransform.
What's remaining is potentially pushing it further into the renderers.
2019-03-04 23:41:51 +01:00
Benjamin Otte
3cc84d2860
transform: Make category public API
...
Also rename it from GskMatrixCategory to GskTransformCategory.
2019-03-04 23:15:24 +01:00
Benjamin Otte
3a3c2d14ab
rendernode: Make the transform node take a GskTransform
...
This is an attempt to push GskTransform deeper into the stack.
2019-03-04 23:15:07 +01:00
Benjamin Otte
0e1a50366a
transform: Move to GSK
...
The renaming of the prefix makes this a large patch.
2019-03-04 23:09:02 +01:00
Matthias Clasen
20f7588a84
Merge branch 'adwaita-typo-fix-master' into 'master'
...
Adwaita: Fix typo (missing comma)
Closes #1713
See merge request GNOME/gtk!618
2019-03-04 17:36:10 +00:00
Christoph Reiter
348912dff4
treeview: make sure separator nodes have a height > 0
...
In case the theme doesn't set a height/min-height for the treeview
separator the treeview drawing gets confused and draws rows on top of each
other depending on the redraw area.
This is due to gtk_tree_view_get_row_height() assuming that a node with a
height <= 0 is not set and not a separator and it will default to the
expander size.
Ideally gtk_tree_view_get_row_height() would know if it operates on a separator,
but there are too many calls/levels, so just make sure the separator height
is at least 1 (Adwaita already sets "min-height: 2px", so no change there)
Cherry-picked from !614 to master
2019-03-04 17:07:13 +01:00
Alex Monday
610692d07b
Adwaita: Fix typo (missing comma)
...
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1713
(cherry picked from commit 0b61d6f6ae
)
2019-03-04 15:58:15 +00:00
Emmanuele Bassi
45ea288ba2
Merge branch 'notebook-notify-page-not-child' into 'master'
...
notebook: Notify the notebook page, not the child
See merge request GNOME/gtk!616
2019-03-04 11:35:18 +00:00
Matthias Clasen
b79545e83c
search entry: Fix a copy-paste error
2019-03-03 22:56:02 -05:00
Matthias Clasen
02318dbda7
entries: Fix mnemonic activation
...
Since entries are no longer can-focus, the default
mnemonic_activate handler refuses to act on them.
2019-03-03 22:25:52 -05:00
Peter Bloomfield
afbfccb89e
notebook: Notify the notebook page, not the child
...
Call g_object_notify() on the GtkNotebookPage, not the child GtkWidget.
Fixes some issues in !594 .
2019-03-03 18:21:10 -05:00
Benjamin Otte
bed4c68041
widget: Fix gtk_widget_pick() on 3d-transformed widgets
...
Picking is done by drawing a line along the parent's z axis and picking
at the intersection with the child's z=0 plane.
However, the previous code was casting a ray along the child's z axis.
This patch actually transforms the line to pick into the target's
coordinate system and then computes the corrrect intersection with the
z=0 plane.
Using graphene_point3d_interpolate() to compute the final intersection
point is a bit of abuse of that function, but I found no better way in
Graphene to achieve the same thing.
2019-03-03 19:50:59 +01:00
Timm Bäder
f35b8a7541
Fix compile time warnings
2019-03-02 05:28:55 +01:00
Timm Bäder
9948ca7be2
a11y: Include gtktextaccesible.h in gtk-a11y.h
...
Closes #1710
2019-03-02 05:26:26 +01:00
Matthias Clasen
9e0c471b03
entry, spin button: Drop redundant API
...
Avoid duplicating GtkEditable APIs. Port existing users.
2019-02-28 16:34:00 -05:00
Matthias Clasen
5caf8ca76b
entry: Don't use the buffer directly
...
We want to be a wrapper of the GtkText, which in turn
wraps the GtkEntryBuffer. Not some weird mix.
2019-02-28 00:36:44 -05:00
Matthias Clasen
fda4546de5
treeview: Stop using set_focus_child
...
Do this with an event controller on the buttons instead.
2019-02-28 00:36:44 -05:00
Jakub Steiner
d930c4a4d1
Adwaita: define insensitive links
...
- tone down the disabled/insensitive links.
Fixes issue #1645
2019-02-27 12:12:57 +01:00
Benjamin Otte
f36e41600a
xembed: Remove unused file
2019-02-27 08:56:41 +01:00
Benjamin Otte
78d013f8d3
window: Return no item for no item name
2019-02-27 08:53:33 +01:00
Matthias Clasen
b4ae491b45
window: Undo the deprection of gtk_window_present
...
After considerable discussion, we came to the conclusion
that the convenience of this API wins over the correctness
of gtk_window_present_with_time(), in particular since we
don't have a good mechanism to carry timestamps from the
events to the places where we present windows.
2019-02-26 14:11:16 -05:00
Matthias Clasen
b0083b33bb
widget: Remove the ::grab-focus signal
...
Nobody is connecting to this signal. And nobody
should.
2019-02-26 08:02:31 -05:00
Matthias Clasen
c5c75f338e
container: Remove the ::set-focus-child signal
...
Nobody is connecting to this signal. And its
better that way.
2019-02-26 08:02:25 -05:00
Bastien Nocera
14890fad47
window: Warn when gtk_window_present_with_time() is passed 0
...
When 0 or GDK_CURRENT_TIME is passed to gtk_window_present_with_time(),
print a warning so that the application developer knows that this isn't
a supported use of the function, but carry on working for now.
2019-02-25 17:38:08 +01:00
Bastien Nocera
5a6a7b50af
all: Don't warn about deprecated gtk_window_present usage
...
Avoid compilation warnings about internal users of gtk_window_present().
2019-02-25 17:38:08 +01:00
Bastien Nocera
8438880906
window: Deprecate gtk_window_present()
...
And expect gtk_window_present_with_time() to be used instead.
2019-02-25 17:38:08 +01:00
Matthias Clasen
9335cde8e8
entry: Make placeholder-text work again
2019-02-25 09:21:56 -05:00
Matthias Clasen
d3c45cb979
docs: Miscellaneous doc fixes
...
Additions and correction all over the place,
in GDK and GTK docs.
2019-02-24 16:53:12 -05:00
Matthias Clasen
eb1310effe
docs: Remove a mention of Gtkinvisible
2019-02-24 10:40:17 -05:00
Matthias Clasen
edc4f954c6
Revert "inspector: Make picking work again"
...
This reverts commit 5dbfb18d11
.
Inspector picking no longer requries this.
2019-02-24 09:46:46 -05:00
Matthias Clasen
c35554cf68
Drop GtkInvisible
...
It was already private, and the previous commit removed
the last use.
2019-02-24 09:41:13 -05:00
Matthias Clasen
9861887f1a
inspector: Avoid grabs for inspecting
...
Instead of using a grab on a GtkInvisible, use
a hook in the GTK event propagation machinery to
get events.
The only downside of this approach is that we
lose the crosshair cursor. But we get rid of
the last use of GtkInvisible.
2019-02-24 09:41:13 -05:00
Matthias Clasen
3ae31b0e79
notebook: Document new apis
...
This silences gi build warnings.
2019-02-23 23:26:59 -05:00
Matthias Clasen
06df7e6f2c
transform: Fix a wrong annotation
...
It is (out caller-allocates), not (out) (caller-allocates).
2019-02-23 23:21:32 -05:00
Matthias Clasen
cc216c9e84
Remove gdk_surface_set_user_data
...
Change gdk_surface_get/set_user_data to private
API and rename them to get/set_widget.
Also remove an unused associated function.
The last two places where the surface API is used
are in gtkroot.c and gtkwidget.c. Make them
use the private api.
2019-02-23 22:24:50 -05:00
Matthias Clasen
704e377fae
inspector: Stop using gdk_surface_get_user_data
...
Use gtk_root_get_for_surface instead.
2019-02-23 22:24:50 -05:00
Matthias Clasen
12663d2844
tooltip: Stop using gdk_surface_get_user_data
...
Use gtk_root_get_for_surface instead.
2019-02-23 22:24:50 -05:00
Matthias Clasen
4e8aa0c37a
main: Stop using gdk_surface_get_user_data
...
Use gtk_root_get_for_surface instead.
2019-02-23 22:24:50 -05:00
Matthias Clasen
ea4f552d50
xim: Stop using gdk_surface_get_user_data
...
Use gtk_root_get_for_surface instead.
2019-02-23 22:24:50 -05:00
Matthias Clasen
2501152842
ime: Stop using gdk_surface_get_user_data
...
Use gtk_root_get_for_surface instead.
2019-02-23 22:24:50 -05:00
Matthias Clasen
a13d8501d4
Add gtk_root_get_for_surface
...
This is a replacement for gdk_surface_get_user_data.
2019-02-23 22:24:50 -05:00
Matthias Clasen
5dbfb18d11
inspector: Make picking work again
...
This was broken by the change in 01f7f255b5
which
caused the inspector to not get any events anymore.
Revert that part, even though it may be technically
correct.
2019-02-23 18:23:42 -05:00
Matthias Clasen
cc2c39209c
Stop using gdk_event_handler_set
...
We no longer need it.
2019-02-23 14:13:57 -05:00
Matthias Clasen
d633beaccd
widget: Connect to GdkSurface::event
...
This lets us handle input events the same way
we do expose events.
2019-02-23 14:13:57 -05:00
Matthias Clasen
89470ab201
Document that root and unroot must chain up
...
I overlooked this at first.
2019-02-23 09:43:57 -05:00
Matthias Clasen
a3901f2563
Drop the anchored field
...
We can just change priv->root instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
5dd0863bd7
widget: Drop ::hierarchy-changed
...
It is no longer used and has been replaced by the
root and unroot vfuncs.
2019-02-23 09:43:57 -05:00
Matthias Clasen
3ccbcf9f55
menu bar: Stop using ::hierarchy-changed
...
Use the root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
ef5108c89f
label: Stop using ::hierarchy-changed
...
Use the new root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
0230a7b1e5
header bar: Stop using ::hierarchy-changed
...
Use the root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
55337c588c
file chooser: Stop using ::hierarchy-changed
...
Use the root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
9e231f6333
popover: Stop using ::hierarchy-changed
...
Use notify::root instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
3ebf19b783
text handle: Stop using ::hierarchy-changed
...
Use notify::root instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
9591d40742
xim: Stop using ::hierarchy-changed
...
Use notify::root instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
de6132a158
ime: Stop using ::hierarchy-changed
...
We don't need it at all here.
2019-02-23 09:43:57 -05:00
Matthias Clasen
ddb52a5b5e
drag dest: Stop using ::hierarchy-changed
...
Use notify::root instead.
2019-02-23 09:43:57 -05:00
Matthias Clasen
47249431e3
inspector: Stop using ::hierarchy-changed
...
Use the new root and unroot vfuncs instead.
2019-02-23 09:43:57 -05:00
Timm Bäder
e54ce8f328
treeview: Don't assume search widget is a GtkEntry
...
Maybe it's a GtkText!
2019-02-23 04:42:01 +01:00
Chun-wei Fan
8d987be673
Merge branch 'wip/fanc999/meson.msvc' into 'master'
...
GTK+ 4: Improve Windows/Visual Studio build experience
See merge request GNOME/gtk!185
2019-02-23 02:13:35 +00:00
Matthias Clasen
445dca42f5
widget: Remove ::event leftovers
...
The signal is long gone, no need for this unused
vfunc anymore.
2019-02-22 20:06:06 -05:00
Matthias Clasen
c53e9ed6aa
search/password entry: Prevent expand leaks
...
We don't want the entry to expand, we just want
the text to expand inside the box, so explicitly
unset expand flags on the box.
2019-02-22 15:55:05 -05:00
Matthias Clasen
2b9436b279
search entry: Use a GtkEntryAccessible
...
This preserves the status quo of a11y support
for entry variations.
2019-02-22 15:50:45 -05:00
Matthias Clasen
bd99ae3767
entry accessible: Make work with almost-entries
...
This is not perfect, but gives a quick way to have
an accessible that can be used for password and
search entries.
2019-02-22 15:49:47 -05:00
Matthias Clasen
0e603a6646
search entry: Don't force-create the accessible
...
We can just set the accessible name when the
accessible is actually needed.
2019-02-22 14:12:52 -05:00
Timm Bäder
9d0e8b85c1
inspector: Fix an uninitialized value warning
2019-02-22 19:22:58 +01:00
Matthias Clasen
beb8d362ff
overlay: Remove gtk_overlay_set_overlay_pass_through
...
gtk_overlay_set_overlay_pass_through has been made
redundant by gtk_widget_set_can_pick. Remove it.
2019-02-21 21:57:43 -05:00
Matthias Clasen
2e5ccce088
Make gtk_widget_set/get_can_pick public
...
This is a generally useful property to make widgets
'transparent' for input purposes.
2019-02-21 21:53:34 -05:00
Matthias Clasen
f57e66cf37
overlay: Drop the index child property
...
And don't allow reordering children.
2019-02-21 19:43:33 -05:00
Matthias Clasen
1818f5589d
overlay: Drop the blur support
...
This was really just a demo of what gsk can do.
It can be done with public api, and has been moved
to gtk-demo.
2019-02-21 19:39:42 -05:00
Matthias Clasen
6711aa2a4e
More css key bindings removal
...
One more :(
2019-02-21 17:36:29 -05:00
Matthias Clasen
ae47ec1c3b
more css keybinding removal
2019-02-21 17:22:37 -05:00
Benjamin Otte
46cb221220
Remove support for -gtk-key-bindings: css property
...
This is no longer used.
2019-02-21 21:49:09 +01:00
Matthias Clasen
b64f852d60
Remove docs for css keybindings
...
This functionality has been removed.
2019-02-21 13:56:56 -05:00
Matthias Clasen
12442bd1bf
Remove support for -gtk-key-bindings: css property
...
This is no longer used.
2019-02-21 13:56:56 -05:00
Timm Bäder
0ae7c30105
Add & use GTK_CSS_AFFECTS_TRANSFORM
...
This avoids invalidating the size of all widgets when updating CSS
transforms.
In theory, we don't even have to allocate the widget itself, because we
didn't change its size. But we have no way to track that.
2019-02-21 19:47:28 +01:00
Timm Bäder
fd318a17a4
widget: Apply CSS transform in gtk_widget_allocate()
2019-02-21 19:47:28 +01:00
Timm Bäder
e2b9f3258e
css: Add transform style property
2019-02-21 19:47:28 +01:00
Benjamin Otte
ad58dd5cf5
csstransform: Create a GtkTransform
...
Stop creating graphene_matrix_t's.
2019-02-21 19:47:28 +01:00
Benjamin Otte
4052bb2535
snapshot: Remove the old APIs
...
It's all using transforms now.
2019-02-21 19:47:28 +01:00
Benjamin Otte
d8482edaf5
layoutoverlay: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
baefee17c5
fpsoverlay: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
751ef5b5b9
widgetpaintable: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
5965ead5a7
widget: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
5fc446dabf
treeview: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
70100d888a
textview: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
380c4ece8d
stylecontext: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
6df2023e9d
stack: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
f59f4d774b
scaler: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
a881cbff3a
rendernodepaintable: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
5b10a2929e
rendericon: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
b0eceb65d7
renderbackground: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
6e19fb7b36
picture: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
b96e835d9e
magnifier: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
65174c7989
image: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
f0795a795b
iconview: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
a5a7cdd84b
iconhelper: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
6cb8f638d1
cellrenderertoggle: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
50e66d5c0d
cellrendererpixbuf: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
efd92f7a9e
calendar: Use new snapshot transforms
2019-02-21 19:47:28 +01:00
Benjamin Otte
51fac44ba5
snapshot: Introduce transform APIs
...
Instead of gtk_snapshot_offset(), provide a full set of functions
kept in sync with GtkTransform APIs.
On top of that, add gtk_snapshot_save() and gtk_snapshot_restore()
mirroring cairo_save()/restore() that allow saving a snapshot's
transform state.
2019-02-21 19:47:28 +01:00
Benjamin Otte
2bdc0748e5
snapshot: Remove gtk_snapshot_get_offset()
...
We use append() functions for everything now, thank you very much.
2019-02-21 19:47:28 +01:00
Benjamin Otte
1ef250f44a
snapshot: Add functions to append shadows
2019-02-21 19:47:28 +01:00
Benjamin Otte
0d119f81c8
snapshot: Refactor text rendering
...
The code didn't change, it was just shuffled around to make the
with_bounds() versions of the text rendering unnecessary and instead
pass through the generic append_node() path.
2019-02-21 19:47:28 +01:00
Benjamin Otte
e1570e9ebc
snapshot: Add gtk_snapshot_append_border()
...
This is adding functions for the remaining render nodes.
2019-02-21 19:47:28 +01:00
Benjamin Otte
4a293aa762
snapshot: Store an actual GtkTransform
...
Instead of just tracking 2 integer translate_x/y coordinates, tracka a
full GtkTransform.
When creating actual nodes, if the transform is simple enough, just
create the node in a way that makes use of the transform. If the
node, can't represent the transform, just push a transform node instead
and automatically pop that node with the next gtk_snapshot_pop() call.
2019-02-21 19:47:28 +01:00
Benjamin Otte
f0142b9c4b
snapshot: Remove dead code
...
Seems to be leftovers from way too long ago.
2019-02-21 19:47:28 +01:00
Benjamin Otte
6a4bf2b993
gsk: Remove offset nodes
...
They were a neat idea while they lasted. But now, it's time for
categorized transform nodes, where matrices with
GSK_MATRIX_CATEGORY_2D_TRANSLATE are the exact replacement.
Renderers have not been adapted for this purpose, so they (continue to)
run slow paths.
2019-02-21 19:47:28 +01:00
Benjamin Otte
f5b44c11c8
widget: Store category of widget transform
...
And pass that category through to the transform node that we create for
it.
2019-02-21 19:47:28 +01:00
Benjamin Otte
c24f32619f
widget: Make gtk_widget_allocate() take a GtkTransform
...
We can reason about GtkTransform way better - and determine its category or
do equality checks.
2019-02-21 19:47:27 +01:00
Benjamin Otte
49d83820a2
gtk: Add GtkTransform
...
This is a new object (well, boxed type, but I'm calling it object) for
dealing with transform in a more constructive way than graphene_matrix_t
by keeping track of how the transform was created.
This way, reasoning about the transform becomes easier, and we can create
better ways to print it or transition from one transform to another one.
An example of this is that while a 0 degree and a 360degree rotation are
both the identity matrix, doing a transition between the two would cause
a rotation.
2019-02-21 19:47:27 +01:00
Benjamin Otte
70a1233a28
gsk: Add GskMatrixCategory
...
We'll use that soon.
2019-02-21 19:47:27 +01:00
Matthias Clasen
96fa1fb5c1
Drop key themes
...
These were an abuse of css, and not very successful
as a concept. We are going to replace bindings with
a new way of doing customizable shortcuts.
2019-02-21 12:22:50 -05:00
Piotr Drąg
ffee2d4567
window: Rename GTK+ Inspector in user-visible strings
2019-02-21 17:49:44 +01:00
Piotr Drąg
8e97dc03de
assistant: Fix typo in a translatable string
2019-02-21 13:28:37 +01:00
Matthias Clasen
f95ed63b88
Merge branch 'nbpage' into 'master'
...
Notebook child metas
See merge request GNOME/gtk!594
2019-02-21 05:50:05 +00:00
Matthias Clasen
0961fe7a55
notebook: Fix up issues with property notification
2019-02-21 00:31:17 -05:00
Matthias Clasen
66b6824876
print dialog: Use notebook pages in ui file
...
This is the new way of doing things.
2019-02-21 00:31:17 -05:00
Matthias Clasen
0fe1091ba8
builder-tool: Rewrite notebooks
...
Just like we do for assistant and stack pages, rewrite
notebooks from child properties to child metas.
2019-02-21 00:31:17 -05:00
Matthias Clasen
f64b0a705e
Implement position property somewhat
2019-02-21 00:31:17 -05:00
Matthias Clasen
c1ad7217b5
notebook: Fix up ref counting
...
We need to keep a ref to the page objects.
2019-02-21 00:31:17 -05:00
Matthias Clasen
f11d0118a3
notebook: Add a pages model
...
Just like GtkStack and GtkAssistant, provide
a list model with the page objects.
2019-02-21 00:31:17 -05:00
Matthias Clasen
7f8ba95db5
Allow builder to add notebook pages
2019-02-21 00:31:17 -05:00
Matthias Clasen
ff4b3f1170
Turn labels into page properties
2019-02-21 00:31:17 -05:00
Matthias Clasen
78c54b27d7
Add GtkNotebookPage properties
2019-02-21 00:31:17 -05:00
Matthias Clasen
85fb368834
Make GtkNotebookPage an object
2019-02-21 00:31:17 -05:00
Matthias Clasen
0e29408215
notebook: Rename an internal macro
...
Avoid a clash between GObject boilerplate and the
GTK_NOTEBOOK_PAGE() macro, by renaming it.
2019-02-21 00:31:17 -05:00
Matthias Clasen
3df4d1440a
assistant: Remove weak pointer in finalize
...
Otherwise, bad things can happen later, if
somebody holds onto the list model.
2019-02-21 00:31:17 -05:00
Matthias Clasen
103637f3b9
text: Remove has-frame leftovers
2019-02-21 00:30:48 -05:00
Matthias Clasen
74f4aecef5
text: Make this a final class
...
No need to derive from it.
2019-02-20 13:11:17 -05:00
Matthias Clasen
2e9c7d0744
search entry: Quiet a compiler warning
2019-02-20 13:10:09 -05:00
Matthias Clasen
2e94891a6f
Merge branch 'wip/jimmac/unbreak-spinbuttons' into 'master'
...
Adwaita,HC: spinbutton selectors
See merge request GNOME/gtk!592
2019-02-20 18:04:16 +00:00
Matthias Clasen
b9a41a903b
Merge branch 'wip/carlosg/fix-search-entry' into 'master'
...
Fix search bars
See merge request GNOME/gtk!593
2019-02-20 17:02:15 +00:00
Carlos Garnacho
b741d36ced
inspector: Update callback to GtkText shuffling
...
Instead of trying to access the GtkText, use GtkEditable API.
2019-02-20 16:41:39 +01:00
Matthias Clasen
82bde1e10a
text: Remove the ::has-frame property
...
This is purely GtkEntry functionality and should
remain there.
2019-02-20 10:34:42 -05:00
Matthias Clasen
eb8b1095c8
emoji chooser: Don't use entry api on search entries
...
Use editable api, and cut through to the text widget
where necessary.
2019-02-20 10:32:12 -05:00
Matthias Clasen
b303c20570
search entry: Add private api to get the text widget
...
We need this to do some custom setup in the Emoji chooser.
2019-02-20 10:29:26 -05:00
Jakub Steiner
4dd7eb40a3
Adwaita,HC: spinbutton selectors
...
- spinbuttons use GtkText for the entry part
- FIXME: vertical spinbuttons need the flat class dropped so we can
extend the entry class easily
2019-02-20 14:08:44 +01:00
Carlos Garnacho
19bf937401
eventcontrollerkey: Use run_controllers() API to forward key events
...
All 3 phases are run ATM, but just on the specific widget.
2019-02-20 13:16:07 +01:00
Carlos Garnacho
9ca392b38d
gtkwidget: Expose gtk_widget_run_controllers() in private header
...
Allows for more fine grained access than gtk_widget(_captured)_event
which are meant to work across a hierarchy.
2019-02-20 13:16:07 +01:00
Carlos Garnacho
c739071d31
gtksearchentry: Forward captured events to the child GtkText
...
Catch up with the GtkEditable shuffling.
2019-02-20 13:15:16 +01:00
Carlos Garnacho
120ee17e09
gtksearchbar: Do not handle captured events for unmapped bars
...
If the bar is currently unmapped, it should not attempt to capture
and handle events.
Related: https://gitlab.gnome.org/GNOME/gtk/issues/1205
2019-02-20 13:15:16 +01:00
Benjamin Otte
02e856f62e
widget: Mark compute functions as G_GNUC_WARN_UNUSED_RESULT
...
Lots of code does not error-check these functions, and when we add CSS
transforms, they will start failing. And we want people to check that.
2019-02-20 05:26:39 +01: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
Benjamin Otte
514c3679dc
widget: Always set out value
...
Don't leave memory in an unitinialized case when returning FALSE from
gtk_widget_compute_transform().
We both know that people are going to call that function without
checking the return value.
2019-02-20 04:07:34 +01:00
Benjamin Otte
8fbfa955de
widget: Fail if matrix not invertible
2019-02-20 04:05:37 +01:00
Benjamin Otte
cfc7dc016e
widget: Add optimizations to gtk_widget_compute_transform()
...
Try to catch 2 common cases with as little work as necessary.
2019-02-20 04:04:29 +01:00
Benjamin Otte
8222631d63
widget: Clean up gtk_widget_compute_transform()
...
The code was all over the place and being clear here is very useful.
2019-02-20 03:48:41 +01:00
Matthias Clasen
93b47c12d7
Fix gtk_widget_compute_transform
...
We were collecting all the transforms from widget
up to ancestor, and then trying to collect the
ones from target to ancestor, but failing.
2019-02-19 19:31:16 -05:00
Benjamin Otte
9a8082bab2
widget: Remove gtk_widget_get_allocated_size()
...
Use gtk_widget_get_allocated_width/height in the only user (GtkStack),
even though that isn't 100% correct.
2019-02-19 19:29:58 +01:00
Benjamin Otte
e223f16aa9
widget: Add gtk_widget_compute_point()
...
It's the replacement for gtk_widget_translate_coordinates()
2019-02-19 19:22:10 +01:00
Benjamin Otte
dead174d70
Remove nonexisting function from header
2019-02-19 19:22:10 +01:00
Timm Bäder
e922ec1839
widget: Compute child point directly when picking
2019-02-19 19:22:10 +01:00
Timm Bäder
63a23ed0da
widget: Remove unused function
2019-02-19 19:22:09 +01:00
Timm Bäder
2ecb4003be
widget: Avoid some type checks in pick() and contains()
...
We've already verified that the given pointer is a proper GtkWidget, so
no need to do it all over again.
2019-02-19 19:22:09 +01:00
Timm Bäder
a953fd762e
widget: Add typecheck-less _is_sensitive
...
It adds up to a whopping 3% in gtk_widget_pick
2019-02-19 19:22:09 +01:00
Timm Bäder
dbf0654e5b
widget: Add gtk_widget_compute_transform
2019-02-19 19:22:09 +01:00
Timm Bäder
4529f52c02
widget: Use CSS boxes in gtk_widget_real_contains()
2019-02-19 19:22:09 +01:00
Matthias Clasen
63a8bd06a6
stack sidebar: Fix sorting
...
Fix sorting, by not sorting.
2019-02-19 11:23:28 -05:00
Matthias Clasen
7c6e3e31c7
Merge branch 'portal-session-state-master' into 'master'
...
Portal session state
See merge request GNOME/gtk!587
2019-02-19 12:35:14 +00:00
Matthias Clasen
d006ee65f5
application: Add a query-end signal
...
This lets us take just-in-time inhibitors, and makes
the session support a little more real.
2019-02-19 00:56:31 -05:00
Matthias Clasen
65e9d71da5
Application: Support sandboxed session state changes
...
React to the session-state in StateChanged signals from
the inhibit portal and call QueryEndResponse as appropriate.
2019-02-19 00:56:31 -05:00
Benjamin Otte
02bb364474
widget: Remove lefover debug code
...
According to someone involved with those lines, I suck at reviewing
their patches.
2019-02-19 06:50:34 +01:00
Matthias Clasen
9174616a17
Merge branch 'text' into 'master'
...
GtkEntry reshuffling
Closes #1483
See merge request GNOME/gtk!585
2019-02-19 05:45:44 +00:00
Matthias Clasen
0ef6c3afed
search entry: Add a tooltip to th clear icon
...
Similar to what we do for the caps-lock warning in the
password entry.
Closes #1483
2019-02-19 00:32:35 -05:00
Matthias Clasen
b299ac8dfa
Add editable delegate api to docs
...
And add a section that explains how to use these
functions when setting up a GtkEditable delegate.
2019-02-19 00:25:59 -05:00
Matthias Clasen
08bd6904b9
file chooser: Use editable api on the search entry
2019-02-19 00:25:59 -05:00