From 05fa08371f54a1fd447b9a390ddc6f4464a30fb9 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Wed, 18 Apr 2012 00:20:15 -0400 Subject: [PATCH] Indent the indented checkboxes in Deskbar prefs more. * Create my own kIndentSpacing parameter from ControlLook which sets the indent spacing width to match the previously used spacing. This lines the indented checkbox up with the text of the unindented checkbox above it. This matches what it looked like before I updated the dialog to use font-aware spacing, while keeping the same relative spacing at different font sizes. --- src/apps/deskbar/PreferencesWindow.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/apps/deskbar/PreferencesWindow.cpp b/src/apps/deskbar/PreferencesWindow.cpp index 7e54c2a251..5a0da893a2 100644 --- a/src/apps/deskbar/PreferencesWindow.cpp +++ b/src/apps/deskbar/PreferencesWindow.cpp @@ -16,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -33,9 +34,14 @@ #include "StatusView.h" +static const float kIndentSpacing + = be_control_look->DefaultItemSpacing() * 2.3; + + #undef B_TRANSLATION_CONTEXT #define B_TRANSLATION_CONTEXT "PreferencesWindow" + PreferencesWindow::PreferencesWindow(BRect frame) : BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW, @@ -219,7 +225,7 @@ PreferencesWindow::PreferencesWindow(BRect frame) .Add(fAppsSortTrackerFirst) .Add(fAppsShowExpanders) .AddGroup(B_HORIZONTAL, 0) - .SetInsets(B_USE_BIG_SPACING, 0, 0, 0) + .SetInsets(kIndentSpacing, 0, 0, 0) .Add(fAppsExpandNew) .End() .Add(fAppsHideLabels)