diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-04-01 01:26:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2017-04-01 01:32:42 +0300 |
commit | e0c236644bc9d3fff711ee69555fa9a7ffa61706 (patch) | |
tree | aa6b73d331fbb4c17b51869642ae78cf2773bbcd /development_icon_get.py | |
parent | ac0c5a2cc112de7d204c164b5219762f5a615bb7 (diff) |
Fix T51101: icon viewer addon not working correctly on high DPI displays.
Diffstat (limited to 'development_icon_get.py')
-rw-r--r-- | development_icon_get.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/development_icon_get.py b/development_icon_get.py index c467dfd5..b00d7593 100644 --- a/development_icon_get.py +++ b/development_icon_get.py @@ -44,13 +44,8 @@ HISTORY = [] def ui_scale(): - if hasattr(bpy.context.user_preferences.view, "ui_scale"): - return bpy.context.user_preferences.view.ui_scale - - ret = bpy.context.user_preferences.system.dpi / DPI - if bpy.context.user_preferences.system.virtual_pixel_mode == 'DOUBLE': - ret *= 2 - return ret + prefs = bpy.context.user_preferences.system + return prefs.dpi * prefs.pixel_size / DPI def prefs(): |