Matthias Clasen
60e2242256
Add an icon scrolling demo
...
This is good to exercise the GL renderer icon cache.
2019-10-11 17:36:38 -04:00
Timm Bäder
4f5a9be465
gl renderer: Get blur node child only once
2019-10-11 22:31:33 +02:00
Timm Bäder
6a4c778791
gl renderer: Shorten function
2019-10-11 22:31:33 +02:00
Timm Bäder
1caa95b814
gl renderer: Avoid copying a rect
2019-10-11 22:31:33 +02:00
Matthias Clasen
cf44ba7847
gl: Avoid stray use of doubles
...
Everything else in this code is floats,
so stick to that and avoid unnecessary
precision.
2019-10-11 16:16:09 -04:00
Matthias Clasen
30433d7659
Cosmetics
2019-10-11 16:16:09 -04:00
Matthias Clasen
849b950763
gl: glyph cache tweaks
...
Reduce the cost of lookups by storing
the hash value directly.
2019-10-11 16:15:15 -04:00
Matthias Clasen
8937cd992d
gl: Shrink CachedGlyph structs slightly
...
Plug a hole in this struct.
2019-10-11 16:15:14 -04:00
Matthias Clasen
e296c6a356
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.
2019-10-11 16:15:14 -04:00
Timm Bäder
136400e8a2
gl renderer: Remove unused modelview matrix
2019-10-11 16:56:24 +02:00
Timm Bäder
90199534e0
gl renderer: Don't copy outset shadow node outline
2019-10-11 16:38:58 +02:00
Timm Bäder
f7c64b4ebb
gl renderer: Don't copy colors into render ops
2019-10-11 15:06:51 +02:00
Timm Bäder
f4f060c843
snapshot: Don't move shadows too much
...
dx/dy are relative to the node bounds, which are already moved by x/y.
2019-10-11 13:47:40 +02:00
Timm Bäder
2977e91aed
gl renderer: Grow unblurred outset shadow outline on the gpu
2019-10-11 10:16:39 +02:00
Timm Bäder
0b999c73d1
gl renderer: Fix glsl rounded rect shrinking
...
Previous code would add rounded corners to a rect with all 0 corners
when growing.
2019-10-11 10:15:58 +02:00
Timm Bäder
9b1e0dd4a3
gl renderer: Cosmetics
2019-10-11 09:32:24 +02:00
Timm Bäder
a29826bb71
gl renderer: Only add outset shadow center piece if dx/dy != 0
2019-10-11 08:46:33 +02:00
Daniel Mustieles
a181136646
Updated Spanish translation
2019-10-10 14:00:22 +02:00
Matthias Clasen
5b04201da8
Merge branch 'wip/chergert/avoid-renderop-copy' into 'master'
...
gl: avoid copying RenderOp
See merge request GNOME/gtk!1128
2019-10-09 22:49:36 +00:00
Christian Hergert
528297f5e5
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.
2019-10-09 15:41:53 -07:00
Christian Hergert
b29feb193e
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.
2019-10-09 14:47:23 -07:00
Matthias Clasen
75b5c2a293
Merge branch 'wip/chergert/const-glyph-cache' into 'master'
...
gl: avoid copying GskGLCachedGlyph in lookup
See merge request GNOME/gtk!1127
2019-10-09 21:45:41 +00:00
Christian Hergert
e32c992886
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).
2019-10-09 14:37:08 -07:00
Christian Hergert
c7a5d99286
textview: use gtk_snapshot_new_with_parent()
...
As recommended by Timm Bäder at:
3b959456ac (note_621655)
2019-10-09 12:56:06 -07:00
Christian Hergert
c9ca60c201
gl: short-circuit on NULL program
...
The NULL check is a more inclusive check than each of the individual
op->op checks.
2019-10-09 11:51:32 -07:00
Matthias Clasen
d9f6f26cd8
Merge branch 'wip/chergert/textview-fix-selection' into 'master'
...
textview: fix off-by-one in y_range invalidation
See merge request GNOME/gtk!1126
2019-10-09 17:50:40 +00:00
Christian Hergert
e4a00f864d
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.
2019-10-09 10:43:34 -07:00
Timm Bäder
329f7c1c40
gl renderer: Remove rounded rect intersection code
...
Caused correctness issues.
Fixes #1917
2019-10-09 16:57:22 +02:00
Timm Bäder
c23afb2c86
widget: Compare adjusted sizes in size_allocate
2019-10-09 16:57:22 +02:00
Timm Bäder
e838ea3bc8
gl renderer: Fix scaled fallback node drawing
2019-10-09 16:57:22 +02:00
Timm Bäder
e5de03144f
inspector: Don't add padding to spinbuttons
...
That looks stupid.
2019-10-09 16:57:22 +02:00
Timm Bäder
e325f65c8a
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.
2019-10-09 16:57:22 +02:00
Timm Bäder
2a40ff1b47
Adwaita: add statusbar padding back
...
We removed the widget margins from the ui file over 2 years ago.
2019-10-09 16:57:22 +02:00
Timm Bäder
371c325ed1
statusbar: Use a bin layout
2019-10-09 16:57:22 +02:00
Timm Bäder
542b95e7e8
widget-factory: Remove double border around textview
...
Replace the scrolledwindow border with two separator on top/bottom.
2019-10-09 16:57:22 +02:00
Timm Bäder
3d3525a589
stacksidebar: Inherit from GtkWidget
...
The child widgets are completely managed by the stacksidebar itself, so
this has no business being a GtkBin.
2019-10-09 16:57:22 +02:00
Timm Bäder
553c458e5a
Adwaita: Remove superfluous border from stacksidebar
...
We already get a border from .sidebar
2019-10-09 16:57:22 +02:00
Timm Bäder
7cdb8d8565
gtk-demo: Fix up sidebar demo style
...
Remove a superfluous separator and add the icon-dropshadow class to the
gtk logo
2019-10-09 16:57:22 +02:00
Timm Bäder
172f68e77d
popovermenu: Switch to main submenu before mapping
2019-10-09 16:57:22 +02:00
Timm Bäder
fb1145d72d
popovermenu: Only close if there's a new focus widget
...
Makes sense and otherwise we end up closing the popover for no reason
2019-10-09 16:57:22 +02:00
Timm Bäder
bd9687a4f2
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.
2019-10-09 16:57:22 +02:00
Timm Bäder
8928323c6b
popover2.ui: Stop trying to set GtkModelButton:label
...
The property is called "text"
2019-10-09 16:57:22 +02:00
Timm Bäder
c7203550a2
testmodelbutton: Remove toggles for removed properties
2019-10-09 16:57:22 +02:00
Timm Bäder
49887d4c81
filechooserbutton: Only destroy existing native dialogs
2019-10-09 16:57:22 +02:00
Timm Bäder
d8c940325c
widget: Create finalize assertions in destroy()
2019-10-09 16:57:22 +02:00
Timm Bäder
3944d64d08
demo: Don't manually add labels to menubuttons
2019-10-09 16:57:22 +02:00
Timm Bäder
e20f547317
demo: Fix modelbutton demo
2019-10-09 16:57:22 +02:00
Timm Bäder
a3cef6c05e
label: Use TRUE/FALSE instead of 1/0
2019-10-09 16:57:22 +02:00
Timm Bäder
11ee72fc7e
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.
2019-10-09 16:57:22 +02:00
Timm Bäder
bcd8941769
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.
2019-10-09 16:57:22 +02:00