Commit Graph

20533 Commits

Author SHA1 Message Date
Matthias Clasen
aabc356b80 GtkMisc: Keep gtk_misc_set_alignment working
Now that labels and images no longer use x/yalign in their code,
we need to make gtk_misc_set_alignment set the h/valign for these
widgets, to keep it stumbling along until its final demise.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:48:12 -04:00
Matthias Clasen
1008e15414 GtkToolButton: Drop use of GtkMisc
Use h/valign instead of x/yalign.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:48:02 -04:00
Matthias Clasen
687eae4b51 GtkAssistant: Drop use of GtkMisc
Use halign instead of xalign.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:04:41 -04:00
Matthias Clasen
4d002d5e6a GtkAccelLabel: Drop use of GtkMisc
Just use 0 instead of xpad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:04:41 -04:00
Matthias Clasen
54d5b426fc GtkImage: Drop use of GtkMisc::x/yalign
Instead, use GtkWidget::h/valign to position the image inside
the allocation. And just stop using GtkMisc::x/ypad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:04:41 -04:00
Matthias Clasen
b320c198b6 GtkLabel: Drop use of GtkMisc::x/yalign
Instead, use GtkWidget::h/valign to position the text inside
the allocation. And just stop using GtkMisc::x/ypad.

https://bugzilla.gnome.org/show_bug.cgi?id=730613
2014-05-24 00:04:41 -04:00
Matthias Clasen
0011c9dae4 Fix filechooser actionbar visibility
The actionbar was always visible, even when there is no filter
and no extra widget to show. Now we only show it when there is
something to show.
2014-05-24 00:00:00 -04:00
Matthias Clasen
51a09af076 inspector: Treat resources the same as in gtk/ 2014-05-23 23:00:43 -04:00
Matthias Clasen
00d02491d8 Drop no-longer-used gtkrc files
These were replaced by css files long ago.
2014-05-23 22:00:51 -04:00
Matthias Clasen
45e1128472 Drop a pointless function
No need to have a finalize function if it just chains
up to the parent class.
2014-05-23 21:56:44 -04:00
Matthias Clasen
716ecff28d Trivial: slight code rearrangement 2014-05-23 21:41:58 -04:00
Matthias Clasen
04703689b8 Deprecate GtkAligment
This has been dangling ever since 3.0.

https://bugzilla.gnome.org/show_bug.cgi?id=645781
2014-05-23 20:31:25 -04:00
Matthias Clasen
4928d5e401 Drop an unneeded include
There's no GtkGesture in gtkwidget.h anymore. We do need an include
in gtkwidgetprivate.h though.
2014-05-23 20:09:50 -04:00
Evan Nemerson
4a4b23bfad a11y: build directly into libgtk instead of an internal library
https://bugzilla.gnome.org/show_bug.cgi?id=730615
2014-05-23 19:20:59 -04:00
Carlos Garnacho
60e15deb83 spinbutton: Avoid touch text handles to pop up
Those get in the middle more than help on these widgets, the widget
is already packed with clickable areas and having handles (and their
invisible clickable area around) hovering above don't help, plus the
purpose in most likely numeric values is a bit doubtful.

All touch events are either consumed by the up/down panels, or
the swipe gesture, all GtkEntry handling of touch events on the text
window is avoided, so handles to not appear anymore.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
a4a122c8e8 colorswatch: Set gestures in GTK_PHASE_TARGET
That's the right phase for gestures replacing entirely event handlers.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
d59c909663 spinbutton: Use GTK_PHASE_CAPTURE for touch swipes
The gesture must be able to catch first events for it to be seen
as recognized in event handlers.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
01d74f86a0 widget: Flip execution order of GTK_PHASE_TARGET/BUBBLE
the "bubble" phase used to run before event handlers before GTK_PHASE_TARGET
was added, in order to keep phases in the expected order, move GTK_PHASE_BUBBLE
to be run (still invariably) after event handlers.

The only behavioral change should be wrt widgets wanting mixed event handler/
gesture handling, they could previously attach the gesture to the bubble phase
and check for gtk_gesture_is_active() in the event handler to bail out, they'll
have to use GTK_PHASE_CAPTURE for that purpose from now on.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
ca1510177c texthandle: Mind the invisible area when moving the handle
The handle is still centered horizontally, but the extra vertical
space wasn't taken into account, leading to misplacing the dragging
point (and the handle) during motion events.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
c9f54aef69 textview: Check first whether the sequence is handled, fetch later the event
And always unset/hide the selection popover if unhandled, that means the
sequence went grabbed/claimed somewhere else and cancelled here.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
f54277204f entry: Check first whether the sequence is handled, fetch later the event
And always unset/hide the selection popover if unhandled, that means the
sequence went grabbed/claimed somewhere else and cancelled here.
2014-05-23 19:54:33 +02:00
Carlos Garnacho
485da90a2e gesture: Use GdkEventSequence GType in signals 2014-05-23 19:54:33 +02:00
Carlos Garnacho
7e61216105 gesture: Introspection fixes
Set annotations on return values for gtk_gesture_get_device() and
gtk_gesture_get_window().
2014-05-23 19:54:33 +02:00
Carlos Garnacho
03a3b2ccab eventcontroller: introspection fix
Set transfer annotation on gtk_event_controller_get_widget()
2014-05-23 19:54:33 +02:00
Carlos Garnacho
5fdf07547f paned: Handle pointer events from touchscreen devices
GtkPaned may just capture pointer events because the child widget
doesn't happen to have GDK_TOUCH_MASK set, resort to checking the
device in that case.
2014-05-23 19:54:33 +02:00
Matthias Clasen
0442431943 Docs: Cosmetic fixes 2014-05-23 19:54:33 +02:00
Matthias Clasen
9f3f634c16 docs: Correct a reference 2014-05-23 19:54:33 +02:00
Matthias Clasen
c83d3f054b Revert "docs: More GtkEventController removal"
This reverts commit 75f503fb1fc9068c9e1a0d02126c55addbe8eb3e.
2014-05-23 19:54:32 +02:00
Matthias Clasen
ae5f930d1b Docs: Add information about event propagation 2014-05-23 19:54:32 +02:00
Matthias Clasen
aead8a360b Docs: Minor changes 2014-05-23 19:54:32 +02:00
Matthias Clasen
729a3a98d9 Document gtk_gesture_set_state 2014-05-23 19:54:32 +02:00
Matthias Clasen
01cd5cf382 docs: More GtkEventController removal 2014-05-23 19:54:32 +02:00
Carlos Garnacho
681164564e paned: Use GtkGesture to handle handle dragging
Dragging is all handled by a GtkGesturePan now, matching the
paned orientation.

On touch events, a wider area is listened for, so touch events
don't need to be as accurate to initiate dragging, if no dragging
is truly initiated in this case, events are just forwarded for
child widgets to handle.
2014-05-23 19:54:32 +02:00
Carlos Garnacho
8f20780fb9 switch: Use GtkGesture to handle input events
A pan gesture is used to handle switch dragging, which is only triggered
by horizontal panning movements. A multipress gesture handles the cases
where clicking without dragging happens, just toggling the switch.
2014-05-23 19:54:32 +02:00
Matthias Clasen
a47d0406a7 inspector: Add more complete gesture support
Add a dedicated tab that shows how gestures are grouped,
and allows changing the propagation phase.
2014-05-23 19:54:32 +02:00
Matthias Clasen
1c5f14a9e4 inspector: Minimal support for gestures
We're just showing them as objects in the tree, for now.
2014-05-23 19:54:32 +02:00
Matthias Clasen
a727c41e4a Add back a private api to list controllers
This will let us show them in the inspector.
2014-05-23 19:54:32 +02:00
Carlos Garnacho
2ba89256f4 texthandle: Make a bigger hit area around texthandles
The hit area now extends to all sides around the handle, instead
of just towards where the text is. This makes it easier to grab
handles once shown.
2014-05-23 19:54:32 +02:00
Carlos Garnacho
f322e55e19 gesture: Declare GtkGesture:window as an object property 2014-05-23 19:54:32 +02:00
Carlos Garnacho
f81f00ed6b widget: 3-way merge ate my g_object_ref()
Move it to the right place.
2014-05-23 19:54:32 +02:00
Carlos Garnacho
d351c52114 scrolledwindow: Handle directional cancellation if there is a single scroll direction
A pan gesture is optionally attached if there is only one scrolling direction, the pan
gesture orientation is changed so movements tangential to the scroll direction get
scrolling cancelled (The pan gesture is automatically denied when that happens, and
that state change spreads to the others gestures in the group). If the pan direction
happens in the expected directions, no cancellation happens, and scrolling eventually
takes place.
2014-05-23 19:54:32 +02:00
Carlos Garnacho
57eca4f445 widget: remove check on whether the controller was already added
Multiple calls are supposedly allowed to change the phase (although
unlikely to happen), so remove the g_return_if_fail() checking whether
the controller was already added.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
bd68db4b25 pan: Remove wrong check
From the very early days where there were a NONE=0 GtkPanOrientation
value. This makes vertical pan operations work as expected.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
e70e3963dd entry: Ensure the cursor text handle is shown after touching to reposition cursor. 2014-05-23 19:54:31 +02:00
Carlos Garnacho
cf7bb9a3bf popover: Hide widget first when disposing
In order to ensure invariants are kept.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
15f7170358 entry: Obey implementations' frame when placing handles/popovers around
Y=0 was assumed in a few places, not necessarily right on eg. vertical
spinbuttons.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
10c47fa6d6 entry: Improve touch popover interaction
Presses alternatively show and dismiss the popover, the popover is still
always shown invariably after any dragging happens (either text selection,
or dragging a text handle)
2014-05-23 19:54:31 +02:00
Carlos Garnacho
bd5fb3a09f textview: Show the magnifier popover a bit farther from the touch position
Somewhat arbitrary at the moment, would be nice to have minimal units
support for this, or at least hidpi support.
2014-05-23 19:54:31 +02:00
Carlos Garnacho
b2d56c588a textview: Improve touch popover interaction
Presses alternatively show and dismiss the popover, the popover is still
always shown invariably after any dragging happens (either text selection,
or dragging a text handle)
2014-05-23 19:54:31 +02:00
Carlos Garnacho
e580c29f07 entry: Use gestures to handle pointer/touch events
Similarly to GtkTextView, a GtkGestureMultiPress gesture handles
button/touch presses to initiate one selection mode or other, and
a GtkGestureDrag is used to handle text selection and DnD checks.

The code from button press/release, motion, and grab_notify handlers
has been shuffled into the actions triggered by those gestures.
2014-05-23 19:54:31 +02:00