Ticket #5230: 0002-Fix-button-layout-consistency-issues-in-preflets.patch

File 0002-Fix-button-layout-consistency-issues-in-preflets.patch, 3.7 KB (added by KapiX, 6 years ago)

fixed patch

  • src/preferences/mail/ConfigWindow.cpp

    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  
    11/*
    2  * Copyright 2007-2011, Haiku, Inc. All rights reserved.
     2 * Copyright 2007-2014, Haiku, Inc. All rights reserved.
    33 * Copyright 2001-2003 Dr. Zoidberg Enterprises. All rights reserved.
    44 *
    55 * Distributed under the terms of the MIT License.
    ConfigWindow::ConfigWindow()  
    414414    BButton *revertButton = new BButton(rect, "revert", B_TRANSLATE("Revert"),
    415415        new BMessage(kMsgRevertSettings));
    416416    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);
    419419    top->AddChild(revertButton);
    420420
    421421    _LoadSettings();
  • src/preferences/mouse/MouseWindow.cpp

    diff --git a/src/preferences/mouse/MouseWindow.cpp b/src/preferences/mouse/MouseWindow.cpp
    index 48d1023..3899bae 100644
    a b  
    11/*
    2  * Copyright 2003-2009 Haiku Inc. All rights reserved.
     2 * Copyright 2003-2014 Haiku Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
    MouseWindow::MouseWindow(BRect _rect)  
    6262
    6363    AddChild(BGroupLayoutBuilder(B_VERTICAL, 10)
    6464        .Add(fSettingsBox)
    65         .AddGroup(B_HORIZONTAL, 5)
     65        .AddGroup(B_HORIZONTAL, B_USE_SMALL_SPACING)
    6666            .Add(fDefaultsButton)
    6767            .Add(fRevertButton)
    6868            .AddGlue()
  • src/preferences/notifications/PrefletWin.cpp

    diff --git a/src/preferences/notifications/PrefletWin.cpp b/src/preferences/notifications/PrefletWin.cpp
    index 422d30c..76a4a1b 100644
    a b  
    11/*
    2  * Copyright 2010, Haiku, Inc. All Rights Reserved.
     2 * Copyright 2010-2014, Haiku, Inc. All Rights Reserved.
    33 * Copyright 2009, Pier Luigi Fiorini.
    44 * Distributed under the terms of the MIT License.
    55 *
    PrefletWin::PrefletWin()  
    5252        .Add(fMainView)
    5353
    5454        .AddGroup(B_HORIZONTAL, inset)
    55             .AddGlue()
    5655            .Add(fRevert)
     56            .AddGlue()
    5757            .Add(fApply)
    5858        .End()
    5959
  • src/preferences/touchpad/TouchpadPrefView.cpp

    diff --git a/src/preferences/touchpad/TouchpadPrefView.cpp b/src/preferences/touchpad/TouchpadPrefView.cpp
    index a60ddfa..a0fe34d 100644
    a b  
    11/*
    2  * Copyright 2008-2013 Haiku, Inc. All rights reserved.
     2 * Copyright 2008-2014 Haiku, Inc. All rights reserved.
    33 * Distributed under the terms of the MIT License.
    44 *
    55 * Authors:
    TouchpadPrefView::SetupView()  
    451451
    452452    tapPrefLayout->AddView(fTapSlider);
    453453
    454     BGroupView* buttonView = new BGroupView(B_HORIZONTAL);
     454    BGroupView* buttonView = new BGroupView(B_HORIZONTAL, B_USE_SMALL_SPACING);
    455455    fDefaultButton = new BButton(B_TRANSLATE("Defaults"),
    456456        new BMessage(DEFAULT_SETTINGS));
    457457
    458458    buttonView->AddChild(fDefaultButton);
    459     buttonView->GetLayout()->AddItem(
    460         BSpaceLayoutItem::CreateHorizontalStrut(B_USE_SMALL_SPACING));
    461459    fRevertButton = new BButton(B_TRANSLATE("Revert"),
    462460        new BMessage(REVERT_SETTINGS));
    463461    fRevertButton->SetEnabled(false);