Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-17 04:01:58 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-17 13:28:56 +0300
commit18905b4359c69c5d278f9f5ba142ac13ddf941f1 (patch)
treee657133714c6887d27508d45e654923031cdadfc /release
parente44a7d36f436b24e2b5ac1680f6a3f12ac6c1ff6 (diff)
Fix preferences layout not shrinking properly on high DPI display.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_userpref.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py
index b01144dc3bd..2f2c85eeffc 100644
--- a/release/scripts/startup/bl_ui/space_userpref.py
+++ b/release/scripts/startup/bl_ui/space_userpref.py
@@ -82,13 +82,13 @@ class PreferencePanel(Panel):
def draw(self, context):
layout = self.layout
width = context.region.width
- pixel_size = context.preferences.system.pixel_size
+ ui_scale = context.preferences.system.ui_scale
layout.use_property_split = True
layout.use_property_decorate = False # No animation.
row = layout.row()
- if width > (350 * pixel_size): # No horizontal margin if region is rather small.
+ if width > (350 * ui_scale): # No horizontal margin if region is rather small.
row.label() # Needed so col below is centered.
col = row.column()
@@ -97,7 +97,7 @@ class PreferencePanel(Panel):
# draw_props implemented by deriving classes.
self.draw_props(context, col)
- if width > (350 * pixel_size): # No horizontal margin if region is rather small.
+ if width > (350 * ui_scale): # No horizontal margin if region is rather small.
row.label() # Needed so col above is centered.