diff options
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 6 |
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 3a8e06a3e49..6aa4c5bb4a7 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); |