Preferences: Consistent buttons position and spacing.

* Appearance fix spacing.
* Keyboard fix spacing.
* Mouse fix spacing.
* Notifications fix spacing.
* Fixes #5230.
This commit is contained in:
Janus 2015-04-19 09:50:18 +00:00
parent ee93a8f4a1
commit 2a1583cbc0
4 changed files with 13 additions and 16 deletions

View File

@ -67,9 +67,8 @@ APRWindow::APRWindow(BRect frame)
_UpdateButtons();
AddChild(BGroupLayoutBuilder(B_VERTICAL, 0)
AddChild(BGroupLayoutBuilder(B_VERTICAL)
.Add(tabView)
.Add(BSpaceLayoutItem::CreateVerticalStrut(5))
.Add(BGroupLayoutBuilder(B_HORIZONTAL)
.Add(fDefaultsButton)
.Add(fRevertButton)

View File

@ -50,14 +50,15 @@ KeyboardWindow::KeyboardWindow()
// Build the layout
SetLayout(new BGroupLayout(B_VERTICAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
AddChild(BGroupLayoutBuilder(B_VERTICAL)
.Add(fSettingsBox)
.AddGroup(B_HORIZONTAL, 7)
.AddGroup(B_HORIZONTAL)
.Add(fDefaultsButton)
.Add(fRevertButton)
.AddGlue()
.End()
.SetInsets(10, 10, 10, 10)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
);
BSlider* slider = (BSlider* )FindView("key_repeat_rate");

View File

@ -60,14 +60,15 @@ MouseWindow::MouseWindow(BRect _rect)
// Build the layout
SetLayout(new BGroupLayout(B_VERTICAL));
AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
AddChild(BGroupLayoutBuilder(B_VERTICAL)
.Add(fSettingsBox)
.AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)
.AddGroup(B_HORIZONTAL)
.Add(fDefaultsButton)
.Add(fRevertButton)
.AddGlue()
.End()
.SetInsets(10, 10, 10, 10)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
);
// check if the window is on screen

View File

@ -47,23 +47,19 @@ PrefletWin::PrefletWin()
fApply = new BButton("apply", B_TRANSLATE("Apply"), new BMessage(kApply));
fApply->SetEnabled(false);
// Calculate inset
float inset = ceilf(be_plain_font->Size() * 0.7f);
// Build the layout
SetLayout(new BGroupLayout(B_VERTICAL));
// Add childs
AddChild(BGroupLayoutBuilder(B_VERTICAL, inset)
AddChild(BGroupLayoutBuilder(B_VERTICAL)
.Add(fMainView)
.AddGroup(B_HORIZONTAL, inset)
.AddGroup(B_HORIZONTAL)
.Add(fRevert)
.AddGlue()
.Add(fApply)
.End()
.SetInsets(inset, inset, inset, inset)
.SetInsets(B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING,
B_USE_DEFAULT_SPACING, B_USE_DEFAULT_SPACING)
);
ReloadSettings();