1. 17 Dec, 2017 1 commit
  2. 10 Dec, 2017 1 commit
    • Timm Bäder's avatar
      css: Replace _AFFECTS_TEXT with _TEXT_SIZE and _TEXT_CLIP · 492469a9
      Timm Bäder authored
      It was used to mark css properties that affect widgets with text, but it
      caused unnecessary invalidations. E.g. 'color' was marked as
      AFFECTS_TEXT but changing just the color of a label should not
      automatically queue a resize, which is what the code in
      gtk_widget_real_style_updated does.
      
      Replace this flag with GTK_CSS_AFFECTS_TEXT_SIZE and
      GTK_CSS_AFFECTS_TEXT_CLIP, which GtkWidget can use only if the widget
      actually has text.
      
      https://bugzilla.gnome.org/show_bug.cgi?id=791281
      492469a9
  3. 25 Apr, 2016 1 commit
    • Christian Hergert's avatar
      builtinicon: avoid calculating font-metrics in vast majority of cases · f165bbda
      Christian Hergert authored
      We perform lots of gadget allocations that require allocating a
      GtkBuiltinIcon. One notable example is the scrollbar for a scrolled
      window.
      
      In the process of doing this, we often calculate baseline information that
      isn't necessary. With how much this code path gets exercised, its worth
      catching the result for the common case, which is that the font-description
      has not changed and we are using the default language the application
      was started with.
      
      This simply caches the previous result and verifies that we can reuse it
      with pango_font_description_hash() and a simple language check.
      
      Numbers below are scrolling through a textview with GDK_KEY_Down.
      
      Before:
            SELF CUMULATIVE    FUNCTION
      [   0.08%] [   9.26%]    gtk_builtin_icon_get_preferred_size
      [   0.01%] [   8.82%]      pango_context_get_metrics
      [   0.02%] [   0.16%]      gtk_widget_get_pango_context
      [   0.06%] [   0.06%]      pango_context_get_language
      [   0.01%] [   0.02%]      g_type_check_instance_cast
      [   0.02%] [   0.02%]      strlen
      [   0.02%] [   0.02%]      pango_context_get_font_description
      [   0.02%] [   0.02%]      g_list_foreach
      [   0.01%] [   0.01%]      gtk_css_style_get_value
      [   0.01%] [   0.01%]      itemize_with_font
      [   0.01%] [   0.01%]      pango_context_get_type
      [   0.01%] [   0.01%]      get_base_metrics
      [   0.00%] [   0.01%]      pango_font_metrics_unref
      [   0.01%] [   0.01%]      g_list_free
      [   0.01%] [   0.01%]      gtk_builtin_icon_get_type
      
      After:
            SELF CUMULATIVE    FUNCTION
      [   0.08%] [   0.18%]    gtk_builtin_icon_get_preferred_size
      [   0.02%] [   0.02%]      pango_font_description_hash
      [   0.00%] [   0.02%]      gtk_widget_get_pango_context
      [   0.00%] [   0.02%]        g_object_get_qdata
      [   0.00%] [   0.02%]          g_datalist_id_get_data
      [   0.02%] [   0.02%]      gtk_builtin_icon_get_type
      [   0.01%] [   0.01%]      pango_context_get_font_description
      [   0.00%] [   0.01%]      - - kernel - -
      [   0.01%] [   0.01%]      pango_context_get_language
      [   0.00%] [   0.01%]      gtk_css_style_get_value
      [   0.00%] [   0.01%]      gtk_css_gadget_get_style
      
      https://bugzilla.gnome.org/show_bug.cgi?id=765486
      f165bbda
  4. 18 Jan, 2016 1 commit
    • Matthias Clasen's avatar
      builtin icon: set a baseline · da30858e
      Matthias Clasen authored
      Most uses of builtin icons (check and radio buttons,
      expanders, etc) are placed next to labels, so they should
      be properly positioned wrt to the baseline. Lacking anything
      better, give the builtin icons a baseline that places the
      center of the icon at the strikethrough position.
      da30858e
  5. 13 Jan, 2016 1 commit
  6. 22 Dec, 2015 2 commits
  7. 20 Dec, 2015 1 commit
  8. 16 Dec, 2015 3 commits