Skip to content
  • Niels De Graef's avatar
    gtk: Introduce private GtkFontFilter helper · 88203fbf
    Niels De Graef authored
    Extract the "user filter" code from the `GtkFontChooserWidget`, for a
    couple of reasons:
    
    * If we want to expand the filter in the future (e.g. to filter on
      variable fonts, or check for multiple languages), we have a nice place
      to put this.
    * It simplifies the font chooser widget a tiny bit, as it's a pretty big
      file which can be hard to follow.
    * With a custom `GtkFilter` subclass, we can actually avoid doing a bit
      of work when initially showing the widget, as we can return
      `GTK_FILTER_MATCH_ALL` when nothing is selected yet (which is not
      possible with a `GtkCustomFilter'). It's not much, but it's still nice
    88203fbf