From 5ef28aaa4f632499933a352fc13112f72b142bfc Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 22 Jun 2014 14:12:02 -0400 Subject: [PATCH] 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. --- src/preferences/filetypes/ExtensionWindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/preferences/filetypes/ExtensionWindow.cpp b/src/preferences/filetypes/ExtensionWindow.cpp index 8dd2b07b1c..7b036a26e6 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) == '.')