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:
parent
ee93a8f4a1
commit
2a1583cbc0
@ -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)
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user