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
Matthias Clasen
37b841b59b
font chooser: Use editable api on search entry
2019-02-19 00:25:59 -05:00
Matthias Clasen
7d9e63ae38
app chooser: Use editable api on search entry
2019-02-19 00:25:59 -05:00
Matthias Clasen
b8c981fb2b
inspector: Work with new search entry
...
Don't assume a search entry is an entry, and
use the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
3a1a7c43f3
treeview: make search work
...
Make search work with both GtkEntry and GtkSearchEntry,
even if a GtkSearchEntry is not derived from GtkEntry
anymore.
2019-02-19 00:25:59 -05:00
Matthias Clasen
fa3d1940bf
search bar: Work with the new GtkSearchEntry
...
Don't assume a search entry is an entry, and use
the editable api as far as possible.
2019-02-19 00:25:59 -05:00
Matthias Clasen
667ea2dd42
search entry: Use a GtkText
2019-02-19 00:25:59 -05:00
Matthias Clasen
c6e6fb19e7
Add GtkPasswordEntry
...
This is a simple editable which hides the entered
text and shows a caps-lock warning.
2019-02-19 00:25:59 -05:00
Matthias Clasen
39d5f9e07b
entry completion: Make this work again
...
Connect to GtkText signals where necessary.
2019-02-19 00:25:59 -05:00
Matthias Clasen
cbbc7dd70f
treeview: use a GtkText as search entry
2019-02-19 00:25:59 -05:00
Matthias Clasen
a31da76f95
treeview: Disable some search entry functionality
...
This needs to be rewritten. Until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
8bb6d00ce2
search entry: temporarily disable some functions
...
The search entry needs to be rewritten to use a
text child until then, keep it limping along.
2019-02-19 00:25:59 -05:00
Matthias Clasen
1930c74736
spin button: Use GtkText
...
We already use GtkEditable api throughout. This just
means we create a GtkText instead of a GtkEntry.
2019-02-19 00:25:59 -05:00
Matthias Clasen
ea098f8d51
entry accessible: Make this work with the text widget
2019-02-19 00:25:59 -05:00
Matthias Clasen
45fb1d06e3
entry: Delegate to GtkText
...
Use a GtkText child, and delegate the editable functionality
to it. Also forward all the properties that are provided by
GtkText.
Some of the more internal APIs, such as layout and im context
access and caps-lock warning, are removed here, but we preserve
most of the plain GtkEntry API by forwarding it to the GtkText
child.
2019-02-19 00:25:59 -05:00
Benjamin Otte
d247e5707d
widget: Fix gtk_widget_size_allocate()
...
Compute the matrix for adjusted sizes etc properly.
2019-02-19 05:52:11 +01:00
Benjamin Otte
36ac867ea9
recorder: Print the matrix for transform nodes
2019-02-19 05:52:11 +01:00
Matthias Clasen
936181f354
Add a GtkTextAccessible
...
Add an accessible implementation for GtkText.
2019-02-18 14:24:21 -05:00
Matthias Clasen
fcb58887fa
Make emoji completion work for GtkText
...
GtkEntry will stop using it directly in the following commits.
2019-02-18 14:24:21 -05:00
Matthias Clasen
1801bf6d83
Add a GtkText widget
...
This is a GtkEntry without any of the extras, such as
icons, completion, progress, caps-lock warning, emoji icon.
2019-02-18 14:24:21 -05:00
Matthias Clasen
b9c8dd64b3
spin button: Implement and use editable interface
2019-02-17 23:07:18 -05:00
Matthias Clasen
32795963c0
entry: Implement new editable iface
2019-02-17 23:07:18 -05:00
Matthias Clasen
7325f8e204
editable: Add more to interface
...
Add all the things to the GtkEditable interface that
make sense for most implementations.
2019-02-17 23:07:17 -05:00
Timm Bäder
c9d9f8b750
flowbox: Implement get_child_at_pos properly
...
With transforms in the mix, checking if the coordinate is inside the
widget "allocation" makes even less sense. Just use gtk_widget_pick()
and walk up until we find a GtkFlowBoxChild.
2019-02-16 15:45:06 +01:00
Timm Bäder
ca2c05cdb3
widget: Push a transform node if we need to
...
This is the same as the old code since the transformation only contains
teh offset right now, but it will be different later where arbitrary
transformations are possible per widget.
2019-02-16 15:44:46 +01:00
Timm Bäder
10e5856583
widget: Save transform as matrix
...
The transform matrix is a translation matrix from the parent's origin to
the widget origin. We will later allow more transformations than just
translations.
2019-02-16 15:44:37 +01:00
Timm Bäder
0739399766
paned: Implement increased handle area using pick()
...
Otherwise, we do report the widgets below the invisible handle area as
hovered or active.
2019-02-16 11:19:29 +01:00
Matthias Clasen
bea1a02edd
Merge branch 'wip/otte/boxes' into 'master'
...
GtkCssBoxes
See merge request GNOME/gtk!584
2019-02-15 16:12:26 +00:00
Matthias Clasen
74d6d81db9
Merge branch 'assistant-cleanup' into 'master'
...
Assistant cleanup
See merge request GNOME/gtk!581
2019-02-15 15:54:53 +00:00
Matthias Clasen
e5e2bd3187
Drop GtkAssistantPage::has-padding
...
This is causing us some internal complications, and
it is very easy to just add padding to the pages
yourself.
2019-02-15 10:23:48 -05:00
Matthias Clasen
d327d3fab2
assistant: Use a stack
...
We don't use any non-stack features of the notebook here.
2019-02-15 10:23:48 -05:00
Matthias Clasen
fb4f5e0a78
assistant: Add docs
...
Without this, introspection complains about a missing
transfer annotation.
2019-02-15 10:23:48 -05:00
Benjamin Otte
c44c44ee25
css: Pass boxes to the render functions
...
Instead of style + rect_of_one_box, pass the new GtkCssBoxes object.
This has the nice side effect that when drawing background + border +
outline, we only compute all the boxes we need once.
2019-02-15 06:53:22 +01:00
Benjamin Otte
7ad0f7fc52
css: Mark some hot functions as G_GNUC_PURE
...
By doing that, gcc will generate code that avoids calling these
functions when not needed.
2019-02-15 06:53:22 +01:00
Benjamin Otte
285aba6ece
widget: Make width, height and transform be widget-relative
...
Previously, those numbers stored the values relative to the margin box
of the widget. Now they store values relative to the content box,
thereby getting rid of the last remains of weird coordinate systems.
2019-02-15 06:53:22 +01:00
Benjamin Otte
19ffb40b27
cssboxes: Introduce
...
Split out the code for computing CSS boxes from given variables from the
background render code. This way, it can be shared between different
codebases.
Also, make that code completely be contained of static inline functions.
That ensures that it can be 100% inlined in cases where only parts of
the rectangle are needed (like in gtk_widget_get_width() in the future).
This will require some more patches to actually work, but those will
follow.
2019-02-15 06:53:22 +01:00
Benjamin Otte
86978d2654
widget: Store the render node in the widget's coordinate system
...
Also require gtk_widget_snapshot() to be in the widget's coordinate
system.
2019-02-15 06:53:17 +01:00
Benjamin Otte
694d7c378b
root: Move the renderer to the root
2019-02-15 06:53:17 +01:00
Benjamin Otte
446713fb8b
root: Add gtk_root_get_surface_transform()
...
The function isn't used yet, so this is just infrastructure.
2019-02-15 06:53:17 +01:00
Benjamin Otte
2fbdd8b849
root: Add GtkRoot:get_display vfunc
...
And use it.
2019-02-15 06:53:17 +01:00
Benjamin Otte
ddf2a3681d
widget: Add a GtkWidget::root property and gtk_widget_get_root()
...
The property is just for API completeness, the getter is meant to
replace toplevel usage.
2019-02-15 06:53:17 +01:00
Benjamin Otte
4ca1f7e29f
widget: Add GtkWidgetClass:root and :unroot functions
...
They get added whenever a widget gets added into a hierarchy with a root
widget.
2019-02-15 06:53:17 +01:00
Benjamin Otte
aeda099f47
widget: Remove toplevel flag
...
Instead, rely on GTK_IS_ROOT().
Also implement GtkRoot on GtkWindow and GtkInvisible, the two widgets
that used to set the toplevel flag before.
2019-02-15 06:53:17 +01:00
Benjamin Otte
2e5bc9fbc3
gtk: Add the GtkRoot interface
...
So far, this doesn't do anything.
2019-02-15 06:53:17 +01:00
Benjamin Otte
d65a60e0bd
widget: Move compuatation of what changed further up
...
This way, we can compare with literally the previous allocation and the
size will not be influenced by an adjusted allocation.
But more importantly, we can now use the transform/width/height values
for other stuff.
2019-02-15 06:53:17 +01:00
Benjamin Otte
d3a2218ff4
widget: Split up priv->allocation
...
It's not priv->transform (to be turned into a graphene matrix),
priv->width and priv->height.
The numbers are still the same.
The only difference is that unallocated widgets will now have x/y set to
0, not to -1.
2019-02-15 06:53:17 +01:00
Benjamin Otte
e0ec5caaf8
container: Drop gtk_container_check_resize()
...
Instead, hardcode GtkWindow for now.
The code for non-windows was entirely broken.
2019-02-15 06:53:17 +01:00
Benjamin Otte
2ba928e142
window: Properly detect if size allocation is needed
...
Instead of looking at the allocation, just look at the alloc_needed
widget flag that tracks if an allocation is needed.
2019-02-15 06:46:04 +01:00
Benjamin Otte
07722582ef
simpleselection: Improve items-changed
...
Make items-changed never emit 2 signals, instead, always emit only one,
potentially by extending the range reported in items-changed.
And be a lot more exhaustive about autoselect tests.
2019-02-15 06:46:04 +01:00
Benjamin Otte
1f56f5c2e9
selectionmodel: Change prototype of query_range()
...
1. Do not make position an inout variable
The function is meant to return a range for a given position, not modify
a position. So it makes no conceptual sense to use an inout variable.
2. Pass the selected state as an out variable
Using a boolean return value - in particular in an interface full of
boolean return values - makes the return value intuitively feel like a
success/failure return. Using an out variable clarifies the usage.
3. Allow passing every position value
Define what happens when position >= list.n_items
4. Clarify the docs about how this function should behave
In particular, mention the case from point (3)
5. Add more tests
Again, (3) needs testing.
2019-02-15 06:28:35 +01:00
Benjamin Otte
cd37b872ca
overlay: Remove hack for scrolled windows
...
It's not needed now that we don't use scrollbars or overlays inside
scrolled windows anymore.
2019-02-15 06:28:11 +01:00
Matthias Clasen
89d8ae0431
stack: Fix a crash
...
We need to remove the weak pointer, as the stack switcher can
keep the list model alive beyond the stack. This was observed
to cause crashes:
==16870== Invalid write of size 8
==16870== at 0x5168A4E: g_nullify_pointer (gutils.c:2284)
==16870== by 0x522C500: weak_refs_notify (gobject.c:2791)
==16870== by 0x50FE7BC: g_data_set_internal (gdataset.c:407)
==16870== by 0x50FECA7: g_datalist_id_set_data_full (gdataset.c:670)
==16870== by 0x5227EB4: g_object_real_dispose (gobject.c:1056)
==16870== by 0x522D295: g_object_unref (gobject.c:3309)
==16870== by 0x4AF849F: unset_stack (gtkstackswitcher.c:428)
==16870== by 0x4AF892E: gtk_stack_switcher_dispose (gtkstackswitcher.c:527)
2019-02-14 12:24:22 -05:00
Matthias Clasen
fb44491926
assistant: Add a pages property
...
This is mainly useful to make the page objects
accessible in the inspector.
2019-02-13 18:27:25 -05:00
Matthias Clasen
2866a13f30
inspector: Support list model properties
...
This is just a very quick hack for a property editor
that allows to drill down into list models.
2019-02-13 15:08:17 -05:00
Matthias Clasen
6ef775dbcb
stack: Add a pages property
...
This makes the list model available in the inspector.
2019-02-13 14:14:54 -05:00
Matthias Clasen
927e983ff8
inspector: Make object property inspection work again
...
This was lost when porting to GtkListView.
2019-02-13 13:41:15 -05:00
Matthias Clasen
fbe0db4007
inspector: Add an api to activate an object
...
This will be used to make object property inspection
work again.
This will be used to make object property inspection
work againn
2019-02-13 13:40:40 -05:00
Matthias Clasen
8de8b8eebc
inspector: Fix selecting objects with a next tab
...
This was causing criticals.
2019-02-13 13:04:00 -05:00
Matthias Clasen
82fdd483d2
Add a missing icon
...
The view-refresh-symbolic icon is used in the data list
of the inspector. So ship it in gtk. No need to have
it in the demos, then.
2019-02-13 12:49:31 -05:00
Matthias Clasen
8c0b70691b
stack: Don't emit bad ::selection-changed signals
...
We have to be careful to not pass bad numbers to
this signal, which was happening in cases where
we have on old or new selected item.
2019-02-13 09:01:07 -05:00
Matthias Clasen
1750922631
stack: Fix a corner-case
...
When the stack goes empty, we were failing to reset
the visible_child member to NULL, causing problems later
on, since we don't have a ref for it.
2019-02-13 09:00:00 -05:00
Matthias Clasen
2dd85b826f
stack: Don't leak a reference
...
The page holds a reference to the widget, so can't just clear
this pointer.
2019-02-13 08:42:58 -05:00
Matthias Clasen
c0c6c87781
stack: Avoid some ugly unrefs
...
Instead of using the list model api that forces us
to drop the ref, just work with the list we have.
2019-02-13 08:40:13 -05:00
Matthias Clasen
f4b26af255
selection model: Add sanity checks
...
It is easy to emit wrong ::selection-changed signals,
and then bad things will usually happen later. Add
some sanity checks to gtk_selection_model_selection_changed
to make this easier to track down.
2019-02-13 08:38:30 -05:00
Matthias Clasen
2bd93303c4
Merge branch 'included-icons' into 'master'
...
Included icons
See merge request GNOME/gtk!580
2019-02-13 03:33:16 +00:00
Matthias Clasen
16026b6898
page setup dialog: Use theme icons
...
We have non-gtk-specific icons in the icon theme for this
now, so drop the gtk-orientation icons and use the theme
ones instead.
2019-02-12 21:37:02 -05:00
Matthias Clasen
7207c82c39
spin button: Use guaranteed icons
...
We guarantee value-increase/decrease-symbolic now, no need
for fallback anymore.
2019-02-12 21:37:02 -05:00
Matthias Clasen
bcafd20529
resources: Include more icons
...
Include all the icons that gtk is using itself.
For now, we include size 16 and scalable, to keep
the size limited.
2019-02-12 21:37:02 -05:00
Matthias Clasen
6c4e088620
resources: Include more icon directories
...
We are going to include all the icons that are
used by gtk itself. Prepare for that by including
the necessary subdirectories from the icon theme.
2019-02-12 19:34:19 -05:00
Matthias Clasen
4df2a4c82c
icon theme: Remove fallbacks
...
We want to include all needed icons as resources,
so disable the fallbacks and see what comes up.
2019-02-12 17:34:43 -05:00
Matthias Clasen
92d6f5e8fd
Add image-missing to the internal icons
...
We assert if image-missing is missing,
so life is better if
we can guarantee that it is available.
2019-02-12 17:34:18 -05:00
Timm Bäder
aa71b6c405
Rever more of the icon shadow commit
...
Even adjusting the icon size is wrong for GTK4.
2019-02-12 06:33:41 +01:00
Matthias Clasen
2d57cb6ce3
Revert a non-working addition
...
Cell rendererers don't support <style> in ui files.
2019-02-12 06:20:14 +01:00
Jakub Steiner
756e8f3189
Theme: add helper class names for Adwaita
...
- helps legibility of app icons
Addresses https://gitlab.gnome.org/GNOME/gtk/issues/1434
2019-02-12 06:19:22 +01:00
Matthias Clasen
52b83ac553
about dialog: Adapt to new stack visiblity handling
...
We need to set the visible property of the stack pages
now.
2019-02-12 00:10:54 -05:00
Matthias Clasen
916508f3db
stack: Drop the position property
...
GtkStackSwitcher and GtkStackSidebar no longer
use the GtkStackPage::position property, so we
don't need to maintain it anymore.
2019-02-10 18:43:59 -05:00
Matthias Clasen
9255a12493
stack sidebar: Use the selection model
...
Make GtkStackSidebar and GtkStack communicate via
the selection model that GtkStack now exposes.
This is parallel to the GtkStackSwitcher changes
in the previous commit.
2019-02-10 18:43:59 -05:00
Matthias Clasen
8595665524
stack switcher: Use the selection model
...
Make GtkStackSwitcher and GtkStack communicate via
the selection model that GtkStack now exposes.
2019-02-10 18:43:59 -05:00
Matthias Clasen
7b08d13aea
stack: Provide a selection model
...
Make GtkStack expose a selection model for its pages.
The model can be used to track changes to the pages,
and to change what child is visible.
2019-02-10 18:43:59 -05:00
Matthias Clasen
dc0750f6ef
stack: Add a GtkStackPage::visible property
...
This will let GtkStackSwitcher track visibility
without having to interact with the widgets directly.
2019-02-10 18:43:59 -05:00
Benjamin Otte
30386bbaca
gtk: Add GtkSingleSelection
...
GtkSingleSelection is a GtkSelectionModel that allows selecting a single
item.
2019-02-10 18:43:59 -05:00
Benjamin Otte
16024fba7c
gtk: Add GtkSelectionModel
...
The selection model is a list model interface that takes care of
selections and is to be used by the list model widgets to manage their
selections.
2019-02-10 18:43:59 -05:00
Timm Bäder
14feafe3a9
window: Remove GList link directly
...
Instead of walking the list again and looking for the GList pointer we
already have.
2019-02-10 10:31:27 +01:00
Timm Bäder
d1ea591f18
rendericon: Ignore transparent icons
...
If the recoloring would end up multiplying the alpha component with 0
anyway, just skip drawing anything altogether.
This increases the icon count in the switch demo of the fishbowl from
~260 to ~280 on my system.
2019-02-10 10:31:27 +01:00
Carlos Garnacho
37d218b160
imwayland: Toggle OSK more sparingly
...
Specifically it is avoided to be toggled if:
- Just received focus (in order to preserve OSK state across focus changes)
- Moving cursor around. Still allow some jitter as perfect accuracy is not
possible.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1277
2019-02-09 01:08:35 +01:00
Matthias Clasen
7cb505a395
Avoid introspection warnings
...
Unless we keep the parameter names in headers sources and
docs the same, some tools will complain.
2019-02-08 13:49:17 -05:00
Piotr Drąg
cf5f577834
Use Unicode typography in new translatable strings
...
See https://developer.gnome.org/hig/stable/typography.html
2019-02-08 19:24:53 +01:00
Benjamin Otte
3f2934bff9
revealer: Use gtk_widget_set_overflow()
2019-02-08 18:26:43 +01:00
Benjamin Otte
3d05e6777a
treeview: Use gtk_widget_set_overflow()
...
We need to clip again so we don't overdraw the headers, but setting
overflow does the right thing with header widgetry.
2019-02-08 18:26:42 +01:00
Benjamin Otte
e522641920
textview: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Benjamin Otte
3517eb7c54
magnifier: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Benjamin Otte
b72ee00539
iconview: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Benjamin Otte
c07cd23aa9
paned: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Benjamin Otte
8ef417dad1
viewport: Use gtk_widget_set_overflow()
2019-02-08 18:26:42 +01:00
Benjamin Otte
49cbf2a16b
widget: Add gtk_widget_set_overflow()
...
This adds a simple abilities for widget implementations to clip their
content. See future commits for users of this.
2019-02-08 18:26:42 +01:00
Matthias Clasen
915acce470
builder-tool: Fix preserving properties
...
We were looking at the wrong class names here, we need
to look at the owner type to match against our list.
This fixes problems where gtk-builder-tool simplify
inadvertedly loses hexpand or vexpand settings, messing
up layout, as recently happend in gtk4-widget-factory.
2019-02-08 10:34:32 -05:00
Matthias Clasen
c16a861f68
assistant: Fix a refcounting oversight
...
The assistant needs to hold a ref on the pages.
2019-02-08 09:51:45 -05:00
Matthias Clasen
b8903a4aba
stack: Fix up property notification
...
This was showing up in testsuite failures.
2019-02-08 09:03:45 -05:00
Matthias Clasen
d8a5f41aab
assistant: Fix up property notification
...
This was showing up in testsuite failures.
2019-02-08 09:03:18 -05:00
Matthias Clasen
1632cc7929
stack: Make the child meta work without stack
...
We have tests that expect this to work, like defaultvalue.
2019-02-08 08:22:35 -05:00
Matthias Clasen
a7eae67228
shortcuts window: Fix a leftover use of child properties
...
These properties are gone, use the child meta here.
2019-02-08 08:22:06 -05:00
Matthias Clasen
c7467b4e76
assistant: Fix the default value of has-padding
...
This was showing up in the defaultvalue test.
2019-02-08 08:21:42 -05:00
Matthias Clasen
81055ca7d9
Fix compiler warnings
...
Fallout from recent GtkStackPage changes.
2019-02-08 07:55:41 -05:00
Matthias Clasen
b675597075
builder-tool: Convert assistant pages too
...
Do the same transformation for GtkAssistantPage that
we already do for GtkStackPage, to transform GTK 3 .ui
files to GTK 4 ways of doing things.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ce60089f46
assistant: Convert child properties to a child meta object
...
Turn GtkAssistantPage into a public object holding the
former child properties.
2019-02-08 00:09:44 -05:00
Matthias Clasen
4ace873046
Update ui files to new stack syntax
...
This conversion was done with the help of gtk4-builder-tool.
2019-02-08 00:09:44 -05:00
Matthias Clasen
72b6644223
builder tool: Operate on multiple files
...
There is no strong reason to disallow this, when
the --replace option is used.
2019-02-08 00:09:44 -05:00
Matthias Clasen
59152b8a8d
builder tool: Rewrite the simplify command
...
Rewrite the builder-tool simplify command to have
a full parse tree around, and perform simplifications
on that tree. This lets us rewrite GtkStack and turn
child properties into child meta objects.
2019-02-08 00:09:44 -05:00
Matthias Clasen
addcf2e526
tools: Split gtk-builder-tool
...
Put each command into its own file. This is in
preparation for redoing the simplify command.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ed3b9669b3
builder: Allow specifying objects inline
...
In addition to <property name="foo">bar</property> referring
to an object with ID bar, we now also parse
<property name="foo"><object>...
to specify a property 'inline'.
2019-02-08 00:09:44 -05:00
Matthias Clasen
ad9c2a624f
stack: Convert child properties to a child meta object
...
Create a GtkStackPage public object which holds the former
child properties of GtkStack.
Adjust all callers.
2019-02-08 00:09:44 -05:00
Jakub Steiner
a3e517aa9c
Adwaita: menu border-radius fix from gtk3
...
- avoid painting over the rounded corners with background
2019-02-06 14:34:55 +01:00
Jakub Steiner
8d537379ed
Adwaita: sync with stable styling
...
- fold over changes in teh stable brnch to get the same look
fixes issue #1656
2019-02-06 14:01:38 +01:00
Emmanuele Bassi
1668496359
docs: Fix GTK links and locations
2019-02-06 10:39:27 +01:00
Rico Tzschichholz
d2d35e52c3
Adjust some more pkg-config references for gtk+ to gtk rename
...
See https://gitlab.gnome.org/GNOME/gtk/issues/1439
2019-02-06 09:56:08 +01:00
Matthias Clasen
e91144f6c9
Make GtkInvisible private
...
We can't quite get rid of its use in the inspector,
but we can make it private.
2019-02-06 02:06:19 -05:00
Matthias Clasen
a75dcce707
Make the invisible invisible
...
The change to make widgets visible by default broke GtkInvisibles
special-cased state handling and that in turn caused picking in
the inspector to break with another recent change.
This change makes the inspector pick button work again.
2019-02-05 16:55:07 -05:00
Matthias Clasen
785373ce2a
printoperation-win32: Stop using an invisible
...
We can just as well use a GtkWindow here. We just need
a handle. Untested.
2019-02-05 10:56:40 -05:00
Matthias Clasen
aad44999f3
filechoosernativeportal: Stop using an invisible
...
A label works just as well here, it turns out.
2019-02-05 10:46:48 -05:00
Matthias Clasen
721e598e99
Reduce includes of gtkinvisible.h
...
We want to get rid of GtkInvisible.
2019-02-05 10:46:33 -05:00
Timm Bäder
9d950087ef
inspector: Remove window icon
...
The property does not exist anymore and the window icon has never been
used on non-x11 backends.
2019-02-05 15:14:19 +01:00
Timm Bäder
1674b6e269
main: Prefer implicit grab widget to target widget for motion events
...
When an implcit grab is going on, we don't need to consider other
widgets for motion (etc.) events.
2019-02-05 15:13:01 +01:00
Timm Bäder
33ac41bc94
infobar: Remove an unused variable
2019-02-05 15:09:59 +01:00
Timm Bäder
057144cfdd
window: Inline function into only caller
2019-02-05 08:11:43 -05:00
Timm Bäder
9b91041025
window: Remove remaining icon_list handling
2019-02-05 08:11:43 -05:00
Timm Bäder
b215384064
window: Remove default_icon_serial
...
Now unused.
2019-02-05 08:11:43 -05:00
Timm Bäder
e6c5b9348d
window: Remove default icon list
2019-02-05 08:11:43 -05:00
Timm Bäder
55b99e9916
window: Remove icon list
2019-02-05 08:11:43 -05:00
Timm Bäder
131e8d8905
Remove some unnecessary gtkwindow.h includes
2019-02-05 08:11:43 -05:00
Timm Bäder
e82d97f069
window: Remove set_default_icon
2019-02-05 08:11:43 -05:00
Timm Bäder
490bb4c2ea
window: Remove icon property
2019-02-05 08:11:43 -05:00
Timm Bäder
79664567c4
window: Remove _set_default_icon_from_file
2019-02-05 08:11:43 -05:00