Cosmetical improvements.

This commit is contained in:
Humdinger 2012-02-24 18:08:09 +01:00
parent eb3fc7f079
commit 4c9dc4c642

View File

@ -6,6 +6,7 @@
#include "ExpanderPreferences.h" #include "ExpanderPreferences.h"
#include <Box.h> #include <Box.h>
#include <Catalog.h> #include <Catalog.h>
#include <ControlLook.h>
#include <GroupLayout.h> #include <GroupLayout.h>
#include <GroupLayoutBuilder.h> #include <GroupLayoutBuilder.h>
#include <Locale.h> #include <Locale.h>
@ -60,44 +61,49 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
fAutoShow = new BCheckBox("autoShow", fAutoShow = new BCheckBox("autoShow",
B_TRANSLATE("Automatically show contents listing"), NULL); B_TRANSLATE("Automatically show contents listing"), NULL);
const float kSpacing = be_control_look->DefaultItemSpacing();
BView* view = new BGroupView(); BView* view = new BGroupView();
view->SetLayout(new BGroupLayout(B_HORIZONTAL)); view->SetLayout(new BGroupLayout(B_HORIZONTAL));
view->AddChild(BGroupLayoutBuilder(B_VERTICAL) view->AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
.AddGroup(B_HORIZONTAL) .AddGroup(B_HORIZONTAL)
.Add(new BStringView("expansion", B_TRANSLATE("Expansion:"))) .Add(new BStringView("expansion", B_TRANSLATE("Expansion:")))
.AddGlue() .AddGlue()
.End() .End()
.AddGroup(B_VERTICAL, 1) .AddGroup(B_VERTICAL, 0)
.Add(fAutoExpand) .Add(fAutoExpand)
.Add(fCloseWindow) .Add(fCloseWindow)
.SetInsets(10, 0, 0, 10) .SetInsets(kSpacing, kSpacing / 2, 0, 0)
.End() .End()
.AddGroup(B_HORIZONTAL) .AddGroup(B_HORIZONTAL, 0)
.Add(new BStringView("destinationFolder", .Add(new BStringView("destinationFolder",
B_TRANSLATE("Destination folder:"))) B_TRANSLATE("Destination folder:")))
.AddGlue() .AddGlue()
.SetInsets(0, kSpacing, 0, 0)
.End() .End()
.AddGroup(B_VERTICAL, 1) .AddGroup(B_VERTICAL, 0)
.Add(fLeaveDest) .Add(fLeaveDest)
.Add(fSameDest) .Add(fSameDest)
.Add(fDestUse) .Add(fDestUse)
.AddGroup(B_HORIZONTAL, 5) .AddGroup(B_HORIZONTAL, 0)
.Add(fDestText, 0.8) .Add(fDestText, 0.8)
.AddStrut(be_control_look->DefaultLabelSpacing())
.Add(fSelect, 0.2) .Add(fSelect, 0.2)
.SetInsets(20, 0, 0, 0) .SetInsets(kSpacing * 2, 0, 0, 0)
.End() .End()
.SetInsets(10, 0, 0, 10) .SetInsets(kSpacing, kSpacing / 2, 0, 0)
.End() .End()
.AddGroup(B_HORIZONTAL) .AddGroup(B_HORIZONTAL, 0)
.Add(new BStringView("other", B_TRANSLATE("Other:"))) .Add(new BStringView("other", B_TRANSLATE("Other:")))
.AddGlue() .AddGlue()
.SetInsets(0, kSpacing / 2, 0, 0)
.End() .End()
.AddGroup(B_VERTICAL, 1) .AddGroup(B_VERTICAL, 0)
.Add(fOpenDest) .Add(fOpenDest)
.Add(fAutoShow) .Add(fAutoShow)
.SetInsets(10, 0, 0, 0) .SetInsets(kSpacing, kSpacing / 2, 0, 0)
.End() .End()
.SetInsets(10, 10, 10, 10) .SetInsets(kSpacing, kSpacing, kSpacing, kSpacing)
); );
box->AddChild(view); box->AddChild(view);
@ -110,12 +116,12 @@ ExpanderPreferences::ExpanderPreferences(BMessage *settings)
SetLayout(new BGroupLayout(B_HORIZONTAL)); SetLayout(new BGroupLayout(B_HORIZONTAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 11) AddChild(BGroupLayoutBuilder(B_VERTICAL, 11)
.Add(box) .Add(box)
.AddGroup(B_HORIZONTAL, 10) .AddGroup(B_HORIZONTAL, kSpacing)
.AddGlue() .AddGlue()
.Add(cancel) .Add(cancel)
.Add(button) .Add(button)
.End() .End()
.SetInsets(10, 10, 10, 10) .SetInsets(kSpacing, kSpacing, kSpacing, kSpacing)
); );
CenterOnScreen(); CenterOnScreen();