6bdd276d05
Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
39 lines
1.3 KiB
Diff
39 lines
1.3 KiB
Diff
commit 072cd971ff3c9f48bd43b1e6f1e771dcb46f822a
|
|
Author: Cody Russell <cody@jhu.edu>
|
|
Date: Thu Apr 24 16:37:14 2014 -0500
|
|
|
|
When finding matching icon sources or cached icons, any scale greater than
|
|
1.0 should be treated as 2.0. This is important on Windows where scales can
|
|
be things like 1.25 or 1.5.
|
|
|
|
diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c
|
|
index 291c05e..5e356b7 100644
|
|
--- a/gtk/gtkiconfactory.c
|
|
+++ b/gtk/gtkiconfactory.c
|
|
@@ -1323,11 +1323,12 @@ find_best_matching_source (GtkIconSet *icon_set,
|
|
GtkTextDirection direction,
|
|
GtkStateType state,
|
|
GtkIconSize size,
|
|
- gdouble scale,
|
|
+ gdouble _scale,
|
|
GSList *failed)
|
|
{
|
|
GtkIconSource *source;
|
|
GSList *tmp_list;
|
|
+ gdouble scale = (_scale > 1.0 ? 2.0 : 1.0);
|
|
|
|
/* We need to find the best icon source. Direction matters more
|
|
* than state, state matters more than size. icon_set->sources
|
|
@@ -2586,10 +2587,11 @@ find_in_cache (GtkIconSet *icon_set,
|
|
GtkTextDirection direction,
|
|
GtkStateType state,
|
|
GtkIconSize size,
|
|
- gdouble scale)
|
|
+ gdouble _scale)
|
|
{
|
|
GSList *tmp_list;
|
|
GSList *prev;
|
|
+ gdouble scale = (_scale > 1.0 ? 2.0 : 1.0);
|
|
|
|
ensure_cache_up_to_date (icon_set);
|