Matthias Clasen
2e18f1b6e3
textlayout: Remove an unused function
2021-04-05 08:47:53 -04:00
Matthias Clasen
6cf712591f
textlayout: Avoid allocations for line iteration
...
No need to collect the lines firs, and allocate memory
for that. We can just iterate over them right away.
2021-04-04 23:42:58 -04:00
Matthias Clasen
b32cd5d328
textlayout: Introduce some locals
...
No need to call _gtk_text_buffer_get_btree over and over.
2021-04-04 22:44:09 -04:00
Matthias Clasen
2af99bd65e
textlayout: Create the cursor snapshot on demand
...
We don't need it all the time.
2021-04-04 22:27:53 -04:00
Matthias Clasen
5b0ea70d1c
textattributes: Small docs fix
2021-04-04 22:27:53 -04:00
Matthias Clasen
d719a3d877
textbtree: Return tags in a GPtrArray
...
One of the callers prefers that, it lets us avoid
copying the array in one place, and generally makes
for better code.
2021-04-04 22:27:53 -04:00
Matthias Clasen
b0df8910ba
textlayout: Only get selection color once
...
No need to do this for every paragraph that is
inside the selection.
2021-04-04 14:20:25 -04:00
Matthias Clasen
5b8bf04035
texttag: Just use qsort
...
No point in trying to optimize this.
2021-04-04 14:20:25 -04:00
Matthias Clasen
58e44e296f
textbtree: Inline node data handling
2021-04-04 14:20:25 -04:00
Matthias Clasen
0334d002c0
textbtree: Speed up _gtk_text_btree_find_line_top
...
Another place where we can avoid allocating a stack
piecemeal.
2021-04-04 14:20:25 -04:00
Matthias Clasen
d731ce49ad
textbtree: Don't opencode realloc
...
We can just use g_realloc here.
2021-04-04 14:20:25 -04:00
Matthias Clasen
a93614409e
textbtree: Speed up _gtk_text_line_char_index
...
No need to allocate a stack piecemeal here.
2021-04-04 14:20:25 -04:00
Matthias Clasen
214e2d14be
textbtree: Avoid malloc in one place
2021-04-04 14:20:25 -04:00
Matthias Clasen
67ee6b2740
textlayout: Don't call render_para too much
...
render_para produces no nodes for an empty paragraph.
Don't call it over and over for those.
2021-04-04 14:20:25 -04:00
Matthias Clasen
07a3fb833c
textlayout: Remove some unnecessary code
...
The same field is set again 2 lines down.
2021-04-04 14:20:25 -04:00
Chao-Hsiung Liao
1c419f762b
Update Chinese (Taiwan) translation
...
(cherry picked from commit 3d3912d7f4
)
2021-04-03 23:54:29 +00:00
Matthias Clasen
8d6c7b81e9
Merge branch 'matthiasc/for-master' into 'master'
...
gsk: Rename resource paths
See merge request GNOME/gtk!3399
2021-04-03 20:14:29 +00:00
Matthias Clasen
fcaadf6724
Merge branch 'dotted-lines3' into 'master'
...
Modernize error underlines
See merge request GNOME/gtk!3398
2021-04-03 20:14:13 +00:00
Matthias Clasen
ff38d8cdc0
Modernize error underlines
...
Implement PANGO_UNDERLINE_ERROR as a dotted line, instead of
squiggly, which looks quite dated.
2021-04-03 13:52:56 -04:00
Matthias Clasen
900a4e4d31
gsk: Move shader resources
...
Move the resources of each renderer to its subdirectory.
We've previously done that for the ngl renderer, but it
is better to be consistent and do it for all the renderers.
2021-04-03 08:24:58 -04:00
Matthias Clasen
ee63b84b6a
gsk: Rename resource paths
...
Make the shaders of the gl renderer live under
/org/gtk/libgsk/gl. This is purely cosmetic.
2021-04-03 08:10:58 -04:00
Matthias Clasen
2f1ff307da
Merge branch 'matthiasc/for-master' into 'master'
...
node test: Improve --generate
See merge request GNOME/gtk!3397
2021-04-03 03:20:17 +00:00
Matthias Clasen
a8e8e04496
settings: Make font-size changes apply immediately
...
We need to invalidate the style when font-size changes,
because we propagate this value through the initial
value of the CSS font-size property, and it will not
be recomputed otherwise.
2021-04-02 23:04:09 -04:00
Matthias Clasen
91bcf6f0ba
immulticontext: Unset client widget on delegate change
...
Forgetting to do so was causing the Wayland im context
to leave behind a dead event controller. This was showing
up as a crash when closing the inspector after changing
the im-module property of a GtkText widget. The crash
was delayed until closing the inspector because the
inspector keeps a ref on the event controllers of the
currently shown widget.
2021-04-02 22:24:19 -04:00
Matthias Clasen
a228b2de64
imwayland: Name event controllers
...
This helps with debugging.
2021-04-02 22:24:00 -04:00
Matthias Clasen
cb18437908
widget-factory: Name an event controller
...
This helps with debugging.
2021-04-02 22:23:34 -04:00
Matthias Clasen
23dab885cd
text: Name all event controllers
...
This helps with debugging.
2021-04-02 22:23:03 -04:00
Matthias Clasen
e7284c23da
inspector: Support copying nodes to clipboard
...
Add a button that copies the serialization of the
selected node to the clipboard.
2021-04-02 21:38:14 -04:00
Matthias Clasen
1e1f199b56
node-editor: Support pasting the image
...
Add a button that copies the image to the clipboard.
2021-04-02 21:24:59 -04:00
Matthias Clasen
efb5e793a4
nodeparser: Change the serialization
...
Arrange things so that non-child parameters
are always printed before the children. This
greatly helps with readability, which really
suffers when there's hundreds of lines of indented
children between the node start and its parameters.
Update all affected tests.
2021-04-02 20:38:32 -04:00
Matthias Clasen
f2edf40e48
node test: Improve --generate
...
This is a pet peeve of mine: When we call
g_test_init() before handling --generate,
the random seed spew pollutes the output.
Highly annoying. I've fixes many test binaries
over the years, but more keep popping up.
2021-04-02 20:35:39 -04:00
Matthias Clasen
7cb99a0866
Merge branch 'fix-downscaled-textures' into 'master'
...
ngl: Fix downscaled textures
See merge request GNOME/gtk!3395
2021-04-03 00:18:48 +00:00
Matthias Clasen
36da7c3075
Merge branch 'matthiasc/for-master' into 'master'
...
comboboxtext: Remove misleading docs
Closes #3824
See merge request GNOME/gtk!3396
2021-04-03 00:04:36 +00:00
Matthias Clasen
a3b69f1101
Merge branch 'fix-initial-font-selection' into 'master'
...
fontchooser: Fix initial font selection
Closes #3687
See merge request GNOME/gtk!3392
2021-04-02 23:45:59 +00:00
Matthias Clasen
9f2d1ff264
comboboxtext: Remove misleading docs
...
The entry is no longer accessible.
The docs were outdated.
Fixes : #3824
2021-04-02 19:44:30 -04:00
Matthias Clasen
8d603dfe99
ngl: Avoid huge intermediate textures
...
Instead of rendering the unclipped child to a texture
(and risking blowing the texture size limit, and bad
downscaling), just render the clipped region, and live
with the fact that we can't cache the rendered texture.
This avoid bad artifacts when scrolling long textviews
in rounded clips.
2021-04-02 19:33:44 -04:00
Matthias Clasen
3ff04976e3
ngl: Plug a memory leak
...
This was introduced in f9457af128
.
2021-04-02 18:41:53 -04:00
Matthias Clasen
54ff4fd45f
ngl: Fix downscaled textures
...
It is not pretty, but at least it works now.
2021-04-02 18:33:01 -04:00
Matthias Clasen
0d135d90f0
Merge branch 'flat-button-activating' into 'master'
...
button: Style .keyboard-activating on frameless buttons
See merge request GNOME/gtk!3394
2021-04-02 18:50:16 +00:00
Chris Mayo
ffa9814dd0
button: Style .keyboard-activating on frameless buttons
...
The use of the keyboard-activating CSS class for buttons was added
in [1], but the style did not apply to buttons with has-frame=FALSE.
[1] 00923615f4
("button: Add back visual feedback for keynav", 2021-04-01)
2021-04-02 19:24:51 +01:00
Nathan Follens
a2fec9134b
Update Dutch translation
...
(cherry picked from commit a356bf6fac
)
2021-04-02 18:09:34 +00:00
Matthias Clasen
8caadaf404
fontchooser: Fix initial font selection
...
The change in 740559a54f
to populate the list incrementally
broke initial font selection. Fix that, by trying to select
until the incremental filling is done.
Fixes : #3687
2021-04-02 01:06:23 -04:00
Matthias Clasen
469228fcd7
Merge branch 'theme-reorg' into 'master'
...
Reorganize our themes
See merge request GNOME/gtk!3079
2021-04-02 03:02:49 +00:00
Matthias Clasen
fd329e0ec5
Make theme fallback working with the new names
...
Since we are likely going to see theme names like
Adwaita and HighContrast, make fallback work as follows:
Adwaita -> Default
Adwaita:dark -> Default:dark
HighContrast -> Default:hc
HighContrast:dark -> Default:hc-dark
HighContrastInverse -> Default:hc-dark
Other themes will fall back to Default, as before.
2021-04-01 22:02:38 -04:00
Matthias Clasen
7f4041ec30
Merge branch 'matthiasc/for-master' into 'master'
...
testsuite: Sort gsk compare tests
See merge request GNOME/gtk!3389
2021-04-02 00:38:55 +00:00
Matthias Clasen
5cb5bdc4eb
testsuite: Sort gsk compare tests
...
Easier to find things that way.
2021-04-01 20:07:13 -04:00
Matthias Clasen
08913deba5
Add some more gsk tests
...
The css-background test contains a node pattern that
is optimized in the ngl renderer.
2021-04-01 20:06:40 -04:00
Matthias Clasen
aceeef47f4
Add one more compose test
2021-04-01 20:06:40 -04:00
Matthias Clasen
ddda0ca1db
Merge branch 'button-activate-feedback' into 'master'
...
button: Add back visual feedback for keynav
Closes #3813
See merge request GNOME/gtk!3390
2021-04-01 23:36:32 +00:00
Matthias Clasen
00923615f4
button: Add back visual feedback for keynav
...
We lost the visual feedback for activating a button
via Space or Enter when the :active pseudo-state became
managed. Bring it back with a style class.
Fixes : #3813
2021-04-01 18:38:11 -04:00