Timm Bäder
7ccd6597c3
Remove gtkutils{.c,private.h}
...
All but one functions are unused. Move the remaining one into
gtkmodules.c, its only caller.
2020-01-26 18:21:07 +01:00
Timm Bäder
355a417dba
cssparser: make a few local variables const
2020-01-26 18:21:07 +01:00
Timm Bäder
36e3f4d902
cssprovider: Parse selectors without a GList
...
The maximum length of this list in Adwaita is 18, so use a generous
maximum length of 64 for the selector list of a ruleset.
2020-01-26 18:21:07 +01:00
Timm Bäder
69fe705d0d
GtkCssImageUrl: Implement is_computed()
2020-01-26 18:21:07 +01:00
Timm Bäder
1a56a10fc1
cssimage: Add gtk_css_image_to_string()
...
In line with all the other _to_string() implementations
2020-01-26 18:21:07 +01:00
Timm Bäder
4287f0def4
window: Replace GtkStyleContext use to get surface transform
...
We have GtkCssBoxes for this these days.
2020-01-26 18:21:07 +01:00
Matthias Clasen
7bebc3e2b2
Revert "lookup stats"
...
This reverts commit 3d9e3390f1
.
2020-01-25 23:49:33 -05:00
Matthias Clasen
b4e2df8fca
Revert "css: Split style into groups"
...
This reverts commit 0df0de0b5d
.
2020-01-25 23:49:17 -05:00
Matthias Clasen
0df0de0b5d
css: Split style into groups
2020-01-25 23:47:02 -05:00
Matthias Clasen
53c22bf833
Adwaita: take out an unnecessary rule
...
The comment says setting caret-color to currentColor
shouldn't be necessary, and it is right.
2020-01-25 18:38:42 -05:00
Matthias Clasen
d8144ec497
Adwaita: drop the *
2020-01-25 18:20:40 -05:00
Matthias Clasen
3d9e3390f1
lookup stats
2020-01-25 18:20:26 -05:00
Matthias Clasen
03595f9567
Fix a scrollbar sizing issue
...
The recent Adwaita changes inadvertendly made scrollbars
resize on hover. Fix that, by reinstating some lost rules.
2020-01-25 15:05:14 -05:00
Matthias Clasen
64e026d0a9
Revert "Ensure icon themes are loaded with other themes"
...
This reverts commit 88d26b7549
.
This change caused GtkShortcutWindow to not work anymore,
and we are fixing icon themes differently, anyway.
2020-01-25 14:32:01 -05:00
Matthias Clasen
ac902e697e
popover: Stop using style context getters
2020-01-25 14:18:22 -05:00
Matthias Clasen
f1ff69963e
drag icon: Stop using style context getters
...
Just go to the css node directly.
2020-01-25 14:18:22 -05:00
Matthias Clasen
731ae8f39e
gskpango: Stop using style context getters
...
Just go to the css nodes directly.
2020-01-25 14:18:22 -05:00
Matthias Clasen
7da6fdc30e
widget: Stop using style context internally
2020-01-25 11:05:27 -05:00
Matthias Clasen
1eec7362b9
Adwaita: Fix some entry styling
...
This was accidentally broken when parent selectors
were introduced here.
2020-01-24 21:01:42 -05:00
Matthias Clasen
a105256611
GtkSpinner: Pay attention to style changes
...
Make GtkIcon redraw and resize when style changes
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
2ee04ee8ed
GtkPaned: Pay attention to style changes
...
Make GtkPaned redraw and resize when style change
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
6e358e2a49
GtkIcon: Pay attention to style changes
...
Make GtkIcon redraw and resize when style changes
require it.
2020-01-24 20:55:42 -05:00
Matthias Clasen
71ee4df357
css: Update affects flags for icons
...
We want to differentiate what requires recreating the
texture and what doesn't. In particular, the current
flags are not handling symbolic icons right.
2020-01-24 20:55:42 -05:00
Matthias Clasen
53bc1d60c4
Revert "css: Print selectors"
...
This reverts commit da5d524324
.
And this one too. The commits are there, if people need this
kind of statistics again, they can just be cherry-picked.
2020-01-24 11:51:18 -05:00
Matthias Clasen
5b6b4f5075
Revert "css: Print out relative costs of selectors"
...
This reverts commit 5dcce0c0bd
.
I forgot to ifdef a few things in here, so lets take this out
again.
2020-01-24 11:50:40 -05:00
Matthias Clasen
16654eeef4
Merge branch 'matthiasc/for-master' into 'master'
...
Matthiasc/for master
See merge request GNOME/gtk!1348
2020-01-24 16:20:42 +00:00
Matthias Clasen
871959c88c
Adwaita: Drop selection mode
...
This is not really a feature that GTK has; and it lets
us drop a significant amount of css.
2020-01-24 09:09:27 -05:00
Matthias Clasen
55d08d8400
Adwaita: Drop menu remnants
...
Menus are gone.
2020-01-24 09:09:27 -05:00
Matthias Clasen
5dcce0c0bd
css: Print out relative costs of selectors
...
Count how often each tree node is visited, and print the number
at the end. This gives a good indication what selectors are costly
and should be avoided. #ifdefed out.
2020-01-24 09:09:08 -05:00
Matthias Clasen
975fe76a0e
Adwaita: Remove a wildcard rule for tooltips
...
These rules are expensive, and don't seem to make
any difference for typical tooltip content.
2020-01-24 09:09:08 -05:00
Matthias Clasen
00be314feb
Adwaita: Drop menuitem support
...
menuitems don't exist anymore.
2020-01-24 09:09:08 -05:00
Matthias Clasen
da5d524324
css: Print selectors
...
Add code that prints all the selectors when a theme
is loaded. #ifdefed out.
2020-01-24 09:08:52 -05:00
Timm Bäder
8e41fa2778
widget: Use gsk_transform_transform_point() in gtk_widget_pick()
...
This also covers the 2D_AFFINE case.
2020-01-24 06:19:16 +01:00
Timm Bäder
7855a98fd1
cssimageicontheme: Avoid copying colors
2020-01-24 06:08:39 +01:00
Timm Bäder
aea27b86c1
cssimagepaintable: Implement is_computed()
2020-01-24 06:08:39 +01:00
Timm Bäder
d4caf3d679
cssimagescaled: Implement is_computed()
2020-01-24 06:08:39 +01:00
Timm Bäder
d9652675ef
cssimagerecolor: Implement is_computed()
2020-01-24 06:08:39 +01:00
Matthias Clasen
7e4feb092b
colorbutton: Use a css name
...
This was the sole widget to show up as 'widget' in
the css tree.
2020-01-23 23:48:43 -05:00
Matthias Clasen
86aa011587
Adwaita: Use child selectors in many more places
...
These are much cheaper to match than descendent
selectors, so use them whenever we know the element
is a direct child.
2020-01-23 23:48:43 -05:00
Matthias Clasen
f9e613f8fd
text: Don't compute invisible char in init
...
This causes us to create a pango layout and
validate the css style, a high-overhead
operation. Just do it when the entry is set
to be invisible.
2020-01-23 15:12:38 -05:00
Matthias Clasen
e13692c52f
Fix Emoji completion
...
This was broken in various ways; Tabbing between pages
was causing segfaults, and using the hover state like
this does not work anymore, with hover now being completely
managed by GTK. Use focus instead, and also fix up the
style.
2020-01-23 14:07:09 -05:00
Matthias Clasen
cbed409f52
Replace .emoji with emoji for css
2020-01-23 14:07:09 -05:00
Matthias Clasen
0351f27af2
Adwaita: Drop .context-menu
...
We are not using it anymore, and yet fonts on a bold
textview are fine. So no need for this.
2020-01-23 14:07:09 -05:00
Matthias Clasen
f84ecf9cd2
Adwaita: Just use .menu, instead of .appmenu
...
No need for this one-off class, there's no other menus
that could show up here.
2020-01-23 14:07:09 -05:00
Matthias Clasen
f5865b125e
Add profiler marks around css selector tree building
...
This is a big part of theme loading, and worth
showing in traces.
2020-01-23 10:29:22 -05:00
Matthias Clasen
3483c1a45b
Adwaita: Remove .entry-tag class
...
Not used in GTK.
2020-01-23 00:14:49 -05:00
Matthias Clasen
5cc088128f
Adwaita: Remove .rubberband class
...
All GTK widget are using a rubberband element now.
2020-01-23 00:13:54 -05:00
Matthias Clasen
c4548e9c7b
Adwaita: Remove .location-bar class
...
Not used in GTK.
2020-01-23 00:08:53 -05:00
Matthias Clasen
5d6aeb4bf7
Adwaita: Remove gtkstyle-fallback
2020-01-23 00:04:41 -05:00
Matthias Clasen
560e03f962
Adwaita: Remove the .drag-icon class
...
This class was not used in GTK.
2020-01-22 23:57:30 -05:00
Matthias Clasen
c3f1ff7db4
pathbar: Use a css name insead of a style class
...
Use pathbar for GtkPathBar in css, instead of the
previous .path-bar. Update Adwaita to match.
2020-01-22 23:56:22 -05:00
Matthias Clasen
88d26b7549
Ensure icon themes are loaded with other themes
...
Trigger icon theme loading from the code in GtkApplication
where we set up the icon theme search path. This makes
it happen before the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
4ac8011126
icontheme: Add profiler marks around icon theme loading
...
This is happening during the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
9b29da93b6
iconhelper: Add profiler marks around icon loading
...
These mainly happen during the first frame, causing
it to be longer than 'normal' frames.
2020-01-22 23:44:01 -05:00
Matthias Clasen
0fe9643728
css: Add a profiler mark around theme loading
...
This is also time spent before the first frame.
2020-01-22 23:44:01 -05:00
Matthias Clasen
73a214d1a9
application: Add some profiler marks
...
Add marks around gtk_init and application startup
helps to understand where the time before the first
frame goes.
2020-01-22 23:44:01 -05:00
Matthias Clasen
278762f00a
gtk: Clearer names for profiler marks
...
Naming matters. Don't be overly generic here.
2020-01-22 16:38:40 -05:00
Matthias Clasen
119457279b
window: Rename a profiler mark
...
The "layout" name was already taken for the frame clock
phase by that name. Oops.
2020-01-22 15:12:03 -05:00
Matthias Clasen
95ed9de706
icontheme: Add profiler marks for loading icons
...
This helps to clearly identify the places where we
do IO, in profiler traces.
2020-01-22 15:12:03 -05:00
Jakub Steiner
feecfcab27
Adwaita: general typography classes
...
- many moons and some iterations later, these are the suggested
general typographic styles. Already being referenced in apps like
Banner Viewer (for now shipping custom definitions)
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/1808
2020-01-22 12:02:51 +01:00
Matthias Clasen
5014b2a7fe
widget: Add profiler marks
...
This gives high-level entries for the duration of
snapshotting and layout in the frame cycle.
2020-01-21 23:43:37 -05:00
Matthias Clasen
8cb375de11
window: Add a profiler mark around size allocation
...
This give a high-level entry for the duration of size allocation
in the frame cycle.
2020-01-21 23:43:01 -05:00
Matthias Clasen
7927bcf6c5
container: Remove an unnecessary check
...
GtkWindow implements GtkRoot, so we can avoid
treating them separately.
2020-01-21 23:19:24 -05:00
Matthias Clasen
820c9403e3
cssnode: Make the profiler support unconditional
2020-01-21 11:38:34 -05:00
Benjamin Otte
2a5a52dd4b
selector: Add GtkSelectorCategory
...
This will make it easier to write more complex matching algorithms.
2020-01-21 16:59:37 +01:00
Benjamin Otte
e6a0a2f587
stylecontext: Remove excess gtk_css_node_invalidate() call
...
This call is not necessary, because gtk_css_node_set_parent() does the
right thing. (It probably hasn't been necessary for years, but I'm
not gonna try my luck on GTK3 at this stage.)
This code is usually called the first time
gtk_widget_get_style_context() is called on a widget and its style
context gets create. At that point however, the css nodes are in the
right place already, so no invalidation should happen.
2020-01-21 14:49:25 +01:00
Benjamin Otte
631ea5caac
Merge branch 'otte/for-master' into 'master'
...
Otte/for master
See merge request GNOME/gtk!1333
2020-01-21 12:09:26 +00:00
Benjamin Otte
d59784f7c7
win32: Don't save/restore the context for querying the font
...
Use the font in the current state.
2020-01-21 12:48:20 +01:00
Benjamin Otte
193eb5b0dd
widget: Remove gtk_widget_get_path()
2020-01-21 12:47:16 +01:00
Benjamin Otte
6a1adf6f1a
cssnode: Remove unused widget path vfuncs
2020-01-21 12:47:16 +01:00
Benjamin Otte
563ad2db1b
containter: Remove gtk_container_get_path_for_child()
2020-01-21 12:47:16 +01:00
Benjamin Otte
c85d9a3259
stylecontext: Change semantics of gtk_style_context_get_path()
...
Widget contexts now return NULL here. A non-NULL result requires a
previous call to gtk_style_context_set_path()
2020-01-21 12:47:16 +01:00
Benjamin Otte
b9c81b1b94
widget: Initialize cssnode name asap
...
That way, it's correct in subclass's init functions.
2020-01-21 12:47:16 +01:00
Matthias Clasen
a38ba91e35
Add some static assertions
...
Add assertions that ensure the relationships between
css property IDs that we rely on are preserved.
2020-01-20 22:54:26 -05:00
Matthias Clasen
a350c2452a
Add profiler support for css validation
...
Push numbers about css validation and style creation
to sysprof.
2020-01-20 21:55:16 -05:00
Benjamin Otte
025902b9fb
textview: Make cursor work when blinking is disabled
2020-01-21 01:42:00 +01:00
Matthias Clasen
7e2e92a87e
cssselector: Inline a few things
2020-01-19 15:56:54 -05:00
Matthias Clasen
be4d42507c
style cascade: Remove some pointless casts
...
The casts and checks in gtkstylecascade.c are leftovers
from when we had GtkStyleProviderPrivate, and no longer
serve any purpose.
2020-01-19 15:56:54 -05:00
Matthias Clasen
6e88ccf7fb
pick: Take advantage of transform categories
...
Transform categories let us easily avoid doing matrix math
when we can just do a simple translation.
2020-01-19 15:56:54 -05:00
Matthias Clasen
cec4c15f05
Refactor gtk_widget_pick
...
Split this into a recursive part and a public
entry point. This lets us avoid some duplicate
checks.
2020-01-19 15:56:54 -05:00
Matthias Clasen
95f00c6071
css: Redo the pseudoclass selectors
...
There is no need to duplicate the classes, we can make
do with a single class for all the states.
2020-01-18 23:06:25 -05:00
Matthias Clasen
55cfeccfd2
css: Go back to clearing out selectors
...
Now that we use the selector tree for change computation
again, we don't need the ruleset selectors anymore.
Bring back the code that cleans them out.
2020-01-18 23:06:25 -05:00
Matthias Clasen
a463dccd81
Refine the selector tree printing
...
Also show which tree nodes have exact matches.
2020-01-18 14:32:55 -05:00
Matthias Clasen
a5530caec3
Actually turn of css value accounting
...
We need an #undef here. While doing so, make sure
it compiles without warnings when disabled.
2020-01-18 14:30:23 -05:00
Matthias Clasen
92cfc03821
inspector: Avoid an array overrun
...
Commit 3f56af3738
added a new value to the
GdkInputSource enum, forgetting that the inspector
has an array of names to match this enum.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2385
2020-01-18 11:49:16 -05:00
Timm Bäder
26506b0a15
cssimagefallback: Don't snapshot invisible colors
...
This avoids a few render nodes later.
2020-01-18 08:49:52 +01:00
Timm Bäder
f8fa946989
widget: Get opacity without GtkStyleContext
...
GtkStyleContext is really just unnecessary here.
2020-01-18 08:49:52 +01:00
Timm Bäder
119ebe1d70
cssstyle: set font variations in get_pango_font()
...
Doesn't make sense to set all the css values on the font description in
there except for the font variations, so do these here as well.
2020-01-18 08:49:52 +01:00
Timm Bäder
dda54b2b8f
widget: Get DPI from style directly
...
Instead of going through GtkStyleContext.
2020-01-18 08:49:52 +01:00
Timm Bäder
821efcb725
cssstyle: Implement get_pango_font() directly
...
Instead of going through the slow GValue code path. This function was
unused, so use it in GtkWidget's update_pango_context() now.
2020-01-18 08:49:52 +01:00
Matthias Clasen
f5182f1c35
css: Mark transform value as computed
...
This is not very useful, since transitions generate
a ton of transforms anyway.
2020-01-18 08:49:52 +01:00
Matthias Clasen
1efa39672b
css: Simplify default values
...
We no longer need to create one-element arrays or
corners with two identical values.
2020-01-18 08:49:52 +01:00
Matthias Clasen
3f38a1c94c
css: Re-add a lost special case
...
When the border-style special cases were moved in
c687f485fd
, the one for outline-width was lost.
Make the code more compact, and bring the special
case back.
2020-01-18 08:49:52 +01:00
Timm Bäder
d861dd5df8
csshorthandproperty: Try to avoid allocating a GString for 1 font
2020-01-18 08:49:52 +01:00
Timm Bäder
8c98fd2e46
cssdimensionvalue: remove early-out code from transition()
...
We do this directly in gtk_css_value_transition() now
2020-01-18 08:49:52 +01:00
Timm Bäder
2e89c5360a
numbervalue: Add early-out to multiply()
...
If the factor is 1, we already know what the result is going to be.
2020-01-18 08:49:52 +01:00
Timm Bäder
e448fc41f3
cssnumbervalue: Move early-out code to GtkCssValue
...
These checks make sense for all css values.
2020-01-18 08:49:52 +01:00
Timm Bäder
c9e972eecb
cssdimensionvalue: Implement transition()
...
Instead of falling back to the generic gtk_css_number_value_transition
(which can allocate multiple new css values), just implement this here.
2020-01-18 08:49:52 +01:00
Timm Bäder
45455f1bdb
Remove GtkCssShadowsValue
...
Previously, we wrapped all GtkCssShadowValues in a GtkCssShadowsValue,
even if it was just one shadow. This causes an unnecessary bloat in
css values.
Make each GtkCssShadowValue able to handle multiple shadows instead, and
use gtk_css_shadow_value* API everywhere.
2020-01-18 08:49:52 +01:00
Timm Bäder
a3769eb0e5
cssshadowvalue: Only create 2 shadows values for transitions
...
This is for cases where we want to transition from "no shadow" to
"shadow", which we need quite a lot.
2020-01-18 08:49:52 +01:00
Timm Bäder
7c75ea376f
cssvalue: Improve css value accounting output
...
And make it fully optional behind an #ifdef.
2020-01-18 08:49:52 +01:00
Timm Bäder
96143548ac
csscolorvalue: check for singletons in new_literal
...
Gets rid of another ~400 GtkCssValue instances in the widget-factory.
2020-01-18 08:49:51 +01:00
Timm Bäder
0b2a6e34c4
cssimage: Add is_computed vfunc
...
Same semantics as the is_computed field of GtkCssValue
2020-01-18 08:49:51 +01:00
Timm Bäder
24d8c0a7dc
css: Set the is_computed flag for more values
...
With these changes, we skip roughly 85% of compute() calls during
widget-factory startup
2020-01-18 08:49:51 +01:00
Timm Bäder
ba08f5e67d
cssvalue: Don't call compute() for already computed css values
...
As per the previous commit, this is unnecessary.
Even with the small amount of css values we mark as is_computed, we
already skip computing over 60% of them like this during the startup of
the widget factory.
2020-01-18 08:49:51 +01:00
Timm Bäder
31aa5a0e53
cssvalue: Add is_computed flag
...
When a css value has "child" css values (e.g. a linear gradient has
several color stop css values) which are all computed (won't change when
compute() is called on them), we want to skip computing the entire
subtree.
Since css values are immutable, we can set the is_computed flag at
construct time.
Since GtkCssValue instances are 0-initialized in _gtk_css_value_alloc,
the default for is_computed it FALSE. This commit only sets it to TRUE
in a few cases, such as various "none" singleton values which will never
change. Later commits will refine this and set it for more values.
2020-01-18 08:49:51 +01:00
Timm Bäder
8c678ac756
css: Move border-width special cases out of GtkCssDimensionValue
...
Move them to style computation instead, so we don't have them in such a
generic place.
2020-01-18 08:49:51 +01:00
Timm Bäder
7d1f915a61
csscolorvalue: Don't copy rgbas when applying function
...
We get const pointers to the colors, so just use those and unref the
values later.
2020-01-18 08:49:51 +01:00
Timm Bäder
fc2d05ee38
cssimageradial: Use array + length instead of GArray
...
This makes sense since we're not going to change the (amount of) colors
after parsing.
2020-01-18 08:49:51 +01:00
Timm Bäder
00aa4f0597
cssimagelinear: Use count+array for the color stops, not GArray
...
This makse sense but will also make later changes to GtkCssImageLinear
simpler.
2020-01-18 08:49:51 +01:00
Timm Bäder
3401150cca
cssimagefallback: Don't compute new image if only a color is set
...
Themes might use e.g. image(red), which is a constant value and will
never change. In that case, the fallback image has ->color set, but not
->images. If that's the case and the computed color is the same as
the one we already have, just return the already existing image.
2020-01-18 08:49:51 +01:00
Timm Bäder
67991ed0f4
Remove GtkCssRgbaValue
...
The differenciation between a literal color value and an RGBA value
caused problems in various situations. Just treat the two the same but
don't allow access to the rgba value of a non-literal color value.
This gets rid of around 1.6k rgba values in the widget-factory.
2020-01-18 08:49:51 +01:00
Matthias Clasen
741e12012d
dump css value stats
2020-01-18 08:49:51 +01:00
Timm Bäder
91aa60b210
csssshadwovalue: Remove unused function prototype
2020-01-18 08:49:51 +01:00
Timm Bäder
e31c0898e5
cssnumbervalue: Add early-outs to transition code
...
we don't need to do the calculation at all if the progress is 0 or 1
anyway.
We also sometimes transition from 0 to 0 etc., so we can short-circuit
that as well by doing the fast pointer-equality check and relying on the
singletons.
2020-01-18 08:49:51 +01:00
Timm Bäder
1f2f2777e1
csscornervalue: Accept other values if x == y
...
Most corners are square, so x == y. In that case, just accept either of
them. This makes the corner value unnecessary.
In fact none of the corner values in the widget-factory are needed, so
this spares us around 500 corner value allocations.
css value stats before:
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
SUM: 8428
and after:
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
SUM: 7872
8428 to 7872 is a 556 reduction (6.5%)
asdf
2020-01-18 08:49:51 +01:00
Timm Bäder
9cb2fe5cac
cssarrayvalue: Don't allocate memory when parsing array values
...
We probably won't find CSS with more than 128 values in array.
2020-01-18 08:49:51 +01:00
Timm Bäder
8d15efba8f
cssarrayvalue: Allow calling array API on non-arrays
...
Just allow calling _get_nth() and _get_n_values() on every kind of css
value. This way we can allow all values in places where only array
values would be allowed before.
This spares us around 1000 array values in the widget factory.
css value stats before:
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 1130
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
SUM: 9415
and after:
GtkCssBgSizeValue: 23
GtkCssIdentValue: 25
GtkCssPositionValue: 81
GtkCssCornerValue: 556
GtkCssArrayValue: 143
GtkCssStringValue: 33
GtkCssPaletteValue: 29
GtkCssImageValue: 2765
GtkCssColorValue: 1452
GtkCssFilterValue: 3
GtkCssRgbaValue: 1092
GtkCssShadowValue: 708
GtkCssEaseValue: 33
GtkCssBorderValue: 2
GtkCssTransformValue: 11
GtkCssDimensionValue: 882
GtkCssShadowsValue: 584
SUM: 8428
9415 to 8428 is a 987 reduction (10.4%)
2020-01-18 08:49:51 +01:00
Timm Bäder
1200fe2daf
cssvalue: Add type names for all classes
...
This is important to have for debugging and e.g. to print statistics for
the individual css value types
2020-01-18 08:49:51 +01:00
Timm Bäder
515a527b27
csscolorvalue: Compute alpha/shade/mix of color literals directly
...
The values of these are never gonna change so we can as well create
literal color values from the resulting colors instead.
2020-01-18 08:49:51 +01:00
Timm Bäder
06dbde22a0
csscolorvalue: Don't resolve literal color values
2020-01-18 08:49:51 +01:00
Matthias Clasen
0d9a7fe089
Adwaita: Remove wildcards
...
Selectors like *:disabled or *:link have bad performance
implications, since they cause all styles to be recomputed
when the state of the window changes. Replace these by a
list of the elements that are actually affected.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2380
2020-01-18 01:30:02 -05:00
Matthias Clasen
03883b8b1a
Merge branch 'matthiasc/css-change-tracking-4' into 'master'
...
Improve change computation
See merge request GNOME/gtk!1327
2020-01-18 05:41:26 +00:00
Matthias Clasen
b4a9cf2bfb
Remove no longer needed code
...
We no longer use superset or any matchers to find changes.
2020-01-17 23:47:34 -05:00
Matthias Clasen
2a919a4d4f
Go back to the tree for computing change
2020-01-17 23:47:34 -05:00
Matthias Clasen
b2775d9bdd
Redo the way we compute change
...
Instead of expecting a superset matcher, call
gtk_css_selector_match_for_change while walking the tree with the
original matcher. This fixes the handling of :not while determining
changes.
2020-01-17 23:47:34 -05:00
Matthias Clasen
d0a8a717ef
Bring back the reserved bit
2020-01-17 23:47:34 -05:00
Matthias Clasen
7d72703d54
Revert "Remove no longer used code"
...
This reverts commit 105acfe908
.
2020-01-17 23:47:34 -05:00
Matthias Clasen
b41bba07fa
Add a way to dump css node change values
...
Add a GTK_STYLE_CONTEXT_PRINT_SHOW_CHANGE flag that
tells gtk_style_context_to_string to include the
change values of nodes in the output. This will
help debugging css change tracking.
2020-01-17 23:47:34 -05:00
Matthias Clasen
81b65eadcb
Add an Empty theme for tests
2020-01-17 23:47:34 -05:00
Matthias Clasen
1e7705c08e
cssnode: Fix a corner case in style computation
...
When we recomputed the change flags, and the style
did not change, we still need to replace the style
object, since it holds the new change flags.
2020-01-17 23:47:34 -05:00
Matthias Clasen
cc3cf581ab
cssnodedeclaration: Make print output deterministic
...
This was depending on the memory order of quarks, which
is not a good fit for tests that depend on this output.
2020-01-17 23:47:34 -05:00
Matthias Clasen
6e09c5cee8
Quiet compiler warnings in release builds
2020-01-17 23:47:34 -05:00
Yariv Barkan
00a488a5b5
gtkgesture: Fix get-center for touchpad gestures
...
Touchpad gestures have only a single event sequence. The current
'center' of the gesture is the starting point + accumulated deltas.
Update gtk_gesture_get_bounding_box_center() accordingly.
2020-01-17 22:34:48 +02:00
Matthias Clasen
26c4c28068
Fix a few bugs in the css change flag definition
...
These were found by the new change flag tests.
2020-01-17 11:26:50 -05:00
xdavidwu
9576222b47
imwayland: Fix get_preedit_string cursor position
...
GtkIMContext get_preedit_string should return cursor position counted
in characters, but cursor_begin here is counted in bytes. This add the
missing conversion.
2020-01-17 16:16:13 +08:00
Matthias Clasen
93b5b487ae
cssmatcher: Change get_state to has_state
...
This matches all the other vfuncs, and it gets us
out of keeping several big state flag enumerations
in sync.
Update all callers.
2020-01-16 19:24:43 -05:00
Matthias Clasen
7588655a42
Allow printing css matchers
...
This can help in debugging css matching.
2020-01-16 19:11:21 -05:00
Matthias Clasen
007713c0ba
css: Add a matcher type enum
...
For now, this just replaces the is_any boolean
by a type field in the class. It will be used in
future commits.
2020-01-16 19:11:21 -05:00
Matthias Clasen
f0c1c3349f
css: Simplify the superset matcher
...
We use the superset matcher in exactly one place,
so there is no need for the generality of allowing
to ignore different aspects. Just hardcode the one
case we need: ignoring everything except for name,
id and class.
2020-01-16 19:11:08 -05:00
Matthias Clasen
0dba6e5759
Cosmetic change
...
Update comments for name changes that happened long ago.
2020-01-16 19:10:03 -05:00
Matthias Clasen
60cd7cd96c
css: Fix the ANY matcher state list
...
The ANY and matcher was not, in fact, matching any state,
since the list of states was not up-to-date.
The same fix applies to the superset matcher as well.
2020-01-16 19:09:19 -05:00
Matthias Clasen
3fcbe8d5f3
Remove an unused define
...
We no longer use the GTK_CSS_CHANGE_RESERVED_BIT define.
2020-01-16 17:39:03 -05:00
Matthias Clasen
105acfe908
Remove no longer used code
...
We no longer consult the selector tree to find changes,
so this code is no longer needed.
2020-01-16 17:24:34 -05:00
Matthias Clasen
1caf197a0d
css: Don't got to the selector tree for change
...
The tree is optimized for mimizing the decisions, and is built ahead-of-time.
That prevents us from taking advantage of the information in the matcher when
collecting changes.
So, instead do what we used to do for verification: Use the selector tree
for finding the superset matches, then just walk the rulesets to collect
the changes.
Since we are now recomputing the change masks much less frequently, this
slightly less optimized way of computing them is not a problem, and will
let us compute better results in the future, by improving the superset
matcher to be more precise.
2020-01-16 17:20:45 -05:00
Matthias Clasen
0a49726c73
cssprovider: Keep selectors around
...
Don't remove selectors from the rulsets after
creating the selector tree. We want to use them
in future commits.
2020-01-16 17:17:07 -05:00
Matthias Clasen
789f6f3941
css: Avoid computing change too often
...
Most of the time when styles need to be recreated, the name and classes
of the css node haven't changed. In this case, the change value will not
change either, since we are computing change under the assumption that
name and classes are unchanged.
So don't recompute the change. This avoids the second match we do to
find the superset, cutting down the number of times we consult the
selector tree.
2020-01-16 17:03:51 -05:00
Matthias Clasen
2c231f4336
Revisit gtk_css_style_get_static_style one more time
...
Move the implementation to where it belongs.
2020-01-16 17:02:21 -05:00
Matthias Clasen
3c50e5324f
Change the signature of gtk_css_style_get_static_style
...
It is clearer if this function returns a GtkCssStaticStyle.
2020-01-16 14:06:14 -05:00
Matthias Clasen
3182063ffe
Quiet a compiler warning
...
This was causing warnings in a release build.
2020-01-16 13:04:33 -05:00
Matthias Clasen
b2b89f6c57
css: Add gtk_css_style_get_static_style
...
This lets us avoid poking directly at the GtkCssAnimatedStyle
struct in gtkcssnode.c.
2020-01-16 12:02:44 -05:00
Matthias Clasen
192a24fa1f
css: Track selected state separately
...
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes. The remaining
parent-state cases here are due to :link.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
selected 579
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 115
parent-hover 5
parent-disabled 91
parent-backdrop 4
parent-selected 144
2020-01-16 11:26:46 -05:00
Matthias Clasen
2426b9e23a
css: Track backdrop state separately
...
Like the previous change, this reduces the number of
css nodes reacting to parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2245
hover 562
disabled 859
backdrop 1080
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
parent-backdrop 4
2020-01-16 11:25:04 -05:00
Matthias Clasen
64848aebf4
css: Track disabled state separately
...
Significantly reduces the number of nodes that react to
parent-state changes.
Before (numbers from widget-factory with Adwaita):
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 2247
sibling-name 63
sibling-state 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 2226
parent-hover 5
After:
2247 nodes
class 612
name 2246
id 2
first-child 148
last-child 156
state 2247
hover 562
disabled 859
sibling-name 63
sibling-disabled 51
parent-class 586
parent-name 788
parent-id 2
parent-first-child 78
parent-last-child 78
parent-state 236
parent-hover 5
parent-disabled 91
2020-01-16 11:23:25 -05:00
Matthias Clasen
fcceac6d11
css: Track hover state changes separately
...
The idea is that this reduce the amount of frequently
changing state that css nodes are sensitive to.
This is going to reduce the amount of style recomputation.
2020-01-16 11:17:48 -05:00
Matthias Clasen
e8eb1df29f
Speed up gtk_widget_pick
...
Add early exits, and avoid as much work as
possible.
2020-01-15 11:01:20 -05:00
Matthias Clasen
cb88de5938
css: Drop unsused bitmasks
...
GtkCssProvider was maintaining bitmasks for the
set properties in each ruleset. The masks are never
used, so drop them.
2020-01-14 18:32:05 -05:00
Matthias Clasen
94b1e72aa3
css: Remove an unused function
...
_gtk_css_style_property_get_mask_affecting was superseded
by GtkCssStyleChange back in 2015.
2020-01-14 18:32:05 -05:00
Matthias Clasen
dccb83c9ec
quiet a compiler warning in release builds
2020-01-14 18:32:05 -05:00
Alex Samorukov
d668d2fa25
Use bundle id instead of package name for the macOS preview as filename is now changed
2020-01-14 22:15:05 +00:00
Matthias Clasen
34f1ae8fad
fontchooser: Fix up the previous commit
2020-01-14 15:42:01 -05:00
Matthias Clasen
042537cf0d
fontchooser: Fix objects-finalize test
...
The treeview is evil and keeps reference cycles in the
form of various tree row references. That gets cleaned up
if you explicitly gtk_widget_destroy the treeview. But since
07f2024bfc
, the scrolled window no longer destroys
its child, exposing this issue as a reference leak in
the objects-finalize test.
The font chooser widget is affected here because it calls
gtk_tree_view_scroll_to_path from init(), which creates one
of those reference cycles. Work around this in the font
chooser by unsetting the tree view model in dispose, which
clears up this cycle.
2020-01-14 15:25:27 -05:00
Matthias Clasen
d03f38470e
Fix encoding symbolic pixbufs
...
This was broken in 1a931da046
.
2020-01-14 14:14:45 -05:00
Matthias Clasen
a9da41c66a
Merge branch 'adwaita-cross-fade-fix-gtk4' into 'master'
...
Adwaita: Fix syntax error in cross-fade() (GTK4)
Closes #2371
See merge request GNOME/gtk!1308
2020-01-14 06:08:24 +00:00
Matthias Clasen
4d8691b762
Merge branch 'wip/chergert/fix-dragicon-installation' into 'master'
...
build: fix gtkdragicon header installation
See merge request GNOME/gtk!1306
2020-01-14 06:06:35 +00:00
Matthias Clasen
2b7de841a9
Adwaita: Add hover for clickable infobars
2020-01-14 00:05:23 -05:00
Matthias Clasen
45309811c5
infobar: Activate default action on clicks
...
When we have a default action set on the infobar, activate it
for clicks anywhere in the infobar. Also add an .action style
class in this case, so we can add a hover highlight to the infobar
just for this case.
2020-01-14 00:05:23 -05:00
Christian Hergert
cb03969c5f
textview: propagate GtkTextBuffer can-undo/redo action state
...
This ensures the action state for undo and redo are propagated from the
buffer. Doing so means menu items now properly show sensitivity.
2020-01-13 17:26:18 -08:00
Christian Hergert
15b5a404b8
textview: add undo/redo menu actions
2020-01-13 15:25:05 -08:00
nana-4
4056a40d2d
Adwaita: Fix syntax error in cross-fade()
...
cross-fade() requires two images.
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2371
2020-01-14 06:19:12 +09:00
Christian Hergert
c1e9523f0e
build: fix gtkdragicon header installation
2020-01-13 09:07:24 -08:00
Timm Bäder
3e51966ea9
Merge branch 'wip/jimmac/updated-checkmark' into 'master'
...
Adwaita: update checkbox & radio
Closes #2291
See merge request GNOME/gtk!1289
2020-01-13 14:12:51 +00:00
Jakub Steiner
e292767a01
Adwaita: update checkbox & radio
...
Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2291
2020-01-13 13:45:34 +01:00
Robert Ancell
83867f9cbf
Add missing (closure) GIR annotations
2020-01-13 14:26:50 +13:00
Robert Ancell
ea9f0df67b
Fix incorrect use of GIR closure annotations.
...
They were being applied to the callback function, not the data that is passed
to that function.
2020-01-13 14:11:15 +13:00
Matthias Clasen
15c7980ba6
Merge branch 'textbuffer-missing-api-docs' into 'master'
...
Add missing public API documentation.
See merge request GNOME/gtk!1301
2020-01-13 00:51:24 +00:00
Matthias Clasen
de5fde1e12
Merge branch 'menutoolbutton-missing-api-docs' into 'master'
...
menutoolbutton: Add missing public API documentation.
See merge request GNOME/gtk!1303
2020-01-13 00:50:58 +00:00
Matthias Clasen
a83b360224
Merge branch 'docstring-typos' into 'master'
...
Fix docstring errors with drag and drop code
See merge request GNOME/gtk!1304
2020-01-13 00:50:16 +00:00
Robert Ancell
2b6162116d
Fix docstring errors with drag and drop code
2020-01-13 12:30:17 +13:00
Robert Ancell
b2ca947934
textbuffer: Add missing public API documentation.
...
This API was added in a52757874e
.
2020-01-13 12:19:43 +13:00
Robert Ancell
3eaf88b84c
menutoolbutton: Add missing public API documentation.
...
This API was added in 03e30431a8
2020-01-13 12:17:55 +13:00
Robert Ancell
9e9eae3ad4
Add missing transfer notation for function return types.
2020-01-13 12:14:08 +13:00
Matthias Clasen
903afcbddd
Adwaita: Fix needs-attention
...
Stack switchers are now stackswitcher, no longer .stack-switcher.
Fixes: https://gitlab.gnome.org/GNOME/gtk/issues/2370
2020-01-11 20:14:35 -05:00
Matthias Clasen
f5daecf353
Merge branch 'dnd-gestures-2' into 'master'
...
Add new dnd api
See merge request GNOME/gtk!1278
2020-01-11 06:09:58 +00:00
Matthias Clasen
b76940bab5
dragdest: More documentation
2020-01-11 00:50:22 -05:00
Matthias Clasen
ec255f9bb1
Update all callers
2020-01-11 00:50:22 -05:00
Matthias Clasen
9dc6be4fb0
Reshuffle droptarget api a little bit
...
Add a ::drag-motion signal back, remove x,y from
the ::accept signal, and only emit ::accept once.
2020-01-11 00:49:59 -05:00
Matthias Clasen
186b783f9d
Merge branch 'wip/chergert/gtk4-gtk-main-sync' into 'master'
...
Rubustness fixes for gtk_main_sync()
See merge request GNOME/gtk!1299
2020-01-11 04:41:46 +00:00
Christian Hergert
2f3518c80d
gtkmain: be deterministic in source removal
...
Fixes gtk_main_sync() to only remove a source if it has not
already executed (and been removed). The previous code was
using gtk_main_quit() directly which would be non-determinstic
based on the previous value in the return register.
2020-01-10 15:04:44 -08:00
Christian Hergert
4a7f68e79e
gtkmain: short-circuit gtk_main_sync() where no display
...
If there is no display, we will hit the slow path here which
can introduce long latencies in unit tests. This checks for
a NULL list of displays and simply short-circuits.
2020-01-10 15:00:10 -08:00
Matthias Clasen
f0dc5e0be5
css: Simplify font features
...
Don't store numbers as GtkCssValues needlessly.
2020-01-10 16:59:56 -05:00
Matthias Clasen
99aa47185e
css: Simplify compute for font variations
...
Just like font features, font variations are stored
as a hash table mapping strings to pure number values,
which never change during compute.
2020-01-10 15:49:00 -05:00
Matthias Clasen
898e29c989
css: Simplify compute for font features
...
Font features consist of a hash table of number
values, which will never change during compute,
so there is no point in recreating a new value
with a copy of the hash table, constaining the
same string->number mapping.
2020-01-10 15:48:51 -05:00
Matthias Clasen
112aed590f
Remove builtin icons altogether
...
This removes support for GtkCssImageBuiltin and
GtkCssImageBuiltinType from everywhere.
2020-01-10 14:34:56 -05:00
Matthias Clasen
6763443c5d
css: Stop supporting builtin images
...
Change the default value of -gtk-icon-source to 'none',
and stop parsing 'builtin' as a value.
2020-01-10 14:32:06 -05:00
Matthias Clasen
a51ee20ed9
dragicon: Add docs
2020-01-09 00:50:33 -05:00
Matthias Clasen
c941a2d9c6
Properly export GtkDragIcon
...
The get_type function was missing.
2020-01-09 00:30:41 -05:00
Matthias Clasen
1c03bbeb9c
Update all users
2020-01-08 18:48:23 -05:00
Matthias Clasen
a4059cd02d
dragdest: Rename ::drag-motion to ::accept
2020-01-08 18:48:23 -05:00
Matthias Clasen
eab6df31ac
dragdest: Allow denying drops asynchronously
...
Add an api to deny a drop, this is meant to be used
when delaying the decision on whether to accept a
drop until after reading the data.
2020-01-08 18:48:23 -05:00
Matthias Clasen
8a085fcc5a
remove debug spew
2020-01-08 18:48:23 -05:00
Matthias Clasen
7668669d56
dragdest: Add a ::drag-enter signal
...
Mainly for symmetry with ::drag-leave.
2020-01-08 18:48:22 -05:00
Matthias Clasen
d5f4579384
dragdest: Steps towards allowing nested drop sites
2020-01-08 18:48:22 -05:00
Matthias Clasen
5206a92522
Update all callers
2020-01-08 18:48:22 -05:00
Matthias Clasen
233ec1a5d6
Add GdkDrop back to signal signatures
2020-01-08 18:48:22 -05:00
Matthias Clasen
579d8e427b
Drop gtk_drag_(un)highlight
2020-01-08 18:48:22 -05:00
Matthias Clasen
9c11c60530
filechooser: Remove code for sidebar pre-arming
...
This is just not a feature we can support currently.
Doing it properly would require infrastructure for
a generalized :drag(sensitive) state highlighting
potential drag sites everywhere.
2020-01-08 18:48:22 -05:00
Matthias Clasen
66c8da4750
listbox: Stop using gtk_drag_(un)highlight
...
This api is going away, so just do what needs to
be done manually.
2020-01-08 18:48:22 -05:00
Matthias Clasen
05a9b72fc8
calendar: Remove drag highlighting calls
...
This is happening unconditionally, anyway.
2020-01-08 18:48:22 -05:00
Matthias Clasen
4fe5710456
textview: Remove unnecessary drag highlighting
...
GTK does this unconditionally anyway, now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
ac5b4a6307
text: Remove unnecessary drag highlighting
...
GTK does this unconditionally anyway, now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
5ce7bfbbd8
notebook: Receive tab dnd on the tabs
...
Don't make the whole notebook a drop target
for tab dnd, but just the tab bar. This will
help with drag highlighting, and it arguably
more correct anyway.
2020-01-08 18:48:22 -05:00
Matthias Clasen
7646d1b22c
Adwaita: No drag highlight for placessidebar
...
It does its own custom thing.
2020-01-08 18:48:22 -05:00
Matthias Clasen
61db81ab8e
Adwaita: No dnd highlight for iconviews
...
We only want to highlight the drop location
that is rendered with a separate css node now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
24d7586163
iconview: Use a named subnode for dnd highlight
...
This is necessary because we want to style the
iconview itself and the item highlighting differently.
2020-01-08 18:48:22 -05:00
Matthias Clasen
b150625105
Adwaita: No dnd highlight for treeviews
...
We only want to highlight the drop location
that is rendered with a separate css node now.
2020-01-08 18:48:22 -05:00
Matthias Clasen
5787146238
treeview: Use a named subnode for dnd highlight
...
This is necessary because we want to style the
treeview itself and the row highlighting differently.
2020-01-08 18:48:22 -05:00
Matthias Clasen
8a72031e99
Adwaita: No drag highlight for stack switchers
2020-01-08 18:48:22 -05:00
Matthias Clasen
201a791076
Adwaita: No drag highlight for expanders
...
This is pretty ugly, because Adwaita has a very
generic drop-highlight implementaiton that we
need to overrule.
2020-01-08 18:48:22 -05:00
Matthias Clasen
359003670a
dragdest: Rename ::armed to ::contains
2020-01-08 18:48:22 -05:00
Matthias Clasen
8a521accbc
dragsource: Change the ::prepare return type
...
Make it return the content provider to use for
the next drag. This allows just-in-time provision
of the content provider. The default handler just
returns the value of the ::content property.
2020-01-08 18:48:22 -05:00
Matthias Clasen
a053d7ddb1
dragsource: Drop gtk_drag_source_drag_begin
...
No longer used. Also, minor cleanups all over.
2020-01-08 18:48:22 -05:00
Matthias Clasen
c878f650ce
dragksource: Small doc fix
2020-01-08 18:48:22 -05:00
Matthias Clasen
2d2cdeae88
Drop GTK content formats apis
...
These functions have been superseded by better
facilities in GDK.
2020-01-08 18:48:22 -05:00
Matthias Clasen
379166e1ff
text: Use GDK content formats API
2020-01-08 18:48:22 -05:00
Matthias Clasen
a59a20c1d4
placessidebar: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
fb4b5c666b
filechooserwidget: Use GDK content formats api:
2020-01-08 18:48:22 -05:00
Matthias Clasen
b59c70aaeb
filechooserbutton: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
6fcae42dde
calendar: Use GDK content formats api
2020-01-08 18:48:22 -05:00
Matthias Clasen
a04d314910
text: Fix dragging of text across focus changes
...
When dragging selected text from an entry over a stackswitcher
to show a different page, the focus changes, causing the selection
to be lost; we should not lose the dragged content in this case.
2020-01-08 18:48:22 -05:00
Matthias Clasen
f83f7a2b4d
Adwaita: Add drop highlight for iconview items
2020-01-08 18:48:22 -05:00
Matthias Clasen
edb175cf75
iconview: Render drop highlight properly
...
Use :drop(active) and render a frame, not focus.
2020-01-08 18:48:22 -05:00
Matthias Clasen
1eefaf8b41
dragsource: Fix cancellation
...
We need to properly end the drag.
2020-01-08 18:48:22 -05:00
Matthias Clasen
0224517806
filechooser: Stop using gtk_drag_source_get_drag
2020-01-08 18:48:22 -05:00
Matthias Clasen
27c521cce8
placessidebar: Update a comment
2020-01-08 18:48:22 -05:00
Matthias Clasen
62b87182c5
Remove an unused enum
...
We are not using GtkDragResult anymore.
2020-01-08 18:48:22 -05:00
Matthias Clasen
865fc9c925
dragsource: Rename ::drag-failed to ::drag-cancel
...
This matches the names of the GdkDrag signals.
2020-01-08 18:48:22 -05:00
Matthias Clasen
a1f4f52fcb
dragsource: Tweak docs more
2020-01-08 18:48:22 -05:00
Matthias Clasen
bdb4bf00c5
dragsource: Document prepare
2020-01-08 18:48:22 -05:00
Matthias Clasen
aca252837d
dragsource: Make ::prepare return a boolean
...
Make ::prepare return TRUE to start a drag.
The default handler simply checks that we
have a content provider and actions.
2020-01-08 18:48:22 -05:00
Matthias Clasen
8b058572f0
dragsource: Drop gtk_drag_get_source
2020-01-08 18:48:22 -05:00
Matthias Clasen
df050c51bb
notebook: Stop using gtk_drag_get_source
2020-01-08 18:48:21 -05:00
Matthias Clasen
bd20ae4fa5
dragsource: Drop gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
818b456f9f
filechooserwidget: Stop using gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
c1c8abf275
notebook: Stop using gtk_drag_source_get_origin
2020-01-08 18:48:21 -05:00
Matthias Clasen
134fca47e3
pathbar: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
4630dd8d68
notebook: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
d2f7d1b1d7
linkbutton: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
cfa9e6da4a
colorswatch: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00
Matthias Clasen
ceca2f9202
colorbutton: Use gtk_widget_add_controller for drag source
2020-01-08 18:48:21 -05:00