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
Timm Bäder
7012950f9f
modelbutton: Compute clip directly
2017-07-19 21:27:14 -04:00
Timm Bäder
8645dd1030
flowbox: Compute clip directly
2017-07-19 21:27:14 -04:00
Timm Bäder
f1813e8f88
spinbutton: Fix gesture state
...
We claimed the gesture previously to keep it from propagating to the
underlying entry, but now that the entry is in a box with the two
buttons, we can do this properly and restore the previous long-press
behavior.
2017-07-19 21:27:14 -04:00
Timm Bäder
333b52bc14
checkmenuitem: Fix indicator state
...
We need to remove the inconsistent and checked state first so we
actually remove it.
2017-07-19 21:27:14 -04:00
Timm Bäder
bc4c32505a
menu: Popup at window coordinates if widget is given
...
Since widget allocations are now relative to the parent's origin, we
need to pass the window allocation here.
2017-07-19 21:27:14 -04:00
Timm Bäder
8dd29d755c
window: Don't use allocated size in snapshot
...
Those are the wrong values.
2017-07-19 21:27:14 -04:00
Timm Bäder
bda2f4f582
popover: Create subsurface on wayland
2017-07-19 21:27:14 -04:00
Timm Bäder
2cbaa998db
widget: Fix drawing invalidation with windowed widgets
...
E.g. popovers. Find the parent of the given widget with the window and
invalidate the given region in that window.
2017-07-19 21:27:14 -04:00
Timm Bäder
bc807789ba
popover: "Fix" child allocation
...
This is still wrong but will be fixed in the future.
2017-07-19 21:27:14 -04:00
Timm Bäder
79797cd162
window: Stop wrapping popovers in another window
...
GtkPopover is already a windowed widget.
2017-07-19 21:27:14 -04:00
Timm Bäder
c2abb698be
Replace a few get_content_allocation calls with get_content_size
...
The position of the content allocation is almost never relevant since
it's 0/0 for measure, size_allocate and snapshot.
2017-07-19 21:27:14 -04:00
Timm Bäder
e36ddfec17
Remove all widget style property code
2017-07-19 21:27:14 -04:00
Timm Bäder
cc60046ae9
treeviewaccessible: Don't rely on nonexistent style properties
...
The expander-size style property has been gone for a long time.
2017-07-19 21:27:14 -04:00
Timm Bäder
7b9b116ad6
adwaita: Remove style properties
...
They don't exist anymore.
2017-07-19 21:27:14 -04:00
Timm Bäder
07063d82aa
notebook: Remove style properties
...
Hardcode the default values until someone comes up with a proposal for a
better way.
2017-07-19 21:27:14 -04:00
Timm Bäder
61dd8f92b8
calendar: Remove style properties
...
Hardcode the default values until someone comes and fixes the actual
widget.
2017-07-19 21:27:14 -04:00
Timm Bäder
a826ee37ca
widget: Remove _set_simple_clip
...
Unused.
2017-07-19 21:27:14 -04:00
Timm Bäder
1535cab936
spinner: Use get_content_size
2017-07-19 21:27:14 -04:00
Timm Bäder
6b9d10039d
pathbar: Compute widget clip directly
...
Instead of relying on gtk_widge_set_simple_clip
2017-07-19 21:27:14 -04:00
Timm Bäder
f40c61fb40
toolitem: Remove size_allocate implementation
...
A GtkToolItem is a GtkBin and that already does exactly what this
implementation did.
2017-07-19 21:27:14 -04:00
Timm Bäder
1bad3e1f28
widget: Transform clips into right coordinate space
...
The values passed to gtk_widget_set_clip are relative to the widget's
origin, but we need the values to be relative to priv->allocation.
2017-07-19 21:27:14 -04:00
Timm Bäder
e501bc6028
paned: Draw handle separator at the right location
2017-07-19 21:27:14 -04:00
Timm Bäder
5228e018b6
paned: Make sure we set the correct clips
...
They are still too big, i.e. clipped-off children enlarge the paned's
clip but at least redrawing works and smaller clips are just an
optimization.
2017-07-19 21:27:14 -04:00
Timm Bäder
24abbac114
switch: Remove in_switch flag
...
It's pretty simple and less code to just check whether the gesture
coords are inside the widget at the one place where we actually used the
flag.
2017-07-19 21:27:14 -04:00
Timm Bäder
63ba8fa355
widget: Consider opacity when drawing toplevels
...
This used to work in gtk3 and is used e.g. in the inspector when using
wayland.
2017-07-19 21:27:14 -04:00
Timm Bäder
63158fd3ff
switch: Fix handle dragging with padding applied
...
We only move the handle inside the content allocation, so we need to use
the content width when calculating the new handle_pos.
2017-07-19 21:27:14 -04:00
Timm Bäder
a73d3418bc
layout: Remove bin_window
2017-07-19 21:27:14 -04:00
Timm Bäder
8123ea8f3f
fixed: Remove window
2017-07-19 21:27:14 -04:00
Timm Bäder
a4d2da76b3
button: Fix in_button checks
...
The gesture coords are relative to the button's origin, so use
gtk_widget_get_own_allocation to check if the coords are inside the
button.
2017-07-19 21:27:14 -04:00
Timm Bäder
12fdb19d63
expander: Fix pressed_in_title check
...
gesture coords are relative to the expander widget, the title allocation
is relative to the box child.
2017-07-19 21:27:14 -04:00