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