Timm Bäder [Fri, 11 Oct 2019 19:52:26 +0000 (21:52 +0200)]
gl renderer: Shorten function
Timm Bäder [Fri, 11 Oct 2019 19:49:13 +0000 (21:49 +0200)]
gl renderer: Avoid copying a rect
Matthias Clasen [Thu, 10 Oct 2019 19:13:14 +0000 (15:13 -0400)]
gl: Avoid stray use of doubles
Everything else in this code is floats,
so stick to that and avoid unnecessary
precision.
Matthias Clasen [Thu, 10 Oct 2019 03:17:15 +0000 (23:17 -0400)]
Cosmetics
Matthias Clasen [Thu, 10 Oct 2019 01:49:43 +0000 (21:49 -0400)]
gl: glyph cache tweaks
Reduce the cost of lookups by storing
the hash value directly.
Matthias Clasen [Thu, 10 Oct 2019 19:12:34 +0000 (15:12 -0400)]
gl: Shrink CachedGlyph structs slightly
Plug a hole in this struct.
Matthias Clasen [Thu, 10 Oct 2019 11:31:08 +0000 (07:31 -0400)]
gsk: Store color bit info in text nodes
Keep the 'has color glyphs' info in text nodes,
instead of determining it over and over in both
the vulkan and gl backends.
Timm Bäder [Fri, 11 Oct 2019 14:56:24 +0000 (16:56 +0200)]
gl renderer: Remove unused modelview matrix
Timm Bäder [Fri, 11 Oct 2019 14:38:58 +0000 (16:38 +0200)]
gl renderer: Don't copy outset shadow node outline
Timm Bäder [Fri, 11 Oct 2019 13:06:51 +0000 (15:06 +0200)]
gl renderer: Don't copy colors into render ops
Timm Bäder [Fri, 11 Oct 2019 11:47:40 +0000 (13:47 +0200)]
snapshot: Don't move shadows too much
dx/dy are relative to the node bounds, which are already moved by x/y.
Timm Bäder [Fri, 11 Oct 2019 08:16:39 +0000 (10:16 +0200)]
gl renderer: Grow unblurred outset shadow outline on the gpu
Timm Bäder [Fri, 11 Oct 2019 08:15:58 +0000 (10:15 +0200)]
gl renderer: Fix glsl rounded rect shrinking
Previous code would add rounded corners to a rect with all 0 corners
when growing.
Timm Bäder [Fri, 11 Oct 2019 07:32:24 +0000 (09:32 +0200)]
gl renderer: Cosmetics
Timm Bäder [Fri, 11 Oct 2019 06:46:33 +0000 (08:46 +0200)]
gl renderer: Only add outset shadow center piece if dx/dy != 0
Daniel Mustieles [Thu, 10 Oct 2019 12:00:22 +0000 (14:00 +0200)]
Updated Spanish translation
Matthias Clasen [Wed, 9 Oct 2019 22:49:36 +0000 (22:49 +0000)]
Merge branch 'wip/chergert/avoid-renderop-copy' into 'master'
gl: avoid copying RenderOp
See merge request GNOME/gtk!1128
Christian Hergert [Wed, 9 Oct 2019 22:41:53 +0000 (15:41 -0700)]
gl: avoid copying RenderOp to GArray
Instead of copying the (rather large) RenderOp to the GArray, we can
simply set the fields directly in the allocated space for the struct.
In most cases, there wont be any allocations to make as the array size
is kept in tact across frame renderings.
Christian Hergert [Wed, 9 Oct 2019 21:46:36 +0000 (14:46 -0700)]
gl: use memcmp to compare glyph cache keys
We can just use memcmp here because even in the use of lookup keys with
C99 initializers, we can rely on any space between fields added by the
compiler to be zeroed. So we might as well use wider memory cmopares.
Matthias Clasen [Wed, 9 Oct 2019 21:45:41 +0000 (21:45 +0000)]
Merge branch 'wip/chergert/const-glyph-cache' into 'master'
gl: avoid copying GskGLCachedGlyph in lookup
See merge request GNOME/gtk!1127
Christian Hergert [Wed, 9 Oct 2019 21:27:48 +0000 (14:27 -0700)]
gl: avoid copying GskGLCachedGlyph in lookup
This saves a minor amount of CPU time by avoiding the copy of structure
on each lookup (which is short-lived).
Christian Hergert [Wed, 9 Oct 2019 19:56:06 +0000 (12:56 -0700)]
textview: use gtk_snapshot_new_with_parent()
As recommended by Timm Bäder at:
https://gitlab.gnome.org/GNOME/gtk/commit/
3b959456ac5335639e9642571f59f17ec8ee97f7#note_621655
Christian Hergert [Wed, 9 Oct 2019 18:51:32 +0000 (11:51 -0700)]
gl: short-circuit on NULL program
The NULL check is a more inclusive check than each of the individual
op->op checks.
Matthias Clasen [Wed, 9 Oct 2019 17:50:40 +0000 (17:50 +0000)]
Merge branch 'wip/chergert/textview-fix-selection' into 'master'
textview: fix off-by-one in y_range invalidation
See merge request GNOME/gtk!1126
Christian Hergert [Wed, 9 Oct 2019 17:43:34 +0000 (10:43 -0700)]
textview: fix off-by-one in y_range invalidation
Previously, with selection bounds, we could have a state where a line
display with selections set would eroniously stay in the cache. This
aggresively releases those at the boundary cases fixing deselection
drawing state.
Timm Bäder [Wed, 9 Oct 2019 14:41:02 +0000 (16:41 +0200)]
gl renderer: Remove rounded rect intersection code
Caused correctness issues.
Fixes #1917
Timm Bäder [Sun, 6 Oct 2019 16:11:08 +0000 (18:11 +0200)]
widget: Compare adjusted sizes in size_allocate
Timm Bäder [Sun, 6 Oct 2019 15:45:54 +0000 (17:45 +0200)]
gl renderer: Fix scaled fallback node drawing
Timm Bäder [Sun, 6 Oct 2019 12:47:36 +0000 (14:47 +0200)]
inspector: Don't add padding to spinbuttons
That looks stupid.
Timm Bäder [Sun, 6 Oct 2019 12:36:25 +0000 (14:36 +0200)]
spinbutton: Fix adjustment value thinko
Using ints here is wrong as it makes it impossible to e.g. edit a double
in the [0; 1] range.
Timm Bäder [Sun, 6 Oct 2019 12:08:46 +0000 (14:08 +0200)]
Adwaita: add statusbar padding back
We removed the widget margins from the ui file over 2 years ago.
Timm Bäder [Sun, 6 Oct 2019 12:03:57 +0000 (14:03 +0200)]
statusbar: Use a bin layout
Timm Bäder [Sun, 6 Oct 2019 11:59:59 +0000 (13:59 +0200)]
widget-factory: Remove double border around textview
Replace the scrolledwindow border with two separator on top/bottom.
Timm Bäder [Sun, 6 Oct 2019 11:46:05 +0000 (13:46 +0200)]
stacksidebar: Inherit from GtkWidget
The child widgets are completely managed by the stacksidebar itself, so
this has no business being a GtkBin.
Timm Bäder [Sun, 6 Oct 2019 11:34:37 +0000 (13:34 +0200)]
Adwaita: Remove superfluous border from stacksidebar
We already get a border from .sidebar
Timm Bäder [Sun, 6 Oct 2019 11:31:15 +0000 (13:31 +0200)]
gtk-demo: Fix up sidebar demo style
Remove a superfluous separator and add the icon-dropshadow class to the
gtk logo
Timm Bäder [Sun, 6 Oct 2019 10:52:11 +0000 (12:52 +0200)]
popovermenu: Switch to main submenu before mapping
Timm Bäder [Sun, 6 Oct 2019 10:50:22 +0000 (12:50 +0200)]
popovermenu: Only close if there's a new focus widget
Makes sense and otherwise we end up closing the popover for no reason
Timm Bäder [Sun, 6 Oct 2019 10:13:42 +0000 (12:13 +0200)]
popovermenu: Switch back to "main" AFTER unmapping
Otherwise we might set things to child visible etc. while being
unmapped, which is a violation of the widget invariants of these
properties.
Timm Bäder [Sun, 6 Oct 2019 10:04:53 +0000 (12:04 +0200)]
popover2.ui: Stop trying to set GtkModelButton:label
The property is called "text"
Timm Bäder [Sun, 6 Oct 2019 10:01:28 +0000 (12:01 +0200)]
testmodelbutton: Remove toggles for removed properties
Timm Bäder [Thu, 3 Oct 2019 08:17:56 +0000 (10:17 +0200)]
filechooserbutton: Only destroy existing native dialogs
Timm Bäder [Wed, 2 Oct 2019 10:00:43 +0000 (12:00 +0200)]
widget: Create finalize assertions in destroy()
Timm Bäder [Thu, 3 Oct 2019 08:32:30 +0000 (10:32 +0200)]
demo: Don't manually add labels to menubuttons
Timm Bäder [Thu, 3 Oct 2019 08:28:59 +0000 (10:28 +0200)]
demo: Fix modelbutton demo
Timm Bäder [Sun, 29 Sep 2019 07:31:45 +0000 (09:31 +0200)]
label: Use TRUE/FALSE instead of 1/0
Timm Bäder [Sun, 29 Sep 2019 06:58:30 +0000 (08:58 +0200)]
dialog: Fix action button rearrangement
The gtk_widget_get_parent() check does not work anymore since the
headerbar adds the buttons to a child box.
Timm Bäder [Sun, 29 Sep 2019 06:39:12 +0000 (08:39 +0200)]
widget-factory: Skip xml files in background selection dialog
The default contains a xml file for an animated background, so don't try
loading it as a pixbuf.
Timm Bäder [Sun, 29 Sep 2019 05:57:43 +0000 (07:57 +0200)]
widget: Plug layout manager leak
Timm Bäder [Sat, 28 Sep 2019 10:37:00 +0000 (12:37 +0200)]
modelbutton: Rework
Create all the widgets on demand and use a box layout to arrange them
instead of manual size allocation.
Also don't inherit from GtkButton
Timm Bäder [Sat, 28 Sep 2019 11:34:16 +0000 (13:34 +0200)]
button: Remove unused signal enum members
Timm Bäder [Sat, 28 Sep 2019 08:32:14 +0000 (10:32 +0200)]
modelbutton: Use a box layout
Timm Bäder [Sat, 28 Sep 2019 08:30:35 +0000 (10:30 +0200)]
modelbutton: Replace map() with root()
Timm Bäder [Sat, 28 Sep 2019 08:08:50 +0000 (10:08 +0200)]
modelbutton: Remove end_box
it's unused.
Timm Bäder [Sat, 28 Sep 2019 08:03:08 +0000 (10:03 +0200)]
modelbutton: Create accel label on demand
Timm Bäder [Sat, 28 Sep 2019 07:15:56 +0000 (09:15 +0200)]
Adwaita: Blue check/radiobuttons
Align with 3.24.
Feichtmeier [Tue, 23 Jul 2019 16:24:34 +0000 (18:24 +0200)]
Tiny refactoring
- use checkradio_fg_color for check/radio in treeview, which points to fg_color, so no change of the hex color, thus no change to the parsed CSS
frederik.feichtmeier [Fri, 26 Jul 2019 12:10:15 +0000 (08:10 -0400)]
Adwaita: Add color defines from 3.24
Jakub Steiner [Mon, 29 Jul 2019 08:03:19 +0000 (10:03 +0200)]
Adwaita: make links in infobars legible
- No longer tinted blue, make legible
Fixes https://gitlab.gnome.org/GNOME/gnome-software/issues/751
Timm Bäder [Sat, 28 Sep 2019 06:45:11 +0000 (08:45 +0200)]
adwaita: Use border-spacing to style checkbuttons
Timm Bäder [Sat, 28 Sep 2019 06:38:41 +0000 (08:38 +0200)]
radiobutton: Fix a warning in a code sample
Timm Bäder [Thu, 26 Sep 2019 03:46:35 +0000 (05:46 +0200)]
label: Remove set_selectable_hint
It's just updating the cursor, so do it via update_cursor()
Timm Bäder [Thu, 26 Sep 2019 03:42:49 +0000 (05:42 +0200)]
label: Remove gtk_label_realize
We don't need this to update the cursor anymore.
Timm Bäder [Thu, 26 Sep 2019 03:36:49 +0000 (05:36 +0200)]
label: Don't update cursor after unsetting select_info
update_cursor() doesn't do anything in the priv->select_info == NULL
case.
Timm Bäder [Thu, 26 Sep 2019 03:36:19 +0000 (05:36 +0200)]
label: Change cursor even if unrealized
Cursor don't depend on that anymore.
Timm Bäder [Thu, 26 Sep 2019 03:07:17 +0000 (05:07 +0200)]
placesviewrow: popup-menu returns a boolean
Matthias Clasen [Wed, 9 Oct 2019 12:18:26 +0000 (12:18 +0000)]
Merge branch 'wip/carlosg/tablet-invalid-reads-master' into 'master'
Fix invalid reads on tablet input (master)
Closes #2157
See merge request GNOME/gtk!1122
Carlos Garnacho [Tue, 8 Oct 2019 15:56:10 +0000 (17:56 +0200)]
gdk: Avoid poking possibly freed memory
The event may end up freed after delivery, ensure to keep a ref in order
to emit the matching emulated crossed event matching a proximity event.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
Matthias Clasen [Tue, 8 Oct 2019 19:43:14 +0000 (19:43 +0000)]
Merge branch 'wip/chergert/quick-fixes' into 'master'
renderer quick fixes
See merge request GNOME/gtk!1124
Benjamin Otte [Tue, 8 Oct 2019 19:21:57 +0000 (19:21 +0000)]
Merge branch 'wip/chergert/cache-text-render-node' into 'master'
textview: cache paragraph render nodes
See merge request GNOME/gtk!1125
Christian Hergert [Tue, 8 Oct 2019 18:35:49 +0000 (11:35 -0700)]
textview: cache paragraph render nodes
We can avoid recreating a number of text nodes from render_para() on
sub-sequent runs if we cache the rendernode instead of just the
PangoLayout.
When used with GtkSourceMap, this can yield a ~7 FPS improvement during
smooth scrolling at the cost of some more memory.
Christian Hergert [Tue, 8 Oct 2019 17:58:29 +0000 (10:58 -0700)]
gl: remove stray +
Christian Hergert [Tue, 8 Oct 2019 04:36:36 +0000 (21:36 -0700)]
rendernode: remove unused macros
Carlos Garnacho [Tue, 8 Oct 2019 15:46:38 +0000 (17:46 +0200)]
gdk: Fix wl_output accounting on tablet devices
The code managing this accounting mixed seat and tablet output lists,
can't bode well. Fixes invalid reads on list elements, as there are
dangling pointers.
Closes: https://gitlab.gnome.org/GNOME/gtk/issues/2157
Sam Hewitt [Mon, 7 Oct 2019 20:50:34 +0000 (16:50 -0400)]
Adwaita: circular button fix
- remove old border drawing code that was breaking coloured buttons
- fixes #2173
Sam Hewitt [Mon, 7 Oct 2019 19:27:55 +0000 (15:27 -0400)]
Adwaita: osd button fixes
- remove text/icon shadow from osd buttons
- use :only-child to get circular standalone button
- fixes #1696
Sam Hewitt [Mon, 7 Oct 2019 17:05:12 +0000 (13:05 -0400)]
Adwaita: use borders_color for separators
- fixes #2175
Benjamin Otte [Thu, 3 Oct 2019 22:42:28 +0000 (00:42 +0200)]
eventcontrollerkey: Change behavior of contains-focus
contains-focus now returns TRUE when is-focus is TRUE instead of FALSE.
Fixes #2184
Benjamin Otte [Thu, 3 Oct 2019 20:13:54 +0000 (22:13 +0200)]
eventcontrollerkey: Add getters for the properties
...and use them.
Benjamin Otte [Thu, 3 Oct 2019 04:49:32 +0000 (06:49 +0200)]
icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.
Benjamin Otte [Sat, 5 Oct 2019 14:28:44 +0000 (16:28 +0200)]
selectionmodel: Remove doubled semicolon
Alan Mortensen [Sun, 6 Oct 2019 21:36:47 +0000 (23:36 +0200)]
Updated Danish translation of gtk
Daniel Boles [Sun, 6 Oct 2019 19:48:10 +0000 (20:48 +0100)]
Builder: Fix a couple of typos in documentation
Piotr Drąg [Sun, 6 Oct 2019 13:13:31 +0000 (15:13 +0200)]
Update POTFILES.in
Benjamin Otte [Sat, 5 Oct 2019 15:19:04 +0000 (15:19 +0000)]
Merge branch 'gbsneto/vulkan-fixes' into 'master'
Implement VK_KHR_incremental_present
See merge request GNOME/gtk!1116
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 21:53:10 +0000 (18:53 -0300)]
vulkan/context: Implement VK_KHR_incremental_present
This is the Vulkan version of eglSwapBuffersWithDamage(), and
it's always a good idea to limit the number of pixels we're
pushing to the GPU and/or swapping into the display.
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 20:55:25 +0000 (17:55 -0300)]
vulkan/renderpass: Use GENERAL for initial layout
UNDEFINED initial layouts may not preserve the contents
of the attachment after transitioning the layout. We want
them to be preserved because we do partial rendering.
Use GENERAL as the initial layout for render passes.
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 14:52:43 +0000 (11:52 -0300)]
vulkan/image: Set HOST and TRANSFER bits for before barriers
Multiple images in the before barrier array are defined with
VK_ACCESS_TRANSFER_WRITE_BIT and VK_ACCESS_TRANSFER_READ_BIT,
which requires passing VK_PIPELINE_STAGE_TRANSFER_BIT and
VK_PIPELINE_STAGE_HOST_BIT to vkCmdPipelineBarrier().
Pass these flags correctly.
Georges Basile Stavracas Neto [Sat, 5 Oct 2019 14:38:29 +0000 (11:38 -0300)]
wayland: Allow binding to wl_compositor v4
This is a requirement for using VK_KHR_incremental_present.
Vulkan Wayland drivers translate the VkPresentRegionsKHR to
wl_surface.damage_buffer(), which a v4-only request.
Christian Hergert [Fri, 4 Oct 2019 23:30:04 +0000 (23:30 +0000)]
Merge branch 'wip/chergert/textview-widgets' into 'master'
textview: use GtkWidget for borders and center_child
See merge request GNOME/gtk!1099
Christian Hergert [Fri, 4 Oct 2019 02:21:45 +0000 (19:21 -0700)]
textview: use GtkTextViewChild for border and overlay children
This creates a new GtkTextViewChild that can manage overlay children at
given x,y offsets in buffer coordinates. This simplifies GtkTextView by
extracting this from GtkTextWindow as well as providing a real widget for
the borders.
With this change, we also rename gtk_text_view_add_child_in_window() to
gtk_text_view_add_overlay(). For those that were using
GTK_TEXT_WINDOW_WIDGET, they can use a GtkOverlay. It does not appear
that anyone was using GTK_TEXT_WINDOW_(LEFT|RIGHT|TOP|BOTTOM) for widgets
in this fashion, but that can be done by setting a gutter widget with
gtk_text_view_set_gutter(). We can make GtkTextViewChild public if
necessary to simplify this should it become necessary.
GtkTextViewChild will setup a CSS node of either "text" or "border"
depending on the GtkTextWindowType.
The old GtkTextViewChild has been renamed to AnchoredChild as it is only
used for widgets with anchors in the GtkTextBuffer. This also removes the
use of allocated GSList and instead embeds a GQueue and GList to save a
few extraneous allocations.
Christian Hergert [Mon, 23 Sep 2019 23:08:53 +0000 (16:08 -0700)]
textview: revert renaming of buffer_to_surface_coords()
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
Matthias Clasen [Fri, 4 Oct 2019 18:27:05 +0000 (18:27 +0000)]
Merge branch 'list-box-headers' into 'master'
Fix reuse of list box header widgets
See merge request GNOME/gtk!1114
Sam Hewitt [Fri, 4 Oct 2019 18:16:11 +0000 (14:16 -0400)]
Adwaita: new levelbar style
Philip Withnall [Fri, 4 Oct 2019 17:25:34 +0000 (18:25 +0100)]
gtklistbox: Only unparent header rows if they haven’t been reused
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.
Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.
Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Philip Withnall [Fri, 4 Oct 2019 17:25:16 +0000 (18:25 +0100)]
gtklistbox: Factor the new header out into a separate variable
Makes the code a little clearer, but makes no functional changes.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Christoph Reiter [Wed, 2 Oct 2019 19:35:20 +0000 (21:35 +0200)]
Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.
Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.
See #2020. This is a port of !1109 to master
Ask Hjorth Larsen [Wed, 2 Oct 2019 03:54:14 +0000 (05:54 +0200)]
Updated Danish translation of gtk-properties
Ask Hjorth Larsen [Wed, 2 Oct 2019 03:54:12 +0000 (05:54 +0200)]
Updated Danish translation of gtk
Marek Černocký [Wed, 2 Oct 2019 00:06:13 +0000 (02:06 +0200)]
Updated Czech translation