Matthias Clasen
34b6d46276
placessidebar: Stop using gtk_widget_get_allocation
2023-04-09 06:48:27 -04:00
Matthias Clasen
8957d4cb4f
coloreditor: Stop using gtk_widget_get_allocation
2023-04-09 06:48:27 -04:00
Matthias Clasen
95f5c7beb6
range: Fix a copy-paste error
...
This was showing up as the alpha popup in
the color editor not being positioned correctly.
2023-04-09 06:48:27 -04:00
Benjamin Otte
3907711a49
Merge branch 'gbsneto/vulkan-glyph-fixes' into 'main'
...
Vulkan glyph fixes
See merge request GNOME/gtk!5802
2023-04-09 00:07:16 +00:00
Georges Basile Stavracas Neto
496c8f4a11
gsk/vulkan/glyphcache: Rework glyphs
...
The current implementation of the glyph cache deals with atlases by
padding them with 1 pixel at the beginning, at the end, and between
each glyph.
That's cool and all, however, there's a very subtle problem with
this approach: the contents of the atlas are garbage, so this padding
is filled with garbage memory!
Rework the Vulkan glyph cache to draw each and every glyph in a
surface that has 1 pixel border of padding around it. Ensure the
surface is completely black by drawing a rectangle before handing
it to Pango to draw the glyph. Update tx and ty to pick the texture
position adjusted to the 1 pixel padding. The atlas now starts at
position (0, 0), since each glyph individually contains its own padding.
To improve legibility, add a PADDING define and use it everywhere.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
8b6f69946c
gsk/vulkan/pipeline: Simplify pipeline creation
...
Nothing uses gsk_vulkan_pipeline_new_full() anymore.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
48129298f0
gsk/vulkan: Use default blend factors
...
Vulkan renders text using VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA and
VK_BLEND_FACTOR_SRC_ALPHA, but that implies per-channel alpha
blending, which currently produces the wrong results when blending
glyphs with the images beneath them.
Use the default pipeline constructors, which implies using the
ONE and ONE_MINUS_SRC_ALPHA.
2023-04-08 20:13:13 -03:00
Georges Basile Stavracas Neto
c77c8d6309
gsk/vulkan: Cosmetics
...
Reorder code to match the order used in shaders.
2023-04-08 20:13:13 -03:00
Matthias Clasen
99251c0c8f
Merge branch 'wip/carlosg/popover-ungrab-on-unmap' into 'main'
...
gtkpopover: Move GTK grabs to map/unmap
Closes #5730
See merge request GNOME/gtk!5801
2023-04-07 20:24:24 +00:00
Carlos Garnacho
1709538756
gtkpopover: Move GTK grabs to map/unmap
...
Typically, a popover gets mapped when shown and unmapped when
hidden. A situation there that breaks is where the popover gets
recursively unmapped/unrealized when its root is destroyed.
In that situation, the popover does however unmap (without being
hidden first), moving the GTK grab from show/hide to map/unmap
will handle the previous situations, plus this one.
Fixes things being unclickable if e.g. a modal dialog got a
popover popped up, then got closed via Alt-F4.
Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5730
2023-04-07 22:12:41 +02:00
Matthias Clasen
da5433e140
Merge branch 'inspector-action-fixes' into 'main'
...
actionmuxer: Make the compiler warn
See merge request GNOME/gtk!5800
2023-04-07 18:05:19 +00:00
Matthias Clasen
36c1003328
inspector: Redo the actions list
...
Make the actions list implement GtkActionObserver
for the muxer case, and make updates work.
2023-04-07 13:45:45 -04:00
Matthias Clasen
3eabcde868
inspector: Simplify the action editor
...
No need to listen for changes, the actions list
code will do so and tell us to update.
2023-04-07 13:45:12 -04:00
Matthias Clasen
7664048779
inspector: Add ActionHolder::changed
...
We will use this signal to communicate
action changes to the action list widgetry.
2023-04-07 13:17:22 -04:00
Matthias Clasen
8648ecf889
inspector: Cosmetics
...
Make the variant editor use a checkbutton
instead of a togglebutton.
2023-04-07 13:17:22 -04:00
Matthias Clasen
f1a01fb973
actionmuxer: Add a precondition
...
This helps with debugging the inspectors action
handling.
2023-04-07 12:53:57 -04:00
Alexander Shopov
b549a52f54
Update Bulgarian translation
...
(cherry picked from commit f15aa82eaf
)
2023-04-07 16:27:04 +00:00
Matthias Clasen
6c97667be1
inspector: Be more careful
...
Tweak the variant-editor code to handle some
cases more explicitly.
2023-04-07 09:16:21 -04:00
Matthias Clasen
ce597cf034
inspector: Plug a memory leak
2023-04-07 08:55:40 -04:00
Matthias Clasen
cdcb55da58
inspector: Be safer when handling actions
...
Those query apis are serious about not ignoring
their return value, and may not set their our
arguments to anything if they return FALSE.
2023-04-07 08:52:51 -04:00
Matthias Clasen
b8d02c9398
actionmuxer: Make the compiler warn
...
Warn when the boolean return isn't used, since we
may not initialize the out arguments in the FALSE
case (see the previous commits).
2023-04-07 08:03:46 -04:00
Matthias Clasen
d97514ec67
textview: Handle a return value
2023-04-07 08:03:46 -04:00
Matthias Clasen
a96df553e0
Merge branch '5729_fix_inspector_crash' into 'main'
...
inspector: fix crash caused by uninitialized GVariant
Closes #5729
See merge request GNOME/gtk!5799
2023-04-07 12:01:22 +00:00
Nelson Benítez León
ed8148bd07
inspector: fix crash caused by uninitialized GVariant
...
we were not checking the return gboolean of
gtk_action_muxer_query_action() which was
returning FALSE for the crash case, meaning
it didn't set the passed in GVariant, but
we were still using it as it was non-null.
Fixes #5729
2023-04-06 20:05:53 -04:00
Matthias Clasen
e0dbc6a0ee
Merge branch 'media-controls' into 'main'
...
mediacontrols: Add tooltip text to play button
See merge request GNOME/gtk!5794
2023-04-06 17:59:54 +00:00
Matthias Clasen
fb91418edd
Merge branch 'alert_dialog_role_mapping_fix' into 'main'
...
a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERT
See merge request GNOME/gtk!5796
2023-04-06 17:59:05 +00:00
Matthias Clasen
154ff6fe03
Merge branch 'matthiasc/for-main' into 'main'
...
glarea: Fix property notification
See merge request GNOME/gtk!5797
2023-04-06 15:06:26 +00:00
Matthias Clasen
a65dc036b1
glarea: Fix property notification
...
This was broken in 9c26262e3e
.
2023-04-06 10:37:58 -04:00
Maximiliano Sandoval R
62865bc52d
mediacontrols: Add tooltip text to play button
...
This makes the button accessible.
2023-04-06 16:16:41 +02:00
Lukáš Tyrychtr
19b280be4c
a11y: Map GTK_ACCESSIBLE_ROLE_ALERT_DIALOG to ATSPI_ROLE_ALERT
...
By doing this, alert dialogs will be read automatically, or at least
they should be, because a screen reader know that these are special.
2023-04-06 13:55:16 +02:00
Matthias Clasen
9608e4e503
Merge branch 'wip/exalm/centerlayout-shrink' into 'main'
...
centerlayout/box: Add :shrink-center-last
See merge request GNOME/gtk!5790
2023-04-05 22:23:19 +00:00
Matthias Clasen
1859193c5d
Merge branch 'wip/exalm/shortcuts' into 'main'
...
Add style classes to standard dialogs
See merge request GNOME/gtk!5791
2023-04-05 22:05:33 +00:00
Alexander Mikhaylenko
9138d91c1c
pagesetupunixdialog: Add "pagesetup" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
f1dff40391
fontchooserdialog: Add "fontchooser" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
fff98d94f9
filechooserdialog: Add "filechooser" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
1d0f0d4229
colorchooserdialog: Add "colorchooser" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
80a11b1a1c
appchooserdialog: Add "appchooser" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
399ee3db3f
shortcutswindow: Add "shortcuts" style class
2023-04-06 00:58:38 +04:00
Alexander Mikhaylenko
c40fa8db98
centerbox: Expose GtkCenterLayout:shrink-center-last
2023-04-05 16:15:49 +04:00
Alexander Mikhaylenko
8fd9de23bb
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
2023-04-05 16:15:49 +04:00
Matthias Clasen
450490bcf6
Merge branch 'ebassi/listbox-dispose' into 'main'
...
listbox: Unbind the model before removing children
See merge request GNOME/gtk!5789
2023-04-05 02:35:20 +00:00
Emmanuele Bassi
fb3f817f69
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.
2023-04-04 13:47:36 +01:00
Matthias Clasen
6a2f715250
Merge branch 'glarea-allowed-apis' into 'main'
...
glarea: Add GtkGLArea::allowed-apis
Closes #5330
See merge request GNOME/gtk!5786
2023-04-04 03:14:21 +00:00
Matthias Clasen
b1f0ca7dc4
gtk-demo: Update the GLArea examples
2023-04-03 23:05:38 -04:00
Matthias Clasen
9c26262e3e
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
2023-04-03 23:05:38 -04:00
Matthias Clasen
7723045e9a
Merge branch 'matthiasc/for-main' into 'main'
...
expander: Fix the css docs
Closes #5723
See merge request GNOME/gtk!5787
2023-04-04 02:50:08 +00:00
Matthias Clasen
a9a6371ceb
Merge branch 'node-editor-things' into 'main'
...
Revert "rendernodepaintable: Provide accurate aspect ratio"
See merge request GNOME/gtk!5788
2023-04-04 02:47:39 +00:00
Matthias Clasen
6182f4a332
node-editor: Improve the scaling
...
We only want to scale the main rendering, not whats
shown in the sidebar. Also, make the scale logarithmic.
2023-04-03 22:33:34 -04:00
Matthias Clasen
9ccde8b913
rendernodepaintable: Preserve aspect ratio in snapshot()
...
This is the better fix.
2023-04-03 22:33:34 -04:00
Matthias Clasen
70e56f0dea
Revert "rendernodepaintable: Provide accurate aspect ratio"
...
This reverts commit 52a8492887
.
It turned out to be the wrong fix.
2023-04-03 22:33:34 -04:00