From 1f72988e6139adcb26c84b24180cded034b05609 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 30 Aug 2022 22:28:04 -0400 Subject: [PATCH] Debugger: Improve appearance of TeamsWindow insets and spacing. The buttons are now aligned to the scroll bar and window resize knob, by using BControlLook::GetScrollBarWidth. (Hmm, perhaps it might make more sense to just have scrollbar sizes be a kind of insets, which can be gotten via B_USE_SCROLL_BAR_INSETS, and then drop this extra method altogether? After all there are a lot of applications which align to scroll bars...) --- .../user_interface/gui/teams_window/TeamsWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp index 4a8b50ff7f..3b4a88ed4b 100644 --- a/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp +++ b/src/apps/debugger/user_interface/gui/teams_window/TeamsWindow.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -274,9 +275,10 @@ TeamsWindow::_Init() MSG_SHOW_CONNECTION_CONFIG_WINDOW))) .End() .Add(fTeamsListView = new TeamsListView("TeamsList")) - .SetInsets(1.0f, 1.0f, 1.0f, 5.0f) .AddGroup(B_HORIZONTAL) - .SetInsets(B_USE_DEFAULT_SPACING) + .SetInsets(B_USE_ITEM_SPACING, 0, + be_control_look->GetScrollBarWidth(B_VERTICAL), + be_control_look->GetScrollBarWidth(B_HORIZONTAL)) .Add(fAttachTeamButton = new BButton("Attach", new BMessage( MSG_DEBUG_THIS_TEAM))) .AddGlue()