Benjamin Otte [Sun, 13 Oct 2019 19:00:40 +0000 (21:00 +0200)]
expander: Rename CSS nodes
The expander icon is renamed from "arrow" to "expander".
The expander widget itself is renamed from "expander" to
"expander-widget" (Better ideas welcome).
This makes it possible to have an "expander" icon in more places then
the GtkExpander widget (in particular in tree lists) and not
confuse it with arrows.
Timm Bäder [Tue, 15 Oct 2019 05:13:28 +0000 (07:13 +0200)]
cssimagebuiltin: Don't create cairo nodes for empty icons
GTK_CSS_IMAGE_BUILTIN_NONE is not going to draw anything of course, so
don't bother creating an empty cairo node for it.
Timm Bäder [Tue, 15 Oct 2019 05:13:14 +0000 (07:13 +0200)]
gl renderer: Fix an out of bounds read
Fixes #2200
Matthias Clasen [Sat, 12 Oct 2019 23:00:35 +0000 (19:00 -0400)]
notebook: Avoid a crash
This is fallout from turning the menu into
a popover, causing it to be be a child.
Matthias Clasen [Sat, 12 Oct 2019 22:26:09 +0000 (18:26 -0400)]
glyph cache: Fix handling of big glyphs
We were putting big glyphs in the cache, in their
own texture, but forgetting to mark the texture
as permanent, so it could be reused, leading to
occasional misrendering. Fix this by marking these
textures as permanent, and explicitly freeing them
when the cache entry gets old.
Matthias Clasen [Sat, 12 Oct 2019 21:06:39 +0000 (17:06 -0400)]
shadow cache: Remove outdated comments
No comments are better than outdated comments.
Matthias Clasen [Sat, 12 Oct 2019 16:34:56 +0000 (12:34 -0400)]
gl: Increate the cache check frequency
Otherwise, we spread the cache over more atlases
than necessary, increasing the amount of texture
changes in each frame.
Matthias Clasen [Sat, 12 Oct 2019 16:33:43 +0000 (12:33 -0400)]
gl: Interleave cache aging
Every few frames, we do extra work for the
cache aging. Arrange for the glyph and icon
caches to not cause extra work on the same
frame, to smooth things out.
Matthias Clasen [Sat, 12 Oct 2019 16:32:49 +0000 (12:32 -0400)]
gl: Improve debug spew for caches
Dump similar information for both caches,
and correct the unused percentage for
the atlases.
Timm Bäder [Sat, 12 Oct 2019 16:26:54 +0000 (18:26 +0200)]
Update stackswitcher CSS
Add the spacing to circular stack switchers back.
Timm Bäder [Sat, 12 Oct 2019 16:09:12 +0000 (18:09 +0200)]
stackswitcher: Inherit from GtkWidget
Timm Bäder [Sat, 12 Oct 2019 15:53:59 +0000 (17:53 +0200)]
colorscale: Remove some duplicated code
Timm Bäder [Sat, 12 Oct 2019 15:41:20 +0000 (17:41 +0200)]
menuitem: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:37:37 +0000 (17:37 +0200)]
menu: Align function parameters
Timm Bäder [Sat, 12 Oct 2019 15:27:58 +0000 (17:27 +0200)]
menu: Remove unused members
Timm Bäder [Sat, 12 Oct 2019 15:24:42 +0000 (17:24 +0200)]
menu: Remove menu_queue_resize
The have_layout flag is unused, so this is equal to a normal
gtk_widget_queue_resize().
Matthias Clasen [Sat, 12 Oct 2019 15:56:08 +0000 (15:56 +0000)]
Merge branch 'glyphcache-fiddling' into 'master'
Glyphcache fiddling
See merge request GNOME/gtk!1132
Matthias Clasen [Sat, 12 Oct 2019 15:46:10 +0000 (11:46 -0400)]
gl: Make icon cache work like glyph cache
Replace timestamp tracking with an accessed bit
here too, to keep the glyph and icon cache code
similar.
Matthias Clasen [Sat, 12 Oct 2019 15:03:04 +0000 (11:03 -0400)]
gl: Do less work on glyph caching
There is no need for us to be very precise about
aging the glyph entries. It is enough to check
occasionally and mark old entries. This reduces
the overhead of work we do every frame on the
caches, at the cost of letting glyphs linger
a bit longer in the cache.
Timm Bäder [Sat, 12 Oct 2019 07:17:24 +0000 (09:17 +0200)]
iconcache: Fix icon padding
Matthias Clasen [Sat, 12 Oct 2019 05:35:13 +0000 (01:35 -0400)]
gl: Simplify glyph cache lookup
Make this function more similar to the icon
cache equivalent, and simplify it a bit. We
don't use the boolean return, and we don't need
to look at the age of entry when marking it
used.
Matthias Clasen [Sat, 12 Oct 2019 05:00:08 +0000 (01:00 -0400)]
gl: Don't use memcmp for comparing cache keys
Some innocent change made us use a stack-allocated
key, and things broke. Lets go back to comparing
cache keys field by field.
Matthias Clasen [Sat, 12 Oct 2019 02:04:30 +0000 (22:04 -0400)]
Make the scrolling demo more versatile
Allow to swap out the content, so we can compare
text and icon scrolling.
Matthias Clasen [Sat, 12 Oct 2019 01:17:30 +0000 (21:17 -0400)]
gl: Handle row stride for icon cache upload
Same as the previous commit: Downloading a texture
may in theory give us data with a stride, so handle
that.
Matthias Clasen [Sat, 12 Oct 2019 01:16:40 +0000 (21:16 -0400)]
gl: Handle row stride for glyph cache upload
In theory, we can have data with a stride here,
so set the necessary parameters to tell GL about
it.
Matthias Clasen [Sat, 12 Oct 2019 00:42:24 +0000 (20:42 -0400)]
gl: Do less work to maintain caches
Remember which atlases were removed, and only
check those when looking for icons or glyphs
to remove. For most frames, we don't have to
check at all since no atlases were removed.
Matthias Clasen [Fri, 11 Oct 2019 23:36:26 +0000 (19:36 -0400)]
gl: Speed up icon caching
Avoid expensive padding, and just upload the
image in several slices.
Matthias Clasen [Fri, 11 Oct 2019 21:35:58 +0000 (17:35 -0400)]
Add an icon scrolling demo
This is good to exercise the GL renderer icon cache.
Timm Bäder [Fri, 11 Oct 2019 19:56:12 +0000 (21:56 +0200)]
gl renderer: Get blur node child only once
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.