[haiku-commits] haiku: hrev47413 - src/preferences/filetypes

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 22 Jun 2014 20:15:54 +0200 (CEST)

hrev47413 adds 1 changeset to branch 'master'
old head: 04e67d278b3afbe2f47a2f159aaf740ce5c75f77
new head: 5ef28aaa4f632499933a352fc13112f72b142bfc
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=5ef28aa+%5E04e67d2

----------------------------------------------------------------------------

5ef28aa: FileTypes: make button placement more consistent
  
  Place Cancel button on left rather than on right in the add
  extensions popup. Also add glue to make it more similar to the other
  popup windows of the preflet.

                                [ Philippe Saint-Pierre <stpere@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev47413
Commit:      5ef28aaa4f632499933a352fc13112f72b142bfc
URL:         http://cgit.haiku-os.org/haiku/commit/?id=5ef28aa
Author:      Philippe Saint-Pierre <stpere@xxxxxxxxx>
Date:        Sun Jun 22 18:12:02 2014 UTC

----------------------------------------------------------------------------

1 file changed, 5 insertions(+), 4 deletions(-)
src/preferences/filetypes/ExtensionWindow.cpp | 9 +++++----

----------------------------------------------------------------------------

diff --git a/src/preferences/filetypes/ExtensionWindow.cpp 
b/src/preferences/filetypes/ExtensionWindow.cpp
index 8dd2b07..7b036a2 100644
--- a/src/preferences/filetypes/ExtensionWindow.cpp
+++ b/src/preferences/filetypes/ExtensionWindow.cpp
@@ -137,15 +137,16 @@ ExtensionWindow::ExtensionWindow(FileTypesWindow* target, 
BMimeType& type,
                new BMessage(kMsgAccept));
        fAcceptButton->SetEnabled(false);
 
-       BButton* button = new BButton(B_TRANSLATE("Cancel"),
+       BButton* cancelButton = new BButton(B_TRANSLATE("Cancel"),
                new BMessage(B_QUIT_REQUESTED));
 
        float padding = be_control_look->DefaultItemSpacing();
        BLayoutBuilder::Grid<>(this, padding, padding)
                .SetInsets(padding, padding, padding, padding)
-               .AddTextControl(fExtensionControl, 0, 0)
-               .Add(fAcceptButton, 0, 1)
-               .Add(button, 1, 1);
+               .AddTextControl(fExtensionControl, 0, 0, 
B_ALIGN_HORIZONTAL_UNSET, 1, 2)
+               .Add(BSpaceLayoutItem::CreateGlue(), 0, 1)
+               .Add(cancelButton, 1, 1)
+               .Add(fAcceptButton, 2, 1);
 
        // omit the leading dot
        if (fExtension.ByteAt(0) == '.')


Other related posts:

  • » [haiku-commits] haiku: hrev47413 - src/preferences/filetypes - stpere