Matthias Clasen [Thu, 6 Apr 2023 15:06:26 +0000 (15:06 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
glarea: Fix property notification
See merge request GNOME/gtk!5797
Matthias Clasen [Thu, 6 Apr 2023 14:37:58 +0000 (10:37 -0400)]
glarea: Fix property notification
This was broken in
9c26262e3e083006.
Matthias Clasen [Wed, 5 Apr 2023 22:23:19 +0000 (22:23 +0000)]
Merge branch 'wip/exalm/centerlayout-shrink' into 'main'
centerlayout/box: Add :shrink-center-last
See merge request GNOME/gtk!5790
Matthias Clasen [Wed, 5 Apr 2023 22:05:33 +0000 (22:05 +0000)]
Merge branch 'wip/exalm/shortcuts' into 'main'
Add style classes to standard dialogs
See merge request GNOME/gtk!5791
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:11:48 +0000 (00:11 +0400)]
pagesetupunixdialog: Add "pagesetup" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:11:31 +0000 (00:11 +0400)]
fontchooserdialog: Add "fontchooser" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:10:54 +0000 (00:10 +0400)]
filechooserdialog: Add "filechooser" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:10:36 +0000 (00:10 +0400)]
colorchooserdialog: Add "colorchooser" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:10:25 +0000 (00:10 +0400)]
appchooserdialog: Add "appchooser" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 20:10:09 +0000 (00:10 +0400)]
shortcutswindow: Add "shortcuts" style class
Alexander Mikhaylenko [Wed, 5 Apr 2023 12:05:03 +0000 (16:05 +0400)]
centerbox: Expose GtkCenterLayout:shrink-center-last
Alexander Mikhaylenko [Wed, 5 Apr 2023 12:03:48 +0000 (16:03 +0400)]
centerlayout: Add :shrink-center-last
Allow to prioritize start and end children and have them keep their natural
size instead of center child if possible.
See https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5552#note_1708864
Matthias Clasen [Wed, 5 Apr 2023 02:35:20 +0000 (02:35 +0000)]
Merge branch 'ebassi/listbox-dispose' into 'main'
listbox: Unbind the model before removing children
See merge request GNOME/gtk!5789
Emmanuele Bassi [Tue, 4 Apr 2023 12:40:49 +0000 (13:40 +0100)]
listbox: Unbind the model before removing children
Calling gtk_list_box_remove_all() is a no-op with a bound model; after
the introduction of the remove_all() method in
49e56fc7, we were left
with row widgets after the dispose() call chained up.
We could restore the explicit unparenting inside dispose() instead of
calling remove_all(), but since the bound list model is provided by the
user of GtkListBox, it's more appropriate to unbind it in the dispose()
implementation, to avoid any potential reference cycle (especially in
higher level languages that have no explicit reference acquisition).
We clean up the bound model, and its associated state, if any; and then
we remove all the row widgets that are left.
Matthias Clasen [Tue, 4 Apr 2023 03:14:21 +0000 (03:14 +0000)]
Merge branch 'glarea-allowed-apis' into 'main'
glarea: Add GtkGLArea::allowed-apis
Closes #5330
See merge request GNOME/gtk!5786
Matthias Clasen [Mon, 3 Apr 2023 23:26:12 +0000 (19:26 -0400)]
gtk-demo: Update the GLArea examples
Matthias Clasen [Mon, 3 Apr 2023 23:24:58 +0000 (19:24 -0400)]
glarea: Add GtkGLArea::allowed-apis
Add api that mirrors the new GdkGLContext api
for selecting OpenGL variants, and deprecate
the old use_es api.
Fixes: #5330
Matthias Clasen [Tue, 4 Apr 2023 02:50:08 +0000 (02:50 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
expander: Fix the css docs
Closes #5723
See merge request GNOME/gtk!5787
Matthias Clasen [Tue, 4 Apr 2023 02:47:39 +0000 (02:47 +0000)]
Merge branch 'node-editor-things' into 'main'
Revert "rendernodepaintable: Provide accurate aspect ratio"
See merge request GNOME/gtk!5788
Matthias Clasen [Tue, 4 Apr 2023 02:32:31 +0000 (22:32 -0400)]
node-editor: Improve the scaling
We only want to scale the main rendering, not whats
shown in the sidebar. Also, make the scale logarithmic.
Matthias Clasen [Tue, 4 Apr 2023 02:19:39 +0000 (22:19 -0400)]
rendernodepaintable: Preserve aspect ratio in snapshot()
This is the better fix.
Matthias Clasen [Tue, 4 Apr 2023 02:16:43 +0000 (22:16 -0400)]
Revert "rendernodepaintable: Provide accurate aspect ratio"
This reverts commit
52a849288793e7eede878798a88760c058266f60.
It turned out to be the wrong fix.
Matthias Clasen [Mon, 3 Apr 2023 23:33:31 +0000 (19:33 -0400)]
expander: Fix the css docs
The docs were not matching reality since the
css node names were changed in
6d20fe0b.
Fixes: #5723
Benjamin Otte [Mon, 3 Apr 2023 18:14:51 +0000 (18:14 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
rendernode: Remove instance_init() function
See merge request GNOME/gtk!5785
Matthias Clasen [Mon, 3 Apr 2023 18:04:08 +0000 (18:04 +0000)]
Merge branch 'bilelmoussaoui/return-fix' into 'main'
gtk: Fix *_get_tab_behaviour return type
See merge request GNOME/gtk!5784
Benjamin Otte [Mon, 3 Apr 2023 14:44:03 +0000 (16:44 +0200)]
rendernode: Cosmetics
Simplify a function.
Benjamin Otte [Mon, 3 Apr 2023 14:39:52 +0000 (16:39 +0200)]
rendernode: Get rid of GskRenderNodeTypeInfo
Instead, use class_init functions.
Benjamin Otte [Mon, 3 Apr 2023 13:00:29 +0000 (15:00 +0200)]
rendernode: Remove instance_init() function
It's not used.
Bilal Elmoussaoui [Mon, 3 Apr 2023 16:55:04 +0000 (18:55 +0200)]
gtk: Fix *_get_tab_behaviour return type
Matthias Clasen [Mon, 3 Apr 2023 14:54:11 +0000 (10:54 -0400)]
Post-release version bump
Matthias Clasen [Mon, 3 Apr 2023 14:40:16 +0000 (10:40 -0400)]
4.11.1
Matthias Clasen [Mon, 3 Apr 2023 14:36:40 +0000 (10:36 -0400)]
NEWS: Updates
Matthias Clasen [Mon, 3 Apr 2023 10:50:52 +0000 (06:50 -0400)]
Add comment on versions
Some versions are specfied in multiple places.
Add a reminder to update all places.
Benjamin Otte [Mon, 3 Apr 2023 14:27:24 +0000 (14:27 +0000)]
Merge branch 'gbsneto/vulkan-layout-fixes' into 'main'
Vulkan fractional scale support, image layout and clip region fixes, cleanups
See merge request GNOME/gtk!5783
Georges Basile Stavracas Neto [Mon, 3 Apr 2023 13:39:25 +0000 (10:39 -0300)]
vulkan: Support fractional scaling
Basically what GL does, but without any debug or feature flag
to gatekeep it, since the Vulkan backend itself is experimental
already.
Ceil surface sizes, and floor coordinates, to the fractional scale
value.
Georges Basile Stavracas Neto [Mon, 3 Apr 2023 13:06:18 +0000 (10:06 -0300)]
gsk/vulkan/renderpass: Don't scale scissor and render area
The rects passed to the clip region are in buffer coordinates, and
must not be scaled. Consider the following scenario: Wayland, with
a 1024x768@2 window. That gives us a 2048x1536 raw image. To setup
the Vulkan render pass code, we'd scale 2048x1536 *again*, to an
unreasonable 4196x3072, which is (1) incorrect and (2) really
incorrect and (3) can lead to crashes at best, full GPU resets
at worst - and a GPU reset is incredibly not fun!
Now that we pass the right clip regions at the right coordinates
at all times, remove the extra scaling from the render pass.
Georges Basile Stavracas Neto [Mon, 3 Apr 2023 11:54:34 +0000 (08:54 -0300)]
gsk/vulkan: Cosmetics
No functional changes. Use a variable that already exists instead
of calling gdk_draw_context_get_surface() again. Cleanup some
newlines.
Georges Basile Stavracas Neto [Sun, 2 Apr 2023 22:18:24 +0000 (19:18 -0300)]
gsk/vulkan/renderer: Pass appropriate clip region
This part of the Vulkan renderer is almost exactly equal to the GL
renderer, and the GL renderer already does that since at least
2a38cecd3351. Copy that into the Vulkan renderer.
A nice side effect from this commit is that resizing a window now
actually works again.
Sneak in a trivial cleanup by using a variable to hold the draw
index.
Georges Basile Stavracas Neto [Sun, 2 Apr 2023 21:23:21 +0000 (18:23 -0300)]
gsk/vulkan/buffer: Pass aligned memory value
This was a tricky one to figure out, but it's pretty simple to
understand (I hope!).
So, this AMD card I'm using requires buffer memory sizes to be
aligned to 16 bytes. Intel is aligned to 4 bytes I think, but
AMD - or at least this AMD model in particular - uses 16 bytes
for alignment.
When creating a a particular texture (I did not determin which one
specifically!) a buffer of size 1276 bytes is requested.
1276 / 16 = 79.75, which is clearly not aligned to the required
16 bytes.
We request Vulkan to create a buffer of 1276 bytes for us, it
figures out that it's not aligned, and creates a buffer of 1280
bytes, which is aligned. The extra 4 bytes are wasted, but that's
okay. We immediately query this buffer for this exact information,
using vkGetBufferMemoryRequirements(), and proceed to create actual
memory to back this buffer up.
The buffer tells us we must use 1280 bytes, so we pass 1280 bytes
and everyone is happy, right? Of course not. We pass 1276 bytes,
and Vulkan is subtly unhappy at us.
Fix that by passing the value that Vulkan asks us to use, i.e.,
the size returned by vkGetBufferMemoryRequirements().
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 19:09:06 +0000 (16:09 -0300)]
gsk/vulkan/glyphcache: Ceil glyph surface size
This is what GL does, and for a reason: it can lead to width or
height for very small glyphs. Also, switch to dividing by a float
(1024.0) instead of an integer (1024).
Georges Basile Stavracas Neto [Thu, 23 Mar 2023 02:01:10 +0000 (23:01 -0300)]
gsk/vulkanimage: Set buffer row length and height
This doesn't make any difference now, but will allow us to copy
subregions more easily. This is not obvious, but here's a quick
explanation:
Leaving 'bufferRowLength' and 'bufferImageHeight' implies that
Vulkan will assume the size passed in the 'imageExtent' field.
Right now, this assumption is correct - the only user of this
function is the glyph cache, and it only copies and uploads
exact rects. Next commits will change that assumption, so we
must pass 'buffer*' fields, and tell Vulkan, "this part of the
buffer represents an image of width x height, and I want the
subregion (x, y, smallerWidth, smallerHeight) of this image".
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 18:33:10 +0000 (15:33 -0300)]
gsk/vulkan/image: Use UNDEFINED for initial layout
When creating an image using gsk_vulkan_image_new_for_framebuffer(),
it passes VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL.
However, this is a mistake. The spec demands that the initial
layout must be either VK_IMAGE_LAYOUT_UNDEFINED or
VK_IMAGE_LAYOUT_PREINITIALIZED.
Apparently this was an oversight from commit
b97fb751469, since the
commit message even documents that, and all other calls pass either
VK_IMAGE_LAYOUT_UNDEFINED or VK_IMAGE_LAYOUT_PREINITIALIZED.
Create framebuffer images using VK_IMAGE_LAYOUT_UNDEFINED, which is
what was originally expected.
Matthias Clasen [Mon, 3 Apr 2023 10:29:13 +0000 (10:29 +0000)]
Merge branch 'listbox-remove-all' into 'main'
gtklistbox: Add remove_all()
See merge request GNOME/gtk!5779
Matthias Clasen [Mon, 3 Apr 2023 10:28:44 +0000 (10:28 +0000)]
Merge branch 'zbrown/bump-protocols' into 'main'
build: We need wayland-protocols 1.31
See merge request GNOME/gtk!5780
Aleksandr Melman [Mon, 3 Apr 2023 07:29:46 +0000 (07:29 +0000)]
Update Russian translation
Zander Brown [Mon, 3 Apr 2023 01:12:54 +0000 (01:12 +0000)]
build: We need wayland-protocols 1.31
https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/5767
Christopher Davis [Wed, 29 Sep 2021 22:20:37 +0000 (15:20 -0700)]
gtkflowbox: Add remove_all()
Removing all items from containers is a common use case.
Without this applications needed to implement this manually.
It makes senses to handle it here.
Christopher Davis [Wed, 29 Sep 2021 21:26:49 +0000 (14:26 -0700)]
gtklistbox: Add remove_all()
Adds a function to remove all children from
a GtkListBox. This way app developers don't need to
implement this themselves.
Georges Basile Stavracas Neto [Sat, 1 Apr 2023 18:27:43 +0000 (15:27 -0300)]
gsk/vulkan/image: Cosmetics
Benjamin Otte [Sun, 2 Apr 2023 19:14:05 +0000 (19:14 +0000)]
Merge branch 'wip/otte/for-main' into 'main'
tooltipwindow: Cast the correct object
See merge request GNOME/gtk!5774
Matthias Clasen [Sun, 2 Apr 2023 18:43:55 +0000 (18:43 +0000)]
Merge branch 'docs-updates' into 'main'
docs: Document new environment variables
See merge request GNOME/gtk!5777
Benjamin Otte [Sun, 2 Apr 2023 12:06:11 +0000 (14:06 +0200)]
tooltipwindow: Cast the correct object
the tooltipwindow is in the userdata.
Matthias Clasen [Sun, 2 Apr 2023 18:09:26 +0000 (18:09 +0000)]
Merge branch 'scale-factor-cleanup' into 'main'
wayland: Be more careful about scale-factor
See merge request GNOME/gtk!5775
Matthias Clasen [Sun, 2 Apr 2023 17:54:42 +0000 (13:54 -0400)]
NEWS: Updates
Matthias Clasen [Sun, 2 Apr 2023 17:52:56 +0000 (13:52 -0400)]
docs: Document new environment variables
Add GSK_MAX_TEXTURE_SIZE and GDK_DEBUG=gl-fractional
to the docs.
Matthias Clasen [Sun, 2 Apr 2023 17:43:03 +0000 (17:43 +0000)]
Merge branch 'ccook/gtkiter-doc-changes' into 'main'
Documentation corrections for GtkTextIter
See merge request GNOME/gtk!5776
Matthias Clasen [Sun, 2 Apr 2023 17:23:19 +0000 (13:23 -0400)]
wayland: Be more careful about scale-factor
Only emit notify::scale-factor if it actually
changes. This potentially avoids a lot of work
in GTK (reloading icons, etc).
Matthias Clasen [Sun, 2 Apr 2023 17:17:36 +0000 (13:17 -0400)]
docs: Add some details
Cam Cook [Sun, 2 Apr 2023 17:12:21 +0000 (13:12 -0400)]
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.TextIter.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.TextIter.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.TextIter.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.TextIter.set_line_offset]" |
Matthias Clasen [Sun, 2 Apr 2023 17:05:34 +0000 (13:05 -0400)]
NEWS: Updates
Benjamin Otte [Sun, 2 Apr 2023 16:59:10 +0000 (16:59 +0000)]
Merge branch 'dropdown-inertness' into 'main'
dropdown: Fix to work with recent listview changes
See merge request GNOME/gtk!5773
Cam Cook [Sun, 2 Apr 2023 16:51:29 +0000 (12:51 -0400)]
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]" |
Matthias Clasen [Sun, 2 Apr 2023 16:36:03 +0000 (12:36 -0400)]
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.
Matthias Clasen [Sun, 2 Apr 2023 15:29:32 +0000 (15:29 +0000)]
Merge branch 'gl-fractional-scale' into 'main'
Make fractional scaling work with the GL renderer
See merge request GNOME/gtk!5770
Matthias Clasen [Sun, 2 Apr 2023 14:24:37 +0000 (10:24 -0400)]
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.
Matthias Clasen [Sun, 2 Apr 2023 15:02:24 +0000 (15:02 +0000)]
Merge branch 'matthiasc/for-main' into 'main'
examples: Update for deprecations
See merge request GNOME/gtk!5772
Matthias Clasen [Sun, 2 Apr 2023 02:52:13 +0000 (22:52 -0400)]
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().
Matthias Clasen [Sun, 2 Apr 2023 02:54:19 +0000 (22:54 -0400)]
gsk: Cosmetics
Rename scale_factor to scale in various places,
now that it is no longer an int but a float.
Matthias Clasen [Sun, 2 Apr 2023 02:48:38 +0000 (22:48 -0400)]
gsk: Pass scale as float to the command queue
Matthias Clasen [Sun, 2 Apr 2023 13:06:02 +0000 (09:06 -0400)]
examples: Update for deprecations
Stop using gdk_surface_create_similar_surface here.
Matthias Clasen [Sun, 2 Apr 2023 10:55:15 +0000 (10:55 +0000)]
Merge branch 'deprecate-similar-surface' into 'main'
popover: Stop using gdk_surface_create_similar_surface
See merge request GNOME/gtk!5771
Yuri Chornoivan [Sun, 2 Apr 2023 06:19:55 +0000 (06:19 +0000)]
Update Ukrainian translation
Matthias Clasen [Sun, 2 Apr 2023 03:09:19 +0000 (23:09 -0400)]
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.
Matthias Clasen [Sun, 2 Apr 2023 03:08:36 +0000 (23:08 -0400)]
popover: Stop using gdk_surface_create_similar_surface
Just create the cairo image surface ourselves.
Matthias Clasen [Sat, 1 Apr 2023 23:31:39 +0000 (23:31 +0000)]
Merge branch 'inspector-fractional-scale' into 'main'
Add gdk_surface_get_scale
See merge request GNOME/gtk!5769
Matthias Clasen [Sat, 1 Apr 2023 18:09:23 +0000 (14:09 -0400)]
inspector: Show surface scale
For Wayland surfaces, show the fractional scale
if we have it.
Matthias Clasen [Sat, 1 Apr 2023 18:51:11 +0000 (14:51 -0400)]
Add gdk_surface_get_scale
Add a scale property to GdkSurface and use the
fractional scale for it on Wayland.
Benjamin Otte [Sat, 1 Apr 2023 19:33:00 +0000 (19:33 +0000)]
Merge branch 'wip/otte/listitem-focus' into 'main'
GtkColumnView factories and focus rework
See merge request GNOME/gtk!5728
Matthias Clasen [Sat, 1 Apr 2023 17:02:53 +0000 (13:02 -0400)]
inspector: Show the viewporter too
Benjamin Otte [Fri, 31 Mar 2023 12:17:44 +0000 (14:17 +0200)]
gtk-demo: Port to GtkColumnViewCell
Benjamin Otte [Fri, 31 Mar 2023 12:05:57 +0000 (14:05 +0200)]
filechooserwidget: Port to ColumnViewCell
Benjamin Otte [Fri, 31 Mar 2023 11:24:59 +0000 (13:24 +0200)]
testcolumnview: Port to GtkColumnViewCell
Benjamin Otte [Thu, 30 Mar 2023 11:18:15 +0000 (13:18 +0200)]
columnview: Add GtkColumnViewCell
This splits GtkListItem into 2 objects.
It is fully backwards compatible.
Using GtkListItem for GtkColumnView is now de-facto deprecated.
Benjamin Otte [Fri, 31 Mar 2023 11:10:27 +0000 (13:10 +0200)]
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.
Benjamin Otte [Fri, 31 Mar 2023 11:01:47 +0000 (13:01 +0200)]
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.
Benjamin Otte [Thu, 30 Mar 2023 10:26:01 +0000 (12:26 +0200)]
columnviewcell: Ignore ::activatable and ::selectable for cells
This is a row property, not a cell property.
Benjamin Otte [Thu, 30 Mar 2023 09:40:05 +0000 (11:40 +0200)]
columnviewcellwidget: Untangle from GtkListItemWidget
This is step 1 in switching cells to their own ListItem subclass.
Benjamin Otte [Thu, 30 Mar 2023 05:43:12 +0000 (07:43 +0200)]
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.
Benjamin Otte [Thu, 30 Mar 2023 06:51:19 +0000 (08:51 +0200)]
columnviewcellwidget: Ensure for_size is large enough
When clipping, we still need to do proper size requests.
Benjamin Otte [Thu, 30 Mar 2023 04:58:40 +0000 (06:58 +0200)]
columnviewcellwidget: Rewrite width unadjusting
Use GtkCssBoxes for that purpose. No more scary CSS math necessary in
the widget.
Benjamin Otte [Wed, 29 Mar 2023 08:39:11 +0000 (10:39 +0200)]
filechooser: Set a row-factory
This way, we can toggle per-row selectability and ensure files are not
selectable in select-folder mode.
Benjamin Otte [Wed, 29 Mar 2023 08:36:18 +0000 (10:36 +0200)]
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.
Benjamin Otte [Wed, 29 Mar 2023 08:33:51 +0000 (10:33 +0200)]
columnview: Implement inertness
This properly implements the same behavior as
62e9d1e470b0819bdcb4d2a3ba05e083306fc0da and avoids randomly losing
factories.
Oops.
Benjamin Otte [Wed, 29 Mar 2023 06:34:40 +0000 (08:34 +0200)]
Benjamin Otte [Mon, 27 Mar 2023 18:53:48 +0000 (20:53 +0200)]
columnview: Rename to GtkColumnViewCellWidget
Just like with Row/RowWidget, I want to use Cell/CellWidget.
Benjamin Otte [Mon, 27 Mar 2023 02:36:22 +0000 (04:36 +0200)]
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.
Benjamin Otte [Sun, 26 Mar 2023 18:51:27 +0000 (20:51 +0200)]
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.
Benjamin Otte [Sun, 26 Mar 2023 19:06:09 +0000 (21:06 +0200)]
treeexpander: Add docs note about setting GtkListItem::focusable
Benjamin Otte [Mon, 27 Mar 2023 20:03:13 +0000 (22:03 +0200)]
columnviewcell: Cells should not be focusable by default
Benjamin Otte [Sat, 25 Mar 2023 23:50:45 +0000 (00:50 +0100)]
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