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.
This commit is contained in:
John Scipione 2012-04-18 00:20:15 -04:00
parent f5be13ecc7
commit 05fa08371f

View File

@ -16,6 +16,7 @@
#include <Button.h> #include <Button.h>
#include <Catalog.h> #include <Catalog.h>
#include <CheckBox.h> #include <CheckBox.h>
#include <ControlLook.h>
#include <FormattingConventions.h> #include <FormattingConventions.h>
#include <GroupLayout.h> #include <GroupLayout.h>
#include <Locale.h> #include <Locale.h>
@ -33,9 +34,14 @@
#include "StatusView.h" #include "StatusView.h"
static const float kIndentSpacing
= be_control_look->DefaultItemSpacing() * 2.3;
#undef B_TRANSLATION_CONTEXT #undef B_TRANSLATION_CONTEXT
#define B_TRANSLATION_CONTEXT "PreferencesWindow" #define B_TRANSLATION_CONTEXT "PreferencesWindow"
PreferencesWindow::PreferencesWindow(BRect frame) PreferencesWindow::PreferencesWindow(BRect frame)
: :
BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW, BWindow(frame, B_TRANSLATE("Deskbar preferences"), B_TITLED_WINDOW,
@ -219,7 +225,7 @@ PreferencesWindow::PreferencesWindow(BRect frame)
.Add(fAppsSortTrackerFirst) .Add(fAppsSortTrackerFirst)
.Add(fAppsShowExpanders) .Add(fAppsShowExpanders)
.AddGroup(B_HORIZONTAL, 0) .AddGroup(B_HORIZONTAL, 0)
.SetInsets(B_USE_BIG_SPACING, 0, 0, 0) .SetInsets(kIndentSpacing, 0, 0, 0)
.Add(fAppsExpandNew) .Add(fAppsExpandNew)
.End() .End()
.Add(fAppsHideLabels) .Add(fAppsHideLabels)