hrev45731 adds 12 changesets to branch 'master' old head: ccc445576a4c11dda3386dfd4308e53fca1989d6 new head: c33dfc270f6bbb684164fcc98073c5cd8680b066 overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=c33dfc2+%5Eccc4455 ---------------------------------------------------------------------------- 6a0d793: Revert "SGITranslator: Resize menu field to preferred width" This reverts commit dc674f5d961fe92d691e6bae4def80ff6d14da3b. c6fa447: Revert "TIFFTranslator: Resize menu field to preferred width." This reverts commit d9dae4d313e5d1ab96749c8a99f749c652e39ea0. 463355a: TIFFTranslator: Remove this unneeded SetDivider() call. 10e82a5: TIFFTranslator: Ax ResizeToPreferred(), use glue instead. e339efb: SGITranslator: Ax ResizeToPreferred(), use glue instead. 2f5349a: Revert "Backgrounds: Resize menu fields to preferred width." This reverts commit 19d9ad49ae52b561d8600ee27c73e9352d2f37b9. fc584d8: Backgrounds: Update header, copyright year, add my name 56cf4a9: Backgrounds: message fall through 94e6903: Backgrounds: View layout updates * Replace the stringViews with CreateLabelLayoutItem()s and menus with CreateMenuBarLayoutItem(). * Remove extra group levels * Use font aware spacing units in layout constructor. * Align the fIconLabelOutline check box with the menu fields instead of the menu field labels. 821d2bf: Backgrounds: Don't resize image menu field to preferred 1839b2e: Backgrounds: Eliminate uneeded view variable c33dfc2: Background: Increase the cell size of the color control ... to 8.0 matching the value used in the Appearance preflet. This cell sizes makes the ramps fit nicely with the Red Green and Blue text boxes at the default 12pt font size. [ John Scipione <jscipione@xxxxxxxxx> ] ---------------------------------------------------------------------------- 6 files changed, 37 insertions(+), 102 deletions(-) src/add-ons/translators/sgi/SGIView.cpp | 22 ++---- src/add-ons/translators/sgi/SGIView.h | 1 - src/add-ons/translators/tiff/TIFFView.cpp | 23 ++---- src/add-ons/translators/tiff/TIFFView.h | 1 - src/preferences/backgrounds/BackgroundsView.cpp | 79 ++++++--------------- src/preferences/backgrounds/BackgroundsView.h | 13 ++-- ############################################################################ Commit: 6a0d79319a5766ed9e113881ddcedba06991fb51 URL: http://cgit.haiku-os.org/haiku/commit/?id=6a0d793 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:00:45 2013 UTC Revert "SGITranslator: Resize menu field to preferred width" This reverts commit dc674f5d961fe92d691e6bae4def80ff6d14da3b. ---------------------------------------------------------------------------- diff --git a/src/add-ons/translators/sgi/SGIView.cpp b/src/add-ons/translators/sgi/SGIView.cpp index 6c65c96..1c2a7ba 100644 --- a/src/add-ons/translators/sgi/SGIView.cpp +++ b/src/add-ons/translators/sgi/SGIView.cpp @@ -95,7 +95,7 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings) //add_menu_item(menu, SGI_COMP_ARLE, "Agressive RLE", currentCompression); - fCompressionMF = new BMenuField("compression", + fCompressionMF = new BMenuField("compression", B_TRANSLATE("Use compression:"), menu); BAlignment labelAlignment(B_ALIGN_LEFT, B_ALIGN_NO_VERTICAL); @@ -157,8 +157,6 @@ void SGIView::AllAttached() { fCompressionMF->Menu()->SetTargetForItems(this); - fCompressionMF->SetDivider( - fCompressionMF->StringWidth(fCompressionMF->Label()) + 3); } @@ -179,15 +177,3 @@ SGIView::MessageReceived(BMessage* message) BView::MessageReceived(message); } } - - -void -SGIView::WindowActivated(bool active) -{ - static bool firstRun = true; - - if (firstRun) { - firstRun = false; - fCompressionMF->ResizeToPreferred(); - } -} diff --git a/src/add-ons/translators/sgi/SGIView.h b/src/add-ons/translators/sgi/SGIView.h index 53a5628..c3ebda9 100644 --- a/src/add-ons/translators/sgi/SGIView.h +++ b/src/add-ons/translators/sgi/SGIView.h @@ -50,7 +50,6 @@ public: virtual void AllAttached(); virtual void MessageReceived(BMessage* message); - virtual void WindowActivated(bool active); enum { MSG_COMPRESSION_CHANGED = 'cmch', ############################################################################ Commit: c6fa4474a4ec95def3541562eda1c45c1a160bbe URL: http://cgit.haiku-os.org/haiku/commit/?id=c6fa447 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:00:54 2013 UTC Revert "TIFFTranslator: Resize menu field to preferred width." This reverts commit d9dae4d313e5d1ab96749c8a99f749c652e39ea0. ---------------------------------------------------------------------------- diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index 5e880fb..3a285fe 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -120,8 +120,7 @@ TIFFView::TIFFView(const char* name, uint32 flags, // TODO ? - strip encoding is not implemented in libTIFF for this compression // add_menu_item(menu, COMPRESSION_JP2000, "JPEG2000", currentCompression); - fCompressionMF = new BMenuField("compression", - B_TRANSLATE("Use compression:"), menu); + fCompressionMF = new BMenuField(B_TRANSLATE("Use compression:"), menu); // Build the layout BLayoutBuilder::Group<>(this, B_VERTICAL, 7) @@ -159,6 +158,7 @@ TIFFView::AllAttached() fCompressionMF->Menu()->SetTargetForItems(this); fCompressionMF->SetDivider( fCompressionMF->StringWidth(fCompressionMF->Label()) + 3); + fCompressionMF->ResizeToPreferred(); } @@ -172,22 +172,9 @@ TIFFView::MessageReceived(BMessage* message) fSettings->SetGetInt32(TIFF_SETTING_COMPRESSION, &value); fSettings->SaveSettings(); } - fCompressionMF->ResizeToPreferred(); break; } default: BView::MessageReceived(message); } } - - -void -TIFFView::WindowActivated(bool active) -{ - static bool firstRun = true; - - if (firstRun) { - firstRun = false; - fCompressionMF->ResizeToPreferred(); - } -} diff --git a/src/add-ons/translators/tiff/TIFFView.h b/src/add-ons/translators/tiff/TIFFView.h index e9bbd48..69754fe 100644 --- a/src/add-ons/translators/tiff/TIFFView.h +++ b/src/add-ons/translators/tiff/TIFFView.h @@ -48,7 +48,6 @@ public: virtual void AllAttached(); virtual void MessageReceived(BMessage* message); - virtual void WindowActivated(bool active); enum { MSG_COMPRESSION_CHANGED = 'cmch', ############################################################################ Commit: 463355a736c8f53e8e65b73ccc70f7bbc7aded6c URL: http://cgit.haiku-os.org/haiku/commit/?id=463355a Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:20:29 2013 UTC TIFFTranslator: Remove this unneeded SetDivider() call. ---------------------------------------------------------------------------- diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index 3a285fe..9d6b70a 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -156,8 +156,6 @@ void TIFFView::AllAttached() { fCompressionMF->Menu()->SetTargetForItems(this); - fCompressionMF->SetDivider( - fCompressionMF->StringWidth(fCompressionMF->Label()) + 3); fCompressionMF->ResizeToPreferred(); } ############################################################################ Commit: 10e82a53801221d83b05aa27eed11ba0919222a9 URL: http://cgit.haiku-os.org/haiku/commit/?id=10e82a5 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:21:36 2013 UTC TIFFTranslator: Ax ResizeToPreferred(), use glue instead. ---------------------------------------------------------------------------- diff --git a/src/add-ons/translators/tiff/TIFFView.cpp b/src/add-ons/translators/tiff/TIFFView.cpp index 9d6b70a..64071ba 100644 --- a/src/add-ons/translators/tiff/TIFFView.cpp +++ b/src/add-ons/translators/tiff/TIFFView.cpp @@ -128,7 +128,10 @@ TIFFView::TIFFView(const char* name, uint32 flags, .Add(fTitle) .Add(fDetail) .AddGlue() - .Add(fCompressionMF) + .AddGroup(B_HORIZONTAL) + .Add(fCompressionMF) + .AddGlue() + .End() .AddGlue() .Add(fLibTIFF[0]) .Add(fLibTIFF[1]) @@ -156,7 +159,6 @@ void TIFFView::AllAttached() { fCompressionMF->Menu()->SetTargetForItems(this); - fCompressionMF->ResizeToPreferred(); } ############################################################################ Commit: e339efbfef5085bd81f3371f6a272934608b874d URL: http://cgit.haiku-os.org/haiku/commit/?id=e339efb Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:22:04 2013 UTC SGITranslator: Ax ResizeToPreferred(), use glue instead. ---------------------------------------------------------------------------- diff --git a/src/add-ons/translators/sgi/SGIView.cpp b/src/add-ons/translators/sgi/SGIView.cpp index 1c2a7ba..3ce90e2 100644 --- a/src/add-ons/translators/sgi/SGIView.cpp +++ b/src/add-ons/translators/sgi/SGIView.cpp @@ -130,7 +130,10 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings) .SetInsets(padding) .Add(titleView) .Add(detailView) - .Add(fCompressionMF) + .AddGroup(B_HORIZONTAL) + .Add(fCompressionMF) + .AddGlue() + .End() .Add(infoView) .AddGlue(); @@ -170,7 +173,6 @@ SGIView::MessageReceived(BMessage* message) fSettings->SetGetInt32(SGI_SETTING_COMPRESSION, &value); fSettings->SaveSettings(); } - fCompressionMF->ResizeToPreferred(); break; } default: ############################################################################ Commit: 2f5349a40af16c4144dc0f289122fe9fbf6bdb0d URL: http://cgit.haiku-os.org/haiku/commit/?id=2f5349a Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:22:26 2013 UTC Revert "Backgrounds: Resize menu fields to preferred width." This reverts commit 19d9ad49ae52b561d8600ee27c73e9352d2f37b9. ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 061aaac..7310572 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -1,11 +1,10 @@ /* - * Copyright 2002-2013 Haiku, Inc. All Rights Reserved. + * Copyright 2002-2009, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: + * Jerome Duval (jerome.duval@xxxxxxx) * Axel Dörfler, axeld@xxxxxxxxxxxxxxxx - * Jerome Duval, jerome.duval@xxxxxxx - * John Scipione, jscipione@xxxxxxxxx * Jonas Sundström, jonas@xxxxxxxxxx */ @@ -24,6 +23,7 @@ #include <FindDirectory.h> #include <LayoutBuilder.h> #include <Locale.h> +#include <MenuField.h> #include <Messenger.h> #include <MimeType.h> #include <Point.h> @@ -163,8 +163,9 @@ BackgroundsView::BackgroundsView() fImageMenu->AddItem(new BMenuItem(B_TRANSLATE("Other" B_UTF8_ELLIPSIS), new BMessage(kMsgOtherImage))); - fImageMenuField = new BMenuField(NULL, fImageMenu); - fImageMenuField->SetAlignment(B_ALIGN_RIGHT); + BMenuField* imageMenuField = new BMenuField(NULL, fImageMenu); + imageMenuField->SetAlignment(B_ALIGN_RIGHT); + imageMenuField->ResizeToPreferred(); fPlacementMenu = new BPopUpMenu(B_TRANSLATE("pick one")); fPlacementMenu->AddItem(new BMenuItem(B_TRANSLATE("Manual"), @@ -176,8 +177,8 @@ BackgroundsView::BackgroundsView() fPlacementMenu->AddItem(new BMenuItem(B_TRANSLATE("Tile"), new BMessage(kMsgTilePlacement))); - fPlacementMenuField = new BMenuField(NULL, fPlacementMenu); - fPlacementMenuField->SetAlignment(B_ALIGN_RIGHT); + BMenuField* placementMenuField = new BMenuField(NULL, fPlacementMenu); + placementMenuField->SetAlignment(B_ALIGN_RIGHT); fIconLabelOutline = new BCheckBox(B_TRANSLATE("Icon label outline"), new BMessage(kMsgIconLabelOutline)); @@ -197,18 +198,18 @@ BackgroundsView::BackgroundsView() B_ALIGN_NO_VERTICAL)); view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING) - .AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING) - .AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING) + .AddGroup(B_VERTICAL, 10) + .AddGroup(B_VERTICAL, 10) + .AddGrid(10, 10) .Add(imageStringView, 0, 0) - .Add(fImageMenuField, 1, 0) .Add(placementStringView, 0, 1) - .Add(fPlacementMenuField, 1, 1) - .Add(fIconLabelOutline, 1, 2) + .Add(imageMenuField, 1, 0) + .Add(placementMenuField, 1, 1) .End() + .Add(fIconLabelOutline) .End() .Add(fPicker) - .SetInsets(B_USE_DEFAULT_SPACING) + .SetInsets(10, 10, 10, 10) .End() .View(); @@ -316,10 +317,13 @@ BackgroundsView::MessageReceived(BMessage* msg) } case kMsgManualPlacement: + _UpdatePreview(); + _UpdateButtons(); + break; + case kMsgTilePlacement: case kMsgScalePlacement: case kMsgCenterPlacement: - fPlacementMenuField->ResizeToPreferred(); _UpdatePreview(); _UpdateButtons(); break; @@ -385,8 +389,6 @@ BackgroundsView::MessageReceived(BMessage* msg) case kMsgNoImage: fLastImageIndex = ((BGImageMenuItem*)fImageMenu->FindMarked()) ->ImageIndex(); - fImageMenuField->ResizeToPreferred(); - fPlacementMenuField->ResizeToPreferred(); _UpdatePreview(); _UpdateButtons(); break; @@ -829,19 +831,6 @@ BackgroundsView::_LoadSettings() void -BackgroundsView::WindowActivated(bool active) -{ - static bool firstRun = true; - - if (firstRun) { - firstRun = false; - fImageMenuField->ResizeToPreferred(); - fPlacementMenuField->ResizeToPreferred(); - } -} - - -void BackgroundsView::WorkspaceActivated(uint32 oldWorkspaces, bool active) { _UpdateWithCurrent(); diff --git a/src/preferences/backgrounds/BackgroundsView.h b/src/preferences/backgrounds/BackgroundsView.h index 6074a5f..8623807 100644 --- a/src/preferences/backgrounds/BackgroundsView.h +++ b/src/preferences/backgrounds/BackgroundsView.h @@ -1,10 +1,9 @@ /* - * Copyright 2002-2013 Haiku, Inc. All Rights Reserved. + * Copyright 2002-2009, Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: - * Jerome Duval, jerome.duval@xxxxxxx - * John Scipione, jscipione@xxxxxxxxx + * Jerome Duval (jerome.duval@xxxxxxx) */ #ifndef BACKGROUNDS_VIEW_H #define BACKGROUNDS_VIEW_H @@ -19,7 +18,6 @@ #include <Entry.h> #include <FilePanel.h> #include <Menu.h> -#include <MenuField.h> #include <MenuItem.h> #include <Message.h> #include <Picture.h> @@ -112,7 +110,6 @@ public: void RefsReceived(BMessage* msg); void SaveSettings(); - void WindowActivated(bool active); void WorkspaceActivated(uint32 oldWorkspaces, bool active); int32 AddImage(BPath path); @@ -145,12 +142,10 @@ protected: BColorControl* fPicker; BButton* fApply; BButton* fRevert; - BMenu* fWorkspaceMenu; + BCheckBox* fIconLabelOutline; BMenu* fPlacementMenu; - BMenuField* fPlacementMenuField; BMenu* fImageMenu; - BMenuField* fImageMenuField; - BCheckBox* fIconLabelOutline; + BMenu* fWorkspaceMenu; BTextControl* fXPlacementText; BTextControl* fYPlacementText; Preview* fPreview; ############################################################################ Commit: fc584d8a7d9996961edbddc1b88b9aa8a7df91f4 URL: http://cgit.haiku-os.org/haiku/commit/?id=fc584d8 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:27:58 2013 UTC Backgrounds: Update header, copyright year, add my name ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 7310572..c4f2adc 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -1,11 +1,12 @@ /* - * Copyright 2002-2009, Haiku, Inc. All Rights Reserved. + * Copyright 2002-2013 Haiku, Inc. All Rights Reserved. * Distributed under the terms of the MIT License. * * Authors: - * Jerome Duval (jerome.duval@xxxxxxx) * Axel Dörfler, axeld@xxxxxxxxxxxxxxxx + * Jerome Duval, jerome.duval@xxxxxxx * Jonas Sundström, jonas@xxxxxxxxxx + * John Scipione, jscipione@xxxxxxxxx */ ############################################################################ Commit: 56cf4a96bcd56f24a54f7a6ba25adaf05b84dfe8 URL: http://cgit.haiku-os.org/haiku/commit/?id=56cf4a9 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:28:56 2013 UTC Backgrounds: message fall through ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index c4f2adc..74d36f7 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -318,10 +318,6 @@ BackgroundsView::MessageReceived(BMessage* msg) } case kMsgManualPlacement: - _UpdatePreview(); - _UpdateButtons(); - break; - case kMsgTilePlacement: case kMsgScalePlacement: case kMsgCenterPlacement: ############################################################################ Commit: 94e6903259f06f2abeb3dbd38369e1fb1f64c505 URL: http://cgit.haiku-os.org/haiku/commit/?id=94e6903 Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 19:30:16 2013 UTC Backgrounds: View layout updates * Replace the stringViews with CreateLabelLayoutItem()s and menus with CreateMenuBarLayoutItem(). * Remove extra group levels * Use font aware spacing units in layout constructor. * Align the fIconLabelOutline check box with the menu fields instead of the menu field labels. ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 74d36f7..b149a88 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -164,7 +164,8 @@ BackgroundsView::BackgroundsView() fImageMenu->AddItem(new BMenuItem(B_TRANSLATE("Other" B_UTF8_ELLIPSIS), new BMessage(kMsgOtherImage))); - BMenuField* imageMenuField = new BMenuField(NULL, fImageMenu); + BMenuField* imageMenuField = new BMenuField("image", + B_TRANSLATE("Image:"), fImageMenu); imageMenuField->SetAlignment(B_ALIGN_RIGHT); imageMenuField->ResizeToPreferred(); @@ -178,7 +179,8 @@ BackgroundsView::BackgroundsView() fPlacementMenu->AddItem(new BMenuItem(B_TRANSLATE("Tile"), new BMessage(kMsgTilePlacement))); - BMenuField* placementMenuField = new BMenuField(NULL, fPlacementMenu); + BMenuField* placementMenuField = new BMenuField("placement", + B_TRANSLATE("Placement:"), fPlacementMenu); placementMenuField->SetAlignment(B_ALIGN_RIGHT); fIconLabelOutline = new BCheckBox(B_TRANSLATE("Icon label outline"), @@ -188,33 +190,17 @@ BackgroundsView::BackgroundsView() fPicker = new BColorControl(BPoint(0, 0), B_CELLS_32x8, 7.0, "Picker", new BMessage(kMsgUpdateColor)); - BStringView* imageStringView = - new BStringView(NULL, B_TRANSLATE("Image:")); - BStringView* placementStringView = - new BStringView(NULL, B_TRANSLATE("Placement:")); - - imageStringView->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, - B_ALIGN_NO_VERTICAL)); - placementStringView->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, - B_ALIGN_NO_VERTICAL)); - - view = BLayoutBuilder::Group<>() - .AddGroup(B_VERTICAL, 10) - .AddGroup(B_VERTICAL, 10) - .AddGrid(10, 10) - .Add(imageStringView, 0, 0) - .Add(placementStringView, 0, 1) - .Add(imageMenuField, 1, 0) - .Add(placementMenuField, 1, 1) - .End() - .Add(fIconLabelOutline) - .End() - .Add(fPicker) - .SetInsets(10, 10, 10, 10) + rightbox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL, B_USE_DEFAULT_SPACING) + .AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING) + .Add(imageMenuField->CreateLabelLayoutItem(), 0, 0) + .Add(imageMenuField->CreateMenuBarLayoutItem(), 1, 0) + .Add(placementMenuField->CreateLabelLayoutItem(), 0, 1) + .Add(placementMenuField->CreateMenuBarLayoutItem(), 1, 1) + .Add(fIconLabelOutline, 1, 2) .End() - .View(); - - rightbox->AddChild(view); + .Add(fPicker) + .SetInsets(B_USE_DEFAULT_SPACING) + .View()); fRevert = new BButton(B_TRANSLATE("Revert"), new BMessage(kMsgRevertSettings)); ############################################################################ Commit: 821d2bfcb0611cb11aad3d7016d9779980762c43 URL: http://cgit.haiku-os.org/haiku/commit/?id=821d2bf Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 23:00:03 2013 UTC Backgrounds: Don't resize image menu field to preferred ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index b149a88..fd7516c 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -167,7 +167,6 @@ BackgroundsView::BackgroundsView() BMenuField* imageMenuField = new BMenuField("image", B_TRANSLATE("Image:"), fImageMenu); imageMenuField->SetAlignment(B_ALIGN_RIGHT); - imageMenuField->ResizeToPreferred(); fPlacementMenu = new BPopUpMenu(B_TRANSLATE("pick one")); fPlacementMenu->AddItem(new BMenuItem(B_TRANSLATE("Manual"), ############################################################################ Commit: 1839b2e699fbd0d360a623ef8b768a5e34584da1 URL: http://cgit.haiku-os.org/haiku/commit/?id=1839b2e Author: John Scipione <jscipione@xxxxxxxxx> Date: Fri May 31 23:20:28 2013 UTC Backgrounds: Eliminate uneeded view variable ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index fd7516c..116fa0d 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -103,7 +103,7 @@ BackgroundsView::BackgroundsView() } } - BView* view = BLayoutBuilder::Group<>() + previewBox->AddChild(BLayoutBuilder::Group<>() .AddGlue() .AddGroup(B_VERTICAL, be_control_look->DefaultItemSpacing() * 2) .AddGroup(B_HORIZONTAL, 0) @@ -129,9 +129,7 @@ BackgroundsView::BackgroundsView() .SetInsets(B_USE_DEFAULT_SPACING) .End() .AddGlue() - .View(); - - previewBox->AddChild(view); + .View()); BBox* rightbox = new BBox("rightbox"); @@ -211,7 +209,7 @@ BackgroundsView::BackgroundsView() fApply->SetExplicitAlignment(BAlignment(B_ALIGN_RIGHT, B_ALIGN_NO_VERTICAL)); - view = BLayoutBuilder::Group<>() + AddChild(BLayoutBuilder::Group<>() .AddGroup(B_VERTICAL, B_USE_DEFAULT_SPACING) .AddGroup(B_HORIZONTAL, B_USE_DEFAULT_SPACING) .Add(previewBox) @@ -223,9 +221,7 @@ BackgroundsView::BackgroundsView() .End() .SetInsets(B_USE_DEFAULT_SPACING) .End() - .View(); - - AddChild(view); + .View()); fApply->MakeDefault(true); } ############################################################################ Revision: hrev45731 Commit: c33dfc270f6bbb684164fcc98073c5cd8680b066 URL: http://cgit.haiku-os.org/haiku/commit/?id=c33dfc2 Author: John Scipione <jscipione@xxxxxxxxx> Date: Sat Jun 1 00:53:29 2013 UTC Background: Increase the cell size of the color control ... to 8.0 matching the value used in the Appearance preflet. This cell sizes makes the ramps fit nicely with the Red Green and Blue text boxes at the default 12pt font size. ---------------------------------------------------------------------------- diff --git a/src/preferences/backgrounds/BackgroundsView.cpp b/src/preferences/backgrounds/BackgroundsView.cpp index 116fa0d..f57f840 100644 --- a/src/preferences/backgrounds/BackgroundsView.cpp +++ b/src/preferences/backgrounds/BackgroundsView.cpp @@ -184,7 +184,7 @@ BackgroundsView::BackgroundsView() new BMessage(kMsgIconLabelOutline)); fIconLabelOutline->SetValue(B_CONTROL_OFF); - fPicker = new BColorControl(BPoint(0, 0), B_CELLS_32x8, 7.0, "Picker", + fPicker = new BColorControl(BPoint(0, 0), B_CELLS_32x8, 8.0, "Picker", new BMessage(kMsgUpdateColor)); rightbox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL, B_USE_DEFAULT_SPACING)