~ricotz/pantheon-photos/syntax-errors

« back to all changes in this revision

Viewing changes to src/sidebar/Tree.vala

  • Committer: RabbitBot
  • Author(s): Daniel Foré
  • Date: 2016-11-03 20:48:03 UTC
  • mfrom: (3030.1.1 photos-sidebar)
  • Revision ID: rabbitbot-20161103204803-yuydgfvz4tmmoqc4
sidebar/Tree.vala:
* Don't declare a constant you only use once
* let Gtk handle scaling so we don't double scale

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 */
6
6
 
7
7
public class Sidebar.Tree : Gtk.TreeView {
8
 
    public const int ICON_SIZE = 16;
9
 
 
10
8
    // Only one ExternalDropHandler can be registered with the Tree; it's responsible for completing
11
9
    // the "drag-data-received" signal properly.
12
10
    public delegate void ExternalDropHandler (Gdk.DragContext context, Sidebar.Entry? entry,
759
757
            if (icon != null)
760
758
                return icon;
761
759
 
762
 
            Gtk.IconInfo? info = icon_theme.lookup_by_gicon_for_scale (gicon, ICON_SIZE, get_scale_factor (), Gtk.IconLookupFlags.GENERIC_FALLBACK);
 
760
            Gtk.IconInfo? info = icon_theme.lookup_by_gicon (gicon, 16, Gtk.IconLookupFlags.GENERIC_FALLBACK);
763
761
            if (info == null)
764
762
                return null;
765
763