Benjamin Otte
4fbef5f466
placessidebar: Don't use G_TYPE_POINTER
...
We have a type for lists of GFiles. We invented it for DND.
Keep the annotation info, so bindings don't have to know this.
2021-08-29 06:52:28 +02:00
Benjamin Otte
2e48ff3362
pathbar: Use correct GType in signal
2021-08-29 06:52:28 +02:00
Matthias Clasen
3a50ff57d8
Clean up the code
...
Avoid compiler warnings, and make the code
a bit more compact.
2021-08-26 20:45:17 -04:00
Matthias Clasen
8ac2e8d495
textview: Apply font features from css
...
We were forgetting to propagate these values from
CSS to the default attributes. Share the code for
getting these values out of a GtkCssStyle.
2021-08-26 20:21:23 -04:00
Matthias Clasen
e56cf85fd1
textview: Apply text transform from css
...
We were forgetting to propagate these values from
CSS to the default attributes.
2021-08-26 18:53:30 -04:00
Matthias Clasen
1c6aef1862
textview: Apply line decoration from css
...
We were forgetting to propagate these values from
CSS to the default attributes.
2021-08-26 18:46:57 -04:00
Matthias Clasen
4653cbe56e
Merge branch 'css-letter-spacing' into 'master'
...
textview: Don't forget to collect css letterspacing
Closes #4207
See merge request GNOME/gtk!3889
2021-08-26 19:37:55 +00:00
Matthias Clasen
93148d302f
textview: Don't forget to collect css letterspacing
...
There are more properties missing, this is just
the start.
Fixes : #4207
2021-08-26 15:01:23 -04:00
Christoph Reiter
a0c147d246
build: fix implicit-fallthrough errors with clang
...
The clang build fails due to -Werror=implicit-fallthrough being
on by default and some fallthrough cases not being marked as such.
Use G_GNUC_FALLTHROUGH or duplicate the code in those cases.
2021-08-26 07:08:38 +02:00
Matthias Clasen
989ecf69ad
Merge branch 'new-pango-attributes' into 'master'
...
Support new pango attributes
See merge request GNOME/gtk!3878
2021-08-25 20:11:45 +00:00
Matthias Clasen
b9cad7cc54
textview: Implement new pango attributes
...
Implement the word and sentence attributes.
2021-08-25 14:57:13 -04:00
Matthias Clasen
357b97b5a6
Support new pango attributes
...
Support new Pango attributes for segmentation
in GtkBuilder.
2021-08-25 14:57:13 -04:00
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