Cam Cook
9d5330336b
Documentation corrections for GtkTextIter
...
| method | current | suggestion |
|------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------|-----------------------------------------------------------------|
| [backward_visible_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3785 ) | "Moves @iter forward to the previous visible cursor position" | "Moves @iter backward to the previous visible cursor position." |
| [get_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L595 ) | "Use [method@Gtk,TextBuffer.get_iter_at_offset]" | "Use [method@Gtk.TextBuffer.get_iter_at_offset]" |
| [starts_tag](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1201 ) | "returns %TRUE, [method@Gtk.TextIter.has_tag" | "returns %TRUE, [method@Gtk.TextIter.has_tag] " |
| method | current | suggestion |
|--------------------------------------------------------------------------------------------------------|-----------------------------------------------------|-----------------------------------------------------------|
| [backward_cursor_position](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3715 ) | "Like gtk_text_iter_forward_cursor_position()" | "Like [method@Gtk.TextIter.forward_cursor_position]" |
| [backward_find_char](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4483 ) | "Same as gtk_text_iter_forward_find_char()" | "Same as [method@Gtk.TextIter.forward_find_char]" |
| [backward_search](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L5295 ) | "Same as gtk_text_iter_forward_search()" | "Same as [method@Gtk.TextIter.forward_search]" |
| [backward_sentence_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3611 ) | "Calls gtk_text_iter_backward_sentence_start()" | "Calls [method@Gtk.TextIter.backward_sentence_start]" |
| [backward_visible_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3421 ) | "Calls gtk_text_iter_backward_visible_word_start()" | "Calls [method@Gtk.TextIter.backward_visible_word_start]" |
| [backward_word_starts](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3345 ) | "Calls gtk_text_iter_backward_word_start()" | "Calls [method@Gtk.TextIter.backward_word_start]" |
| [forward_sentence_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3591 ) | "Calls gtk_text_iter_forward_sentence_end()" | "Calls [method@Gtk.TextIter.forward_sentence_end]" |
| [forward_to_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L4131 ) | "gtk_text_iter_get_char() called on" | "[method@Gtk.TextIter.get_char] called on" |
| [forward_visible_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3403 ) | "Calls gtk_text_iter_forward_visible_word_end()" | "Calls [method@Gtk.TextIter.forward_visible_word_end]" |
| [forward_word_ends](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3327 ) | "Calls gtk_text_iter_forward_word_end()" | " Calls [method@Gtk.TextIter.forward_word_end]" |
| [is_end](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L1664 ) | "gtk_text_iter_is_end() is the most efficient" | "[method@Gtk.TextBuffer.is_end] is the most efficient" |
| [set_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3900 ) | "Same as gtk_text_iter_set_line_offset()" | "Same as [method@Gtk.TextBuffer.set_line_offset]" |
| [set_visible_line_index](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3987 ) | "Like gtk_text_iter_set_line_index()" | "Like [method@Gtk.TextBuffer.set_line_index]" |
| [set_visible_line_offset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtktextiter.c#L3946 ) | "Like gtk_text_iter_set_line_offset()" | "Like [method@Gtk.TextBuffer.set_line_offset]" |
2023-04-02 12:51:29 -04:00
Matthias Clasen
1068808742
dropdown: Fix to work with recent listview changes
...
Introduce our own 'inertness' for the list item widget
that shows the selected value inside the button.
2023-04-02 12:36:03 -04:00
Matthias Clasen
d6a27a41c2
Merge branch 'gl-fractional-scale' into 'main'
...
Make fractional scaling work with the GL renderer
See merge request GNOME/gtk!5770
2023-04-02 15:29:32 +00:00
Matthias Clasen
4746ffc4eb
Make fractional scaling for GL opt-in
...
Fractional scaling with the GL renderer is
experimental for now, so we disable it unless
GDK_DEBUG=gl-fractional is set.
This will give us time to work out the kinks.
2023-04-02 11:05:57 -04:00
Matthias Clasen
493055d6b2
Merge branch 'matthiasc/for-main' into 'main'
...
examples: Update for deprecations
See merge request GNOME/gtk!5772
2023-04-02 15:02:24 +00:00
Matthias Clasen
fa58dd9256
Use fractional scale for the GL renderer
...
This commit combines changes in the Wayland backend,
the GL context frontend, and the GL renderer to switch
them all to use the fractional scale.
In the Wayland backend, we now use the fractional scale
to size the EGL window.
In the GL frontend code, we use the fractional scale to
scale the damage region and surface in begin/end_frame.
And in the GL renderer, we replace gdk_surface_get_scale_factor()
with gdk_surface_get_scale().
2023-04-02 09:22:56 -04:00
Matthias Clasen
519cde95f0
gsk: Cosmetics
...
Rename scale_factor to scale in various places,
now that it is no longer an int but a float.
2023-04-02 09:06:56 -04:00
Matthias Clasen
01108d4148
gsk: Pass scale as float to the command queue
2023-04-02 09:06:56 -04:00
Matthias Clasen
7d4c757c58
examples: Update for deprecations
...
Stop using gdk_surface_create_similar_surface here.
2023-04-02 09:06:02 -04:00
Matthias Clasen
33b1624a9f
Merge branch 'deprecate-similar-surface' into 'main'
...
popover: Stop using gdk_surface_create_similar_surface
See merge request GNOME/gtk!5771
2023-04-02 10:55:15 +00:00
Yuri Chornoivan
f20e6a81d2
Update Ukrainian translation
2023-04-02 06:19:55 +00:00
Matthias Clasen
76ac91512b
Deprecate gdk_surface_create_similar_surface
...
This function is part of the cairo drawing API and
we are moving away from that. Update all callers.
2023-04-01 23:09:19 -04:00
Matthias Clasen
afed6f92ef
popover: Stop using gdk_surface_create_similar_surface
...
Just create the cairo image surface ourselves.
2023-04-01 23:08:36 -04:00
Matthias Clasen
b02729a58e
Merge branch 'inspector-fractional-scale' into 'main'
...
Add gdk_surface_get_scale
See merge request GNOME/gtk!5769
2023-04-01 23:31:39 +00:00
Matthias Clasen
ed9f0c0eb8
inspector: Show surface scale
...
For Wayland surfaces, show the fractional scale
if we have it.
2023-04-01 19:11:00 -04:00
Matthias Clasen
075bea788b
Add gdk_surface_get_scale
...
Add a scale property to GdkSurface and use the
fractional scale for it on Wayland.
2023-04-01 19:09:16 -04:00
Benjamin Otte
378df6556b
Merge branch 'wip/otte/listitem-focus' into 'main'
...
GtkColumnView factories and focus rework
See merge request GNOME/gtk!5728
2023-04-01 19:33:00 +00:00
Matthias Clasen
d10e228ae0
inspector: Show the viewporter too
2023-04-01 14:53:12 -04:00
Benjamin Otte
4086913795
gtk-demo: Port to GtkColumnViewCell
2023-04-01 20:49:40 +02:00
Benjamin Otte
f5dea9a3c2
filechooserwidget: Port to ColumnViewCell
2023-04-01 20:49:40 +02:00
Benjamin Otte
5af3c2b2ec
testcolumnview: Port to GtkColumnViewCell
2023-04-01 20:49:40 +02:00
Benjamin Otte
7a4ad81ed6
columnview: Add GtkColumnViewCell
...
This splits GtkListItem into 2 objects.
It is fully backwards compatible.
Using GtkListItem for GtkColumnView is now de-facto deprecated.
2023-04-01 20:49:40 +02:00
Benjamin Otte
e76d615d5f
builderlistitemfactory: Allow subclasses
...
It's going to be used with the new GtkColumnViewCell objects, so that
it's backwards compatible with ui file factories that use GtkListItem.
2023-04-01 20:49:40 +02:00
Benjamin Otte
beba8be6b5
builder: Allow template parsing to be used with subclasses
...
Whenn setting gtk_builder_set_allow_template_parents(), the builder
instance will accept
<template class="GtkWidget">
for a GtkBox instance.
It's going to be used with the new GtkColumnViewCell objects, so that
it's backwards compatible with ui file factories that use GtkListItem.
2023-04-01 20:49:40 +02:00
Benjamin Otte
170d49f067
columnviewcell: Ignore ::activatable and ::selectable for cells
...
This is a row property, not a cell property.
2023-04-01 20:49:40 +02:00
Benjamin Otte
c74ab7aaec
columnviewcellwidget: Untangle from GtkListItemWidget
...
This is step 1 in switching cells to their own ListItem subclass.
2023-04-01 20:49:40 +02:00
Benjamin Otte
00cb4c66cf
testdatatable: Add a --pages option
...
That way, local scrolling is available and the scrolling isn't random.
Recycling should now involve reordering the recycled widgets instead of
just keeping their order because all of them got recycled.
2023-04-01 20:49:40 +02:00
Benjamin Otte
708e067617
columnviewcellwidget: Ensure for_size is large enough
...
When clipping, we still need to do proper size requests.
2023-04-01 20:49:40 +02:00
Benjamin Otte
a29cf74e05
columnviewcellwidget: Rewrite width unadjusting
...
Use GtkCssBoxes for that purpose. No more scary CSS math necessary in
the widget.
2023-04-01 20:49:40 +02:00
Benjamin Otte
c760131f6f
filechooser: Set a row-factory
...
This way, we can toggle per-row selectability and ensure files are not
selectable in select-folder mode.
2023-04-01 20:49:40 +02:00
Benjamin Otte
880aea513f
columnview: Add gtk_column_view_add_row_factory()
...
This allows setting a factory to toggle per-row properties.
Implemented are selectable, focusable and activatable.
These are meant to supercede the per-cell selectable and activatable
properties, which make no sense individually.
The focus property makes it possible to focus rows instead of cells,
which is the default behavior.
2023-04-01 20:49:40 +02:00
Benjamin Otte
d1bc552b5f
columnview: Implement inertness
...
This properly implements the same behavior as
62e9d1e470
and avoids randomly losing
factories.
Oops.
2023-04-01 20:49:40 +02:00
Benjamin Otte
e8f0aa6ef8
columnviewrowwidget: Don't discard items in unroot()
...
Follows 3411b0306ee3b88038abdc736adf60bd004c7b7a and
3fb10ff2d8
.
2023-04-01 20:49:40 +02:00
Benjamin Otte
1a6afebbda
columnview: Rename to GtkColumnViewCellWidget
...
Just like with Row/RowWidget, I want to use Cell/CellWidget.
2023-04-01 20:49:40 +02:00
Benjamin Otte
7cfab4edf2
columnview: Add GtkColumnViewRow
...
There is no way to set it yet, this is just to prove that it works.
It also changes the focus behavior of rows. They are now always
focusable - unless turned off by the factory once that is possible.
2023-04-01 20:49:40 +02:00
Benjamin Otte
04c049ee54
listitem: Add a backwards compatibility workaround
...
I want to avoid turning the :focusable property into a tristate at all
costs, but that third state is what we had before the property.
2023-04-01 20:49:40 +02:00
Benjamin Otte
5f1b8a31c2
treeexpander: Add docs note about setting GtkListItem::focusable
2023-04-01 20:49:40 +02:00
Benjamin Otte
87059d53a6
columnviewcell: Cells should not be focusable by default
2023-04-01 20:49:40 +02:00
Benjamin Otte
ce531ce280
listview: Add GtkListItem::focusable property
...
This makes the question if a listitem can be focused or not an explicit
decision by application developers.
Previously an item could be focused if it was selectable and no child or
grandchild was focusable - so if you put a label and icon into it, the
item was focusable, but if you put a GtkTreeExpander or a GtkButton into
it, the item wasn't. This needs to be decided explicitly now.
Technically this is an API break, because the previous behavior does not
exist anymore.
But I really don't want to make this a tristate (focusable, not
focusable, automatic), because then binding it to other things gets
hard, and because all the other focusable proeprties are booleans, too,
and working with them gets a lot harder.
Related: #3910
2023-04-01 20:49:40 +02:00
Benjamin Otte
eb0541c9d1
columnviewcell: Cells aren't selectable or activatable
...
Rows are.
2023-04-01 20:49:40 +02:00
Benjamin Otte
3048100617
listitem: Use GDK_DECLARE_INTERNAL_TYPE
2023-04-01 20:49:40 +02:00
Matthias Clasen
60921db76f
Merge branch 'matthiasc/for-main' into 'main'
...
inspector: Update some misc info rows
See merge request GNOME/gtk!5768
2023-04-01 18:36:39 +00:00
Matthias Clasen
f7600a62e4
Merge branch 'wip/otte/fractional-cairo' into 'main'
...
wayland: Enable fractional scaling with the Cairo renderer
See merge request GNOME/gtk!5767
2023-04-01 18:35:33 +00:00
Georges Basile Stavracas Neto
70e6bcce16
Merge branch 'gbsneto/mildly-mid-vulkan-fixes' into 'main'
...
Vulkan transform / scale fixes
See merge request GNOME/gtk!5757
2023-04-01 18:23:12 +00:00
Matthias Clasen
a4dc0a74fd
inspector: Update some misc info rows
2023-04-01 14:21:41 -04:00
Benjamin Otte
6d4d9af14e
wayland: Use fractional scaling with the Cairo renderer
...
Cairo can do that, so just enable it:
* Create surfaces with the correct fractionally scaled size.
* Set the Cairo surface's device scale to that number.
2023-04-01 20:05:06 +02:00
Benjamin Otte
84b235aac1
wayland: Allow creating fractional Cairo surfaces
...
We don't do that yet, because the buffer scale code can't deal with it,
but we can do it now.
2023-04-01 20:05:05 +02:00
Benjamin Otte
ea82f50d13
build: Bump wayland-protocols requirement
...
The new fractional-scale support requires v1.31
2023-04-01 20:05:05 +02:00
Benjamin Otte
1a71e82fc5
wayland: Use wp_viewport to set buffer scale
...
Instead of setting the buffer scale via the buffer-scale command, set it
via the viewport.
This technically allows setting fractional scales, but we're not doing
that.
2023-04-01 20:05:01 +02:00
Georges Basile Stavracas Neto
f3b8bd8a98
gsk/gl/renderjob: Decompose matrix for 3D transforms
...
While this can be more expensive, it's also correct.
2023-04-01 14:47:29 -03:00