From 0ef3ab47707cbe9220ce010b17f9df4035be792b Mon Sep 17 00:00:00 2001
From: Kacper Kasper <kacperkasper@gmail.com>
Date: Tue, 18 Feb 2014 18:32:03 +0000
Subject: [PATCH] Fix button layout consistency issues in preflets
---
src/preferences/mail/ConfigWindow.cpp | 6 +++---
src/preferences/notifications/PrefletWin.cpp | 4 ++--
src/preferences/touchpad/TouchpadPrefView.cpp | 6 ++----
3 files changed, 7 insertions(+), 9 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/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..d9f4065 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, 5); |
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); |