Transfer the Mac SDK bockbuild profiles & resources inside the Mono repository.
[mono.git] / bockbuild / mac-sdk / patches / gtk / 0076-iconfactory-treat-gt-1-0-icons-as-2-0.patch
1 commit 072cd971ff3c9f48bd43b1e6f1e771dcb46f822a
2 Author: Cody Russell <cody@jhu.edu>
3 Date:   Thu Apr 24 16:37:14 2014 -0500
4
5     When finding matching icon sources or cached icons, any scale greater than
6     1.0 should be treated as 2.0. This is important on Windows where scales can
7     be things like 1.25 or 1.5.
8
9 diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
10 index 291c05e..5e356b7 100644
11 --- a/gtk/gtkiconfactory.c
12 +++ b/gtk/gtkiconfactory.c
13 @@ -1323,11 +1323,12 @@ find_best_matching_source (GtkIconSet       *icon_set,
14                            GtkTextDirection  direction,
15                            GtkStateType      state,
16                            GtkIconSize       size,
17 -                          gdouble           scale,
18 +                          gdouble           _scale,
19                            GSList           *failed)
20  {
21    GtkIconSource *source;
22    GSList *tmp_list;
23 +  gdouble scale = (_scale > 1.0 ? 2.0 : 1.0);
24
25    /* We need to find the best icon source.  Direction matters more
26     * than state, state matters more than size. icon_set->sources
27 @@ -2586,10 +2587,11 @@ find_in_cache (GtkIconSet      *icon_set,
28                 GtkTextDirection direction,
29                 GtkStateType     state,
30                 GtkIconSize      size,
31 -               gdouble          scale)
32 +               gdouble          _scale)
33  {
34    GSList *tmp_list;
35    GSList *prev;
36 +  gdouble scale = (_scale > 1.0 ? 2.0 : 1.0);
37
38    ensure_cache_up_to_date (icon_set);