diff --git a/scripts/startup/bl_ui/space_topbar.py b/scripts/startup/bl_ui/space_topbar.py index d99477f4ba8..3fd0e34216d 100644 --- a/scripts/startup/bl_ui/space_topbar.py +++ b/scripts/startup/bl_ui/space_topbar.py @@ -30,7 +30,7 @@ class TOPBAR_HT_upper_bar(Header): TOPBAR_MT_editor_menus.draw_collapsible(context, layout) - layout.separator() + layout.separator(type='LINE') if not screen.show_fullscreen: layout.template_ID_tabs(window, "workspace", new="workspace.add", menu="TOPBAR_MT_workspace_menu") diff --git a/source/blender/editors/interface/interface_align.cc b/source/blender/editors/interface/interface_align.cc index ff9c6387a80..8394f7ca50a 100644 --- a/source/blender/editors/interface/interface_align.cc +++ b/source/blender/editors/interface/interface_align.cc @@ -359,6 +359,8 @@ static void ui_block_align_but_to_region(uiBut *but, const ARegion *region) break; default: /* Tabs may be shown in unaligned regions too, they just appear as regular buttons then. */ + rect->ymin += UI_SCALE_FAC; + rect->ymax += UI_SCALE_FAC; break; } } diff --git a/source/blender/editors/interface/templates/interface_template_id.cc b/source/blender/editors/interface/templates/interface_template_id.cc index 46a3bae5697..ebfde5c3df3 100644 --- a/source/blender/editors/interface/templates/interface_template_id.cc +++ b/source/blender/editors/interface/templates/interface_template_id.cc @@ -1432,7 +1432,12 @@ static void template_ID_tabs(const bContext *C, const PointerRNA active_ptr = RNA_property_pointer_get(&template_id.ptr, template_id.prop); MenuType *mt = menu ? WM_menutype_find(menu, false) : nullptr; - const int but_align = ui_but_align_opposite_to_area_align_get(region); + /* When horizonal show the tabs as pills, rounded on all corners. */ + const bool horizontal = + (region->regiontype == RGN_TYPE_HEADER && + ELEM(RGN_ALIGN_ENUM_FROM_MASK(region->alignment), RGN_ALIGN_TOP, RGN_ALIGN_BOTTOM)); + const int but_align = horizontal ? 0 : ui_but_align_opposite_to_area_align_get(region); + const int but_height = UI_UNIT_Y * 1.1; uiBlock *block = uiLayoutGetBlock(layout);