Commit Graph

38920 Commits

Author SHA1 Message Date
Jan Lukas Gernert
318160d836 GtkTreeExpander: claim expander-icon gestures
Claim the pressed, released and canceled gestures
meant for the expander-icon of the TreeExpander.
This avoids selecting the row when expanding or collapsing it.

Closes #4199
2021-08-25 17:50:12 +02:00
Matthias Clasen
5e90d63373 Merge branch 'sloped-caret' into 'master'
Implement sloped caret drawing

See merge request GNOME/gtk!3880
2021-08-25 13:43:24 +00:00
Matthias Clasen
e281bbbb55 Merge branch 'treeexpander-indent-property' into 'master'
GtkTreeExpander: indent-without-expander property

Closes #4175

See merge request GNOME/gtk!3858
2021-08-25 11:48:59 +00:00
Matthias Clasen
2f1db4b77c Use pango_layout_get_caret_pos
This new api returns rectangles for sloped carets,
in contrast to pango_layout_get_cursor_pos, which
always returns a rectangle with a width of zero.
2021-08-25 06:53:53 -04:00
Matthias Clasen
f90e9b26f8 Implement sloped caret drawing
Prepare for Pango to return slope information for carets.

While we are at it, improve the shape of our carets a bit.
2021-08-25 06:53:53 -04:00
Matthias Clasen
b9c51e65c1 Merge branch 'wip/carlosg/gesture-state-in-entries' into 'master'
Claim clicks further at GtkEntry/GtkSearchEntry

See merge request GNOME/gtk!3873
2021-08-24 17:20:20 +00:00
Matthias Clasen
51f953a1aa Revert "imwayland: Tweak preedit text"
This reverts commit d84a028455.

IBus uses the same character now.

Fixes: #4123
2021-08-24 12:53:48 -04:00
Emmanuele Bassi
5e311d4d85 Release an extra reference on GtkExpander:child
The child of a GtkExpander is owned directly by the expander whenever
the "expanded" flag is unset.

We are adding an additional reference to the child of an expander when
expander is not expanded.

Additionally, if a GtkExpander is disposed while not expanded, we need
to explicitly release the reference on the child widget that we own.

This reference leak was masked in GTK3 by GtkContainer removing each
child from the parent container by recursively calling
gtk_widget_destroy().
2021-08-24 11:28:59 +01:00
Carlos Garnacho
e652054d50 gtkpasswordentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-24 01:13:29 +02:00
Carlos Garnacho
58c31b8627 gtkpasswordentry: Consume click events after pressing on icon
This may result in user actions, so the gesture should consume the
events.
2021-08-24 01:12:31 +02:00
Qiu Wenbo
92d2867170 docs: Fix documentation for gtk_icon_view_create_drag_icon
Fixes: #4190
2021-08-24 00:24:08 +08:00
Kalev Lember
552a4b2c82 build: Fix detection for pre-compiled css files
The default theme changed from Adwaita to Default and this tripped up
the logic to detect if the tarball builds contain pre-built css files or
not. Fix this by looking at pre-compiled css files in themes/Default/
instead of themes/Adwaita/.
2021-08-23 16:15:48 +02:00
Carlos Garnacho
7a4afb08bd gtksearchentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
c5cd1ac630 gtkentry: Add a "catchall" click gesture handler
This gesture is set on the whole widget surface, since there's
multiple input targets inside an entry (icons, the GtkText itself)
it makes sense to consider the full entry an area handling clicks.
Ensure these events don't propagate further up, and result in other
actions.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
90edb76415 gtksearchentry: Consume click events after pressing on icon
This results in user actions, so the gesture should consume the
events.
2021-08-23 15:38:33 +02:00
Carlos Garnacho
8f397502df gtktext: Set claimed state on button1 click gesture
All possible ramifications after button1 press (move cursor,
begin drag, begin dnd, select word/line, ...) result in user
actions. The right thing after that is consuming the events,
set the gesture state for that.
2021-08-23 15:28:27 +02:00
Jan Lukas Gernert
1cb17d8613 GtkTreeExpander: indent-for-icon property
A property to determine if the TreeExpander should indent the child
by the width of an expander-icon when it is not expandable.

Closes #4175
2021-08-23 07:54:45 +02:00
Matthias Clasen
417b3f9c6b Implement text transforms for GtkTextView
Add a property to GtkTextTag and do all the
legwork to translate it to the Pango attribute.
2021-08-22 15:57:50 -04:00
Matthias Clasen
2d84a1c63e css: Implement text-transform
Implement the text-transform property from
https://www.w3.org/TR/css-text-3/#text-transform-property
using a new Pango attribute.
2021-08-22 15:57:50 -04:00
Matthias Clasen
ba95ef63da Drop PANGO_VERSION_CHECK checks
We require Pango 1.49 now.
2021-08-22 15:26:23 -04:00
Matthias Clasen
2cc06f60c5 textview: Set line height from markup
Note that we ignore the absolute-line-height
attribute for now.
2021-08-22 15:15:50 -04:00
Matthias Clasen
4759afcc3e textview: Set line height from css
Set the line height in the default attributes from
the CSS style. This makes line height work in
GtkTextView.
2021-08-22 15:15:50 -04:00
Matthias Clasen
66b297e408 textview: Add line height plumbing
This adds a line-height property to GtkTexttag and a
line_height field to GtkTextAttributes, and translates
it to a pango attribute.
2021-08-22 15:15:50 -04:00
Matthias Clasen
ae767dc5bf css: Translate line-height to a Pango
Pango 1.50 introduces a line-height attribute. Use it.
This is enough to make line-height work for labels
and entries.
2021-08-22 15:15:50 -04:00
Matthias Clasen
d923402934 css: Add line-height property
This adds the plumbing to parse the line-height
property from CSS. Widgets are not picking it
up yet.
2021-08-22 15:15:50 -04:00
Matthias Clasen
7be3c2974a windowhandle: Quiet a compiler warning
gesture was left uninitialized in the default case.
2021-08-22 14:19:14 -04:00
Matthias Clasen
fd885e42b0 Merge branch 'drop-gl' into 'master'
gsk: Drop the gl renderer

See merge request GNOME/gtk!3863
2021-08-22 17:04:25 +00:00
Matthias Clasen
1bf5aab18c testutils: Don't include gsk/gl/gskglrenderer.h 2021-08-22 12:29:13 -04:00
Matthias Clasen
5feba67a3d Handle new pango attribute type
Update all the places where we switch over
PangoAttrType to handle PANGO_ATTR_TEXT_TRANSFORM,
and do nothing for now - text-transform support
will land in 4.6.
2021-08-22 11:04:28 -04:00
Matthias Clasen
92817b0603 Merge branch 'cut-shortcut-activation-short' into 'master'
shortcutcontroller: Only do round-robin for mnemonics

Closes #4130

See merge request GNOME/gtk!3824
2021-08-20 13:50:51 +00:00
Matthias Clasen
f8a1726ffa shortcutcontroller: Only do round-robin for mnemonics
Don't do round-robin activation unless we are looking
for mnemonics, where this is an expected feature.

Fixes: #4130
2021-08-20 09:26:37 -04:00
Emmanuele Bassi
12c5518e2b Merge branch 'master' into 'master'
a11y: Send correct object reference for the root accessible

See merge request GNOME/gtk!3800
2021-08-20 13:18:37 +00:00
Matthias Clasen
da1232caaf textview: Don't eat block cursors
We need to render even an empty paragraph when
it has a block cursor at the end. This fixes block
cursors not showing up in empty lines.
2021-08-20 01:57:31 -04:00
Matthias Clasen
f5b6488eb2 window: Make resizeability changes work
We were forgetting to update the toplevel
properties here.
2021-08-19 16:03:58 -04:00
Matthias Clasen
8aa25046dc textview: Improve word selection
Avoid selecting a whole extra paragraph when a select-by-words
selection is extended beyond the end of the previous paragraph.

Fixes: #4177
2021-08-19 00:33:03 -04:00
Matthias Clasen
071a6bcc06 Cosmetics 2021-08-18 22:33:23 -04:00
Matthias Clasen
1599b659cf infobar: Update buildable docs
Document the current state of GtkBuilder support in
GtkInfoBar, not what we had in GTK3.

Fixes: #4164
2021-08-18 17:42:54 -04:00
Matthias Clasen
81e5d4c327 Merge branch 'master' into 'master'
gtkbuilderparser: Fix duplicate object id detection

See merge request GNOME/gtk!3848
2021-08-18 12:00:41 +00:00
Ye Moran
f8111125ef gtkbuilderparser: Fix duplicate object id detection 2021-08-18 12:00:40 +00:00
Matthias Clasen
f6659fea8d imcontext: Improve docs
Add some more docs around GtkIMContext.
2021-08-17 22:33:26 -04:00
Alexander Mikhaylenko
342f02711b widget: Fix gtk_widget_class_query_action() annotations
Add transfer none on all out values as they aren't being copied.
2021-08-11 14:33:38 +05:00
Matthias Clasen
528ebfabf0 Handle the new line height pango attribute
Update all the places where we switch over PangoAttributeType
to handle (and ignore, for now) the new line height attribute.
2021-08-10 08:22:52 -04:00
Matthias Clasen
04f3c8054b Merge branch 'callback-annotation-again' into 'master'
widget: Change callback scope

See merge request GNOME/gtk!3796
2021-08-10 01:16:56 +00:00
Matthias Clasen
4e1ea58503 Cosmetics: Tweak css parser error messages
These show up in tooltips, so they should a) be capitalized
and b) not end with a period.
2021-08-07 18:18:10 -04:00
Matthias Clasen
f328ab9d83 Merge branch 'wip/chergert/revert-top-margin' into 'master'
Revert "textview: fix yoffset position when top_margin is set"

See merge request GNOME/gtk!3828
2021-08-06 13:13:21 +00:00
Matthias Clasen
bdbe0acd1f Merge branch 'matthiasc/for-master' into 'master'
settings: Default gtk-split-cursor to FALSE

See merge request GNOME/gtk!3827
2021-08-05 19:17:54 +00:00
Christian Hergert
fc701baef8 Revert "textview: fix yoffset position when top_margin is set"
This reverts commit 908b1e5e12.

This commit broke top-margin altogether.
2021-08-05 11:52:45 -07:00
Matthias Clasen
a457a81fd9 Merge branch 'matthiasc/for-master' into 'master'
text: Move setup code out of a loop

See merge request GNOME/gtk!3826
2021-08-05 18:45:39 +00:00
Matthias Clasen
4cc7977d36 settings: Default gtk-split-cursor to FALSE
According to Owen, this was the intention when the setting
was added in 2001. It only took us 20 years to fix the
default value.
2021-08-05 14:05:28 -04:00
Matthias Clasen
916886312a Merge branch 'wip/exalm/shadow-extents' into 'master'
Shrink shadow extents

See merge request GNOME/gtk!3825
2021-08-05 16:39:52 +00:00