Goran Vidović
0b1845b0cb
Update Croatian translation
2019-10-17 11:23:00 +00:00
Benjamin Otte
342d88a1dc
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1136
2019-10-16 20:25:57 +00:00
Benjamin Otte
bab7f56f64
entry: Return boolean from gtk_entry_grab_focus_without_selecting()
...
This follows recent changes to gtk_widget_grab_focus().
2019-10-16 22:08:53 +02:00
Benjamin Otte
9b87cace47
render: Fix goto
...
if we have pushed a shadow, we better pop it again.
Broken since d1ea591f18
2019-10-16 21:45:33 +02:00
Benjamin Otte
c2a32afe97
Initialize cursor alpha to 1.0
...
That way, non-animated cursors don't disappear.
2019-10-16 21:45:33 +02:00
Benjamin Otte
d0e14f79a6
bindings: Make gtk_bindings_add_callback() allow for variant args
2019-10-16 21:45:33 +02:00
Benjamin Otte
7f2ab0d576
bindings: Refactor
...
Refactor code so that each bindings type has its own struct instead of
sharing one big union.
2019-10-16 21:45:33 +02:00
Timm Bäder
d36d7d93e6
Merge branch 'fix-popover-styles' into 'master'
...
Fix popover styles (GTK 4)
Closes #2061
See merge request GNOME/gtk!1079
2019-10-16 07:42:45 +00:00
Benjamin Otte
7fc74eaeae
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1133
2019-10-15 18:47:57 +00:00
Benjamin Otte
4eb077979f
widget: Don't grab focus when can-focus == false
...
... inside the default vfunc.
Instead, walk the children until we find the first widget that can be
focused. If no child can be focused, return FALSE from grab_focus.
2019-10-15 16:33:05 +02:00
Benjamin Otte
9c1b1eb894
widget: Insist that widgets are rooted to be focusable
...
This check was in the vfunc before, but it's a general rule, so apply it
before.
2019-10-15 16:33:05 +02:00
Benjamin Otte
14c34a7014
widget: Make grab_focus() fail on insensitive widgets
...
We can return FALSE early now instead of silently failing in
gtk_window_set_focus().
2019-10-15 16:33:05 +02:00
Benjamin Otte
427deb4f13
widget: Make gtk_widget_grab_focus() return a boolean
...
So now it can actually fail.
It doesn't yet though.
2019-10-15 16:33:05 +02:00
Benjamin Otte
a1a70a1130
bindings: Add gtk_binding_entry_add_callback()
...
This allows bindings that have no public API.
2019-10-15 07:17:30 +02:00
Benjamin Otte
19304c1d2c
bindings: Add gtk_binding_entry_add_action()
...
Allows registering bindings for activating widget actions, as an
alternative to signal emissions.
2019-10-15 07:17:30 +02:00
Benjamin Otte
01be7f0666
widget: Make gtk_widget_activate_action() return TRUE/FALSE
...
TRUE if an action was successfully activated, FALSE if it wasn't found.
2019-10-15 07:17:30 +02:00
Benjamin Otte
1b68e76852
gtk: Add GtkNoSelection
...
Allows not to have anything selected.
2019-10-15 07:17:07 +02:00
Benjamin Otte
9f5ee77a44
singleselection: Fix model property
...
1. Make the model property construct-only. Allowing to change the
model has invalid side effects.
2. Add a getter for the model property.
2019-10-15 07:17:07 +02:00
Benjamin Otte
6d20fe0bf9
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.
2019-10-15 07:17:07 +02:00
Timm Bäder
bb56b4ef5d
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.
2019-10-15 07:13:28 +02:00
Timm Bäder
5ea21f7910
gl renderer: Fix an out of bounds read
...
Fixes #2200
2019-10-15 07:13:14 +02:00
Matthias Clasen
acb7f437fa
notebook: Avoid a crash
...
This is fallout from turning the menu into
a popover, causing it to be be a child.
2019-10-12 19:00:35 -04:00
Matthias Clasen
7bff3abe8e
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.
2019-10-12 18:53:22 -04:00
Matthias Clasen
e46a7ca706
shadow cache: Remove outdated comments
...
No comments are better than outdated comments.
2019-10-12 17:06:39 -04:00
Matthias Clasen
e9ba7eda47
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.
2019-10-12 12:37:11 -04:00
Matthias Clasen
88649b6aae
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.
2019-10-12 12:37:11 -04:00
Matthias Clasen
60d63bbada
gl: Improve debug spew for caches
...
Dump similar information for both caches,
and correct the unused percentage for
the atlases.
2019-10-12 12:37:11 -04:00
Timm Bäder
b8f62d1e10
Update stackswitcher CSS
...
Add the spacing to circular stack switchers back.
2019-10-12 18:26:54 +02:00
Timm Bäder
989307e4c2
stackswitcher: Inherit from GtkWidget
2019-10-12 18:12:58 +02:00
Timm Bäder
7344723a95
colorscale: Remove some duplicated code
2019-10-12 17:59:23 +02:00
Timm Bäder
4c4bca0c39
menuitem: Remove unused members
2019-10-12 17:59:23 +02:00
Timm Bäder
d570121704
menu: Align function parameters
2019-10-12 17:59:23 +02:00
Timm Bäder
93122ac935
menu: Remove unused members
2019-10-12 17:59:23 +02:00
Timm Bäder
f9e100cb1e
menu: Remove menu_queue_resize
...
The have_layout flag is unused, so this is equal to a normal
gtk_widget_queue_resize().
2019-10-12 17:59:23 +02:00
Matthias Clasen
d3ad178d95
Merge branch 'glyphcache-fiddling' into 'master'
...
Glyphcache fiddling
See merge request GNOME/gtk!1132
2019-10-12 15:56:08 +00:00
Matthias Clasen
123cbd42bb
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.
2019-10-12 11:46:10 -04:00
Matthias Clasen
977ac2b31f
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.
2019-10-12 11:35:46 -04:00
Timm Bäder
bcdc3b706c
iconcache: Fix icon padding
2019-10-12 09:17:24 +02:00
Matthias Clasen
61db797f29
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.
2019-10-12 01:35:13 -04:00
Matthias Clasen
0a876f11a0
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.
2019-10-12 01:00:08 -04:00
Matthias Clasen
019e3c02ed
Make the scrolling demo more versatile
...
Allow to swap out the content, so we can compare
text and icon scrolling.
2019-10-11 22:04:30 -04:00
Matthias Clasen
1c17316f9c
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.
2019-10-11 21:17:30 -04:00
Matthias Clasen
646c5f369f
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.
2019-10-11 21:16:40 -04:00
Matthias Clasen
8839e10d44
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.
2019-10-11 20:42:24 -04:00
Matthias Clasen
9b61bfb3c8
gl: Speed up icon caching
...
Avoid expensive padding, and just upload the
image in several slices.
2019-10-11 19:36:26 -04:00
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