Carlos Garnacho
2d3882c7eb
gtklabel: Fix touch link handling under wayland
...
Refactor the code updating the active link under the current coordinates
into a separate function, and call it on GtkGestureMultiPress::pressed
so the link is updated on GDK_TOUCH_BEGIN. Based on a patch by
Jan-Michael Brummer <jan.brummer@tabos.org>.
https://bugzilla.gnome.org/show_bug.cgi?id=776903
2017-07-26 13:20:56 +02:00
Carlos Garnacho
21062fab02
gtklinkbutton: Set cursor on button's event window
...
It is not necessary to (re)set the cursor on every crossing
event, and can probably yield the wrong results if there are
multiple master devices involved. Just set it on init(), and
let the inner machinery update the cursor whenever necessary.
This patch is an adaption of commit 0daf79676
in gtk-3-22, the
side effects are not as bad here because the cursor was already
being set on the widget specifically instead of the parent
widget's, but there's still some nonetheless (plus, it's simpler)
https://bugzilla.gnome.org/show_bug.cgi?id=785375
2017-07-26 13:11:43 +02:00
Kjell Ahlstedt
e2744aa74f
actionbar: Call g_object_class_install_properties()
...
https://bugzilla.gnome.org/show_bug.cgi?id=785318
2017-07-25 10:35:29 +02:00
Matthias Clasen
ce801641a7
Avoid the use of g_autofree
...
We can't use this in code that may be built on win32,
so lets just not use it at all.
2017-07-24 13:27:29 -04:00
Timm Bäder
3f9bcf3b31
widget: Stop invalidating recursively
2017-07-24 14:32:06 +02:00
Timm Bäder
343f2d8c08
notebook: Set tabs child visible before allocating a size
...
Otherwise we might skip them here, then set child-visible to TRUE and
then later snapshot them even though they have no valid size.
2017-07-22 19:36:05 +02:00
Timm Bäder
3b44a88ddb
cssstylechange: Fix change printing
...
Only print the old value once, above the new one.
2017-07-22 19:36:05 +02:00
Timm Bäder
5afbde2632
flowbox: Fix get_child_at_pos
2017-07-22 06:52:46 +02:00
Chun-wei Fan
73e81b64b6
gtk/gtkprintoperation-win32.c: Don't call gtk_widget_set_allocation()
...
This function was removed recently.
https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:35:38 +08:00
Timm Bäder
e92eebb434
overlay: Fix child widget allocation
...
Just adding the overlay's own position is wrong now.
2017-07-20 12:40:46 +02:00
Timm Bäder
c3176ed302
overlay: Keep the main child at the bottom
...
Since gtk_bin_add does a gtk_widget_set_parent call, we cannot use it in
a GtkBin implementation that has multiple child widgets and cares about
their order.
2017-07-20 12:33:57 +02:00
Timm Bäder
f537d36d0a
GtkStyleContext: Create path node in _new
...
So we can avoid creating a GtkCssPathNode in _init and then throwing it
away right after when using the _new_with_node constructor, which is the
one we use for all widgets.
2017-07-19 21:27:16 -04:00
Timm Bäder
fc47be9339
GtkStyleContext: Remove property cache
...
It was only used for widget style properties which don't exist anymore.
2017-07-19 21:27:16 -04:00
Timm Bäder
9bf5def6b7
statusbar: Inherit from GtkWidget
2017-07-19 21:27:16 -04:00
Timm Bäder
4a4c7131fd
modelmenuitem: Care about GtkAccelLabel in get_text
2017-07-19 21:27:16 -04:00
Timm Bäder
8a26e8a6ba
modelmenuitem: Update indicator visibility when has_indicator changes
2017-07-19 21:27:16 -04:00
Timm Bäder
2f1d962e56
menushell: Hide model submenus by default
2017-07-19 21:27:16 -04:00
Timm Bäder
b1354a184b
GtkCheckMenuItem: Remove snapshot-indicator vfunc
...
Let the widget snapshot all child widgets and control the visibility of
those child widgets instead.
2017-07-19 21:27:16 -04:00
Timm Bäder
ed5192497f
label: Remove GtkEventBox mention from docs
...
Packing the label inside a GtkEventBox is not necessary anymore for it
to receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
584d613bfd
image: Remove irrelevant code sample
...
Both the description and the sample itself are obsolete or uninteresting
now that all widgets can receive events.
2017-07-19 21:27:16 -04:00
Timm Bäder
d31621256d
spinbutton: Fix css node docs
2017-07-19 21:27:16 -04:00
Timm Bäder
2c3ec49535
treeview: Fix row drag icon offsets
2017-07-19 21:27:16 -04:00
Timm Bäder
d836fa5134
treeviewcolumn: Remove input window
2017-07-19 21:27:16 -04:00
Timm Bäder
bd446c48e9
spinbutton: expand the entry
...
It's supposed to fill the entire spinbutton allocation apart from the
buttons
2017-07-19 21:27:16 -04:00
Timm Bäder
efccff70b7
Adwaita: Set minimum size for modelbutton arrows
...
Otherwise the minimum size is 1×1.
2017-07-19 21:27:16 -04:00
Timm Bäder
348871d9fc
Fix a few testsuite failures
...
Adjust default property values, skip GtkRange:adjustment.
2017-07-19 21:27:16 -04:00
Timm Bäder
5720f2a845
widget: Make _set_clip private
...
We don't need this anymore since clips are now reported in
size-allocate.
2017-07-19 21:27:16 -04:00
Timm Bäder
28dae5f1c2
checkmenuitem: Don't always snapshot the indicator
...
Chaining up will snapshot all child widgets, which doesn't work with
GtkModelMenuItem.
2017-07-19 21:27:16 -04:00
Timm Bäder
8358817ad1
applicationwindow: Remove some useless queue_resize calls
...
The gtk_widget_{set_parent,unparent} calls before will already cause a
resize when necessary.
2017-07-19 21:27:16 -04:00
Timm Bäder
308f41487d
modelmenuitem: Set label on menu items
...
We have to add a check for GTK_IS_ACCEL_LABEL too now...
2017-07-19 21:27:16 -04:00
Timm Bäder
5116ce19b7
widget: Remove queue_draw_region vfunc
...
Unused
2017-07-19 21:27:16 -04:00
Timm Bäder
65209da486
widget: Set :focus on focus children
2017-07-19 21:27:16 -04:00
Timm Bäder
d7056f5d22
revealer: Explain CSS oddities
2017-07-19 21:27:16 -04:00
Timm Bäder
36ab70ddf5
widget: Add baseline and out_clip parameters to size-allocate
...
Since setting a clip is mandatory for almost all widgets, we can as well
change the size-allocate signature to include a out_clip parameter, just
like GtkCssGadget did. And since we now always propagate baselines, we
might as well pass that one on to size-allocate.
This way we can also make sure to transform the clip returned from
size-allocate to parent-coordinates, i.e. the same coordinate space
priv->allocation is in.
2017-07-19 21:27:16 -04:00
Timm Bäder
95bd58ac00
widget: Don't propagate size-allocate if only the position changed
...
We can do this now so we should
2017-07-19 21:27:15 -04:00
Timm Bäder
2e6b1158ee
widget: Fix priv dereference in size_allocate_with_baseline
...
Accessing ->priv is only safe *after* the GTK_IS_WIDGET precondition, so
use the get_instance_private function instead.
2017-07-19 21:27:15 -04:00
Timm Bäder
6d9a0d432a
widget: Fix a widget/container mixup
2017-07-19 21:27:15 -04:00
Timm Bäder
3aeaeef070
window: Fix resizing with solid-csd
...
We can't use a 20px resize handle in that case so fall back to the
padding area of the window. Still ugly but it works.
2017-07-19 21:27:15 -04:00
Timm Bäder
edf0aeb92e
gtkapplication: g_dbus_proxy_new_sync can return NULL
...
Specifically, in the case where @error is set.
2017-07-19 21:27:15 -04:00
Timm Bäder
5fb27e2bd7
window: Fix annotations in get_size and get_position
2017-07-19 21:27:15 -04:00
Timm Bäder
0ebd8840a8
widget: Remove gtk_cairo_transform_to_window
...
Useless in a world without windows and cairo.
2017-07-19 21:27:15 -04:00
Timm Bäder
f637006b3e
popover: Add a contents node
...
Remove the special case in gtkwidget.c where we didn't draw any css
background/border for popovers. Instead, rely on themes to not style the
popover node and add a contents gizmo that gets the actual css styling.
We then requeste enough space for the popover to draw both the contents
and the arrow on the side.
2017-07-19 21:27:15 -04:00
Timm Bäder
097ab2baed
widget: Draw css box after pushing a opacity node
2017-07-19 21:27:15 -04:00
Timm Bäder
e2e91bf9bc
Fix a few documentation issues
2017-07-19 21:27:15 -04:00
Timm Bäder
eb34c68ff4
widget: Move get_resize_needed to gtkwidget.c
...
It's only used in there so we don't need it in the private header.
2017-07-19 21:27:15 -04:00
Timm Bäder
831bcc5e0d
notebook: Allocate unmapped tabs
2017-07-19 21:27:15 -04:00
Timm Bäder
c4f6cea111
fix a few documentation problems
2017-07-19 21:27:15 -04:00
Timm Bäder
23f90e3d67
centerbox: Add some missing return value annotations
2017-07-19 21:27:15 -04:00
Timm Bäder
1e4d11b995
box: Ignore baselines when vertical
...
For now.
2017-07-19 21:27:15 -04:00
Timm Bäder
68c35bbe15
bbox: Don't report a horizontal baseline
2017-07-19 21:27:15 -04:00
Timm Bäder
f0d6cb5f40
widget: Propagate correct baseline
2017-07-19 21:27:15 -04:00
Timm Bäder
e19e3b72a3
widget: Always pass on baselines
2017-07-19 21:27:15 -04:00
Timm Bäder
fb2bb87bb1
widget: Simplify snapshot_child
2017-07-19 21:27:15 -04:00
Timm Bäder
55389cd97c
entry: Fix baseline alignment
...
Since we only look at priv->text_baseline later on, it would be useful
to actually set it to a useful value.
2017-07-19 21:27:15 -04:00
Timm Bäder
0726148ca5
widget: Draw debug nodes for widget margins too
2017-07-19 21:27:15 -04:00
Timm Bäder
fa5203e700
widget: Fix copy&paste error when creating debug nodes
2017-07-19 21:27:15 -04:00
Timm Bäder
6a7d903612
sizerequest: Add more assertions for baselines
...
min baselines must be <= natural baselines and both must lie inside the
content size of the widget.
2017-07-19 21:27:15 -04:00
Timm Bäder
cef4df1e7e
widget: Unset PRELIGHT and ACTIVE state flags in unmap
2017-07-19 21:27:15 -04:00
Timm Bäder
1dd716e66f
button: Reset in_button state in unmap
...
Since at that point the point is clearly not in the button anymore.
2017-07-19 21:27:15 -04:00
Timm Bäder
e276f1e844
label: Fix get_layout_index
...
Properly translate the given coordinates to layout coordinates. Fixes
clicking links and selecting text.
2017-07-19 21:27:15 -04:00
Timm Bäder
dd9c3fc8ab
textview: Invalidate entire widget
2017-07-19 21:27:15 -04:00
Timm Bäder
dc473b4180
textview: Remove size_changed check in size-allocate
...
It's broken and we only hit size-allocate when the size changes anyway.
2017-07-19 21:27:15 -04:00
Timm Bäder
f7bc5fcae3
linkbutton: Remove useless unrealize implementation
2017-07-19 21:27:15 -04:00
Timm Bäder
c8ca43ad51
stack: Fix under transitions
...
make sure we initialize both width and height with proper values.
2017-07-19 21:27:15 -04:00
Timm Bäder
2c958df789
eventbox: Remove window
2017-07-19 21:27:15 -04:00
Timm Bäder
82eafb8a2c
centerbox: Avoid accessing unset widgets
2017-07-19 21:27:15 -04:00
Timm Bäder
d832001baa
textview: Use correct size for cairo node bounds
2017-07-19 21:27:15 -04:00
Timm Bäder
451a991488
window: Move updates debugging to GtkWidget
...
Which has the necessary information.
2017-07-19 21:27:15 -04:00
Timm Bäder
995903e971
scale: Fix mark positions
...
Someone else will have to fix the css.
2017-07-19 21:27:15 -04:00
Timm Bäder
4eba9442df
range: Fix get_range_rect
...
get_own_allocation's position is relative to the given widget's origin,
not the parent.
2017-07-19 21:27:15 -04:00
Timm Bäder
468e75e43d
range: Fix mark positions
...
The values returned by gtk_range_compute_slider_position are relative
to the trough_widget (the slider's parent), not the slider widget
itself.
2017-07-19 21:27:15 -04:00
Timm Bäder
ed5b7fedb8
scale: Remove custom indicator drawing
...
it's a css node so we can simply use the background instead of the
foreground color in the theme.
2017-07-19 21:27:15 -04:00
Timm Bäder
5bb355f06f
scale: Fix mark indicator allocations
2017-07-19 21:27:15 -04:00
Timm Bäder
a8561bcc99
headerbar: don't measure own size
...
This is fallout from an earlier commit, we should be checking the
child's size of course, not repeatedly the headerbar's.
2017-07-19 21:27:15 -04:00
Timm Bäder
e25e1c54a4
levelbar: Don't underallocate block widgets
2017-07-19 21:27:15 -04:00
Timm Bäder
993998085f
range: Avoid division by zero
2017-07-19 21:27:15 -04:00
Timm Bäder
4b0da8682d
popover: set the shape on the correct window
...
the parent window is now the toplevel's window.
2017-07-19 21:27:15 -04:00
Timm Bäder
d25af7ce10
switch: Put the slider node last
...
Makes sense since we draw it over both labels. Also make this obvious by
using the default snapshot implementation.
2017-07-19 21:27:15 -04:00
Timm Bäder
4fb2fc7d89
drawingarea: Remove useless line from code example
...
backgrounds are drawn automatically now.
2017-07-19 21:27:15 -04:00
Timm Bäder
3dc6d240b3
Fix a few allocation coordinates & sizes
2017-07-19 21:27:15 -04:00
Timm Bäder
2c2867d45d
entry: Fix undershoot position
2017-07-19 21:27:15 -04:00
Timm Bäder
6f7387cd25
paned: Fix clip node coordinates
2017-07-19 21:27:15 -04:00
Timm Bäder
aa5cb1648c
adwaita: Adjust entry progress styling
...
Now that the entry>progress node is a full GtkProgressBar, we need to
apply the style to its trough>progress node.
2017-07-19 21:27:15 -04:00
Timm Bäder
84c00d18bb
entry: Simplify progress size allocation
2017-07-19 21:27:15 -04:00
Timm Bäder
f520700b13
calendar: Remove all input windows
...
and simultaneously fix input! \o/
2017-07-19 21:27:15 -04:00
Timm Bäder
3fc49ce8a1
entry: Fix text position
...
We need to adjust the layout coordinates depending on priv->text_x,
sinec that one accounts for the width of the left icon.
2017-07-19 21:27:15 -04:00
Timm Bäder
a0f3497939
treeview: Remove bin_window
2017-07-19 21:27:15 -04:00
Timm Bäder
26e1491c70
label: Use the correct size in snapshot()
2017-07-19 21:27:15 -04:00
Timm Bäder
3252630a4b
aboutdialog: Remove unused image
2017-07-19 21:27:15 -04:00
Timm Bäder
42aa7453ab
Fix baselines wrt css values
...
The reported minimum baseline is for the reported min height, but if the
css min-height is greater than that, we need to account for that fact
when saving the baseline.
Since the reported baseline is relative to the widget's origin, we also
need to add the top values for margin, border and padding to the
reported baseline.
2017-07-19 21:27:14 -04:00
Timm Bäder
ea3876d26a
widget: black is the new red
2017-07-19 21:27:14 -04:00
Timm Bäder
45c0439dd4
notebook: Fix css node ordering
...
Aaand all the unit tests pass again.
2017-07-19 21:27:14 -04:00
Timm Bäder
8dc5e13e8c
iconview: Remove bin_window
2017-07-19 21:27:14 -04:00
Timm Bäder
fb1d2719d9
entry: Fix node ordering
...
Fix the icon order
2017-07-19 21:27:14 -04:00
Timm Bäder
a9f10a2d56
paned: Remove assertion in get_child_property
...
Passing the third child (the pane separator) is possible and shouldn't
cause the process to abort.
2017-07-19 21:27:14 -04:00
Timm Bäder
51e25aaff4
main: Protect against non-GtkWindow toplevels
2017-07-19 21:27:14 -04:00
Timm Bäder
5fbe26f396
inspector: Use GtkWidget::pick when picking widgets
2017-07-19 21:27:14 -04:00
Timm Bäder
f9f6f3027d
container: Remove get_children_clip
...
Unused.
2017-07-19 21:27:14 -04:00
Timm Bäder
27202ff6cb
stack: Compute clip directly
2017-07-19 21:27:14 -04:00
Timm Bäder
c0f6a97eed
buttonbox: Compute clip directly
2017-07-19 21:27:14 -04:00