1. 18 Mar, 2015 11 commits
  2. 12 Mar, 2015 1 commit
  3. 09 Mar, 2015 1 commit
  4. 08 Mar, 2015 1 commit
  5. 10 Feb, 2015 1 commit
  6. 06 Feb, 2015 3 commits
    • Benjamin Otte's avatar
      css: Move scale to GtkStyleProviderPrivate · 1116914e
      Benjamin Otte authored
      This way, we can remove it as a separate argument from
      gtk_css_value_compute() and allow computation to only depend on one
      thing: the style provider.
    • Benjamin Otte's avatar
      settings: Provide a default style cascade per scale · 808bfe0a
      Benjamin Otte authored
      This guarantees we only create 1 extra style cascade in total for hidpi
      and not one per style context.
      Style cascades are now nested like this:
      GtkSettings root cascade (scale == 1)
       +-- GtkSettings per scale cascade (for any scale, no custom providers)
       +-- GtkStyleContext custom cascade (for any scale, custom providers)
      This requires a bunch of care when changing cascade-related properties
      inside GtkStyleContext, so that it ends up with a properly setup
      cascade, but I think I got those cases right.
      The only thing we don't do yet is reverting to a GtkSettings cascade
      when the last custom provider is removed from a custom cascade.
    • Benjamin Otte's avatar
      stylecontext: Store the scale value in the cascade · 9209c4ea
      Benjamin Otte authored
      This is in preparation for the next commits.
  7. 04 Feb, 2015 3 commits
  8. 02 Feb, 2015 1 commit
  9. 31 Jan, 2015 1 commit
  10. 21 Jan, 2015 1 commit
  11. 20 Jan, 2015 2 commits
  12. 19 Jan, 2015 3 commits
  13. 17 Jan, 2015 2 commits
  14. 10 Jan, 2015 1 commit
  15. 07 Jan, 2015 8 commits
    • Benjamin Otte's avatar
      stylecontext: Handle theme changes for cached styles · 29984c52
      Benjamin Otte authored
      We need to clear the cache manually on full revalidates because
      _gtk_css_change_for_child() will clear the full revalidation flags.
      And then gtk_style_context_update_cache() will not do the right thing
      (which is to clear itself).
    • Benjamin Otte's avatar
    • Benjamin Otte's avatar
      stylecontext: update_animating() properly · 26640825
      Benjamin Otte authored
      Because we can switch from animating to non-animating pretty much
      anywhere, do the check for animations unconditionally instead of trying
      to cram it into the correct if path (and failing).
    • Benjamin Otte's avatar
      stylecontext: Add a parent style cache · fe33ee42
      Benjamin Otte authored
      We now cache the results of lookups on the parent GtkCssStyle. This
      allows sharing styles between widgets (recursively). However, this
      only works if the styles can't potentially depend on siblings -
      neither directly via sibling selectors or via position pseudo-classes
      like :first-child.
      Unfortunately, Adwaita currently uses first-child a lot, and in
      particular for labels, which are the most common widgets.
      The big benefits of this change are both less CPU - due to not needing
      to compute styles again - and less memory usage - due to sharing of
      the styles between widgets. Here's some nonscientific numbers I
      collected while pondering the usefulness of this patch:
                          glade   glade   widget
                          demo    demo    factory
                          runtime styles  styles
      Adwaita before      19.1s   5800    1150
      Adwaita now         18.9s   3800     970
      Adwaita hacked now  14.5s   3100     910
      simple before       11.3s   5800    1150
      simple now          10.8s   1300     590
      Adwaita: Adwaita as provided by GTK
      Adwaita hacked: Adwaita with the first/last-child for GtkLabel removed
      simple: A 250 lines simple GTK theme I use for testing
      before: This patch not applied
      now: this patch applied
      glade demo runtime: Starting glade opening a large file and closing it
      glade demo styles: GtkCssStaticStyle objects after opening glade with
                         the large file as per inspector
      widget factory styles: GtkCssStaticStyle objects after startup as per
    • Benjamin Otte's avatar
      cssstyle: Have a default style · 27285f1f
      Benjamin Otte authored
      This way we can initialize the default style info with a style and
      ddon't need to special case NULL everywhere.
    • Benjamin Otte's avatar
      stylecontext: Use correct parent on updates · ef9aa8b0
      Benjamin Otte authored
      Previously we looked at the save/restore state when determining the
      parent. This is wrong in the case where we're updating the cache though.
      So we now save the parent in the style info.
    • Benjamin Otte's avatar
      stylecontext: Fix cache updating · 89b5d154
      Benjamin Otte authored
      After the parent changes in commit
      3a337156 we need to refresh the cached
      styles after the current style. After all, they now depend on the base
    • Benjamin Otte's avatar
      cssstaticstyle: Handle relevant change · 730f4291
      Benjamin Otte authored
      Relevant change is returned from style lookups, so keep is with the
      object that holds those values.