From e9d4a25d82cb12a8bfb789bbb2c928280d50d102 Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Tue, 18 Feb 2014 21:59:52 +0100
Subject: [PATCH] Fix button layout consistency issues in preflets
---
src/preferences/mail/ConfigWindow.cpp | 6 +++---
src/preferences/mouse/MouseWindow.cpp | 4 ++--
src/preferences/notifications/PrefletWin.cpp | 4 ++--
src/preferences/touchpad/TouchpadPrefView.cpp | 6 ++----
4 files changed, 9 insertions(+), 11 deletions(-)
diff --git a/src/preferences/mail/ConfigWindow.cpp b/src/preferences/mail/ConfigWindow.cpp
index 36d4312..89e3a84 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright 2007-2011, Haiku, Inc. All rights reserved. |
| 2 | * Copyright 2007-2014, Haiku, Inc. All rights reserved. |
3 | 3 | * Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved. |
4 | 4 | * |
5 | 5 | * Distributed under the terms of the MIT License. |
… |
… |
ConfigWindow::ConfigWindow()
|
414 | 414 | BButton *revertButton = new BButton(rect, "revert", B_TRANSLATE("Revert"), |
415 | 415 | new BMessage(kMsgRevertSettings)); |
416 | 416 | revertButton->GetPreferredSize(&w, &h); |
417 | | revertButton->ResizeTo(w,h); |
418 | | revertButton->MoveTo(saveButton->Frame().left - 10 - w, rect.top); |
| 417 | revertButton->ResizeTo(w, h); |
| 418 | revertButton->MoveTo(rect.left, rect.top); |
419 | 419 | top->AddChild(revertButton); |
420 | 420 | |
421 | 421 | _LoadSettings(); |
diff --git a/src/preferences/mouse/MouseWindow.cpp b/src/preferences/mouse/MouseWindow.cpp
index 48d1023..3899bae 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright 2003-2009 Haiku Inc. All rights reserved. |
| 2 | * Copyright 2003-2014 Haiku Inc. All rights reserved. |
3 | 3 | * Distributed under the terms of the MIT License. |
4 | 4 | * |
5 | 5 | * Authors: |
… |
… |
MouseWindow::MouseWindow(BRect _rect)
|
62 | 62 | |
63 | 63 | AddChild(BGroupLayoutBuilder(B_VERTICAL, 10) |
64 | 64 | .Add(fSettingsBox) |
65 | | .AddGroup(B_HORIZONTAL, 5) |
| 65 | .AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING) |
66 | 66 | .Add(fDefaultsButton) |
67 | 67 | .Add(fRevertButton) |
68 | 68 | .AddGlue() |
diff --git a/src/preferences/notifications/PrefletWin.cpp b/src/preferences/notifications/PrefletWin.cpp
index 422d30c..76a4a1b 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright 2010, Haiku, Inc. All Rights Reserved. |
| 2 | * Copyright 2010-2014, Haiku, Inc. All Rights Reserved. |
3 | 3 | * Copyright 2009, Pier Luigi Fiorini. |
4 | 4 | * Distributed under the terms of the MIT License. |
5 | 5 | * |
… |
… |
PrefletWin::PrefletWin()
|
52 | 52 | .Add(fMainView) |
53 | 53 | |
54 | 54 | .AddGroup(B_HORIZONTAL, inset) |
55 | | .AddGlue() |
56 | 55 | .Add(fRevert) |
| 56 | .AddGlue() |
57 | 57 | .Add(fApply) |
58 | 58 | .End() |
59 | 59 | |
diff --git a/src/preferences/touchpad/TouchpadPrefView.cpp b/src/preferences/touchpad/TouchpadPrefView.cpp
index a60ddfa..a0fe34d 100644
a
|
b
|
|
1 | 1 | /* |
2 | | * Copyright 2008-2013 Haiku, Inc. All rights reserved. |
| 2 | * Copyright 2008-2014 Haiku, Inc. All rights reserved. |
3 | 3 | * Distributed under the terms of the MIT License. |
4 | 4 | * |
5 | 5 | * Authors: |
… |
… |
TouchpadPrefView::SetupView()
|
451 | 451 | |
452 | 452 | tapPrefLayout->AddView(fTapSlider); |
453 | 453 | |
454 | | BGroupView* buttonView = new BGroupView(B_HORIZONTAL); |
| 454 | BGroupView* buttonView = new BGroupView(B_HORIZONTAL, B_USE_SMALL_SPACING); |
455 | 455 | fDefaultButton = new BButton(B_TRANSLATE("Defaults"), |
456 | 456 | new BMessage(DEFAULT_SETTINGS)); |
457 | 457 | |
458 | 458 | buttonView->AddChild(fDefaultButton); |
459 | | buttonView->GetLayout()->AddItem( |
460 | | BSpaceLayoutItem::CreateHorizontalStrut(B_USE_SMALL_SPACING)); |
461 | 459 | fRevertButton = new BButton(B_TRANSLATE("Revert"), |
462 | 460 | new BMessage(REVERT_SETTINGS)); |
463 | 461 | fRevertButton->SetEnabled(false); |