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:
authorJulian Eisel <julian@blender.org>2021-11-24 23:10:24 +0300
committerJulian Eisel <julian@blender.org>2021-11-24 23:10:24 +0300
commit6b1b3383c69b2bf71daf96027294bc13d8d64fef (patch)
tree0c292266feaa9191a8aee109163577bfa991c7d7 /source/blender/editors/interface/interface_panel.c
parentc155a5f9d7f9989166737e0a3f18919d3a214f3a (diff)
parenta9642f8d613078b285db4b04efb8bf8e5a234fbb (diff)
Merge branch 'blender-v3.0-release'
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r--source/blender/editors/interface/interface_panel.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index 8d47b8a1011..18fa620f0d9 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -1122,7 +1122,8 @@ static void panel_draw_highlight_border(const Panel *panel,
}
const bTheme *btheme = UI_GetTheme();
- const float radius = btheme->tui.panel_roundness * U.widget_unit * 0.5f;
+ const float aspect = panel->runtime.block->aspect;
+ const float radius = (btheme->tui.panel_roundness * U.widget_unit * 0.5f) / aspect;
UI_draw_roundbox_corner_set(UI_CNR_ALL);
float color[4];
@@ -1245,7 +1246,8 @@ static void panel_draw_aligned_backdrop(const Panel *panel,
}
const bTheme *btheme = UI_GetTheme();
- const float radius = btheme->tui.panel_roundness * U.widget_unit * 0.5f;
+ const float aspect = panel->runtime.block->aspect;
+ const float radius = btheme->tui.panel_roundness * U.widget_unit * 0.5f / aspect;
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
GPU_blend(GPU_BLEND_ALPHA);