From 272475393ce2e90d642db13a3df06f0f0d98dc44 Mon Sep 17 00:00:00 2001 From: Alexander Coers Date: Sun, 1 Apr 2018 11:26:04 +0200 Subject: [PATCH] Changed PNG translator config view Removed workaround for already fixed bug 4217 and removed the call to SetExplicitPreferredSize(), since the layout system was always able to calculate good values for PreferredSize. So for me the call seems to be superfluous. Fixes #13353 --- src/add-ons/translators/png/PNGView.cpp | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/add-ons/translators/png/PNGView.cpp b/src/add-ons/translators/png/PNGView.cpp index 71489c8422..6c8ce3cdbe 100644 --- a/src/add-ons/translators/png/PNGView.cpp +++ b/src/add-ons/translators/png/PNGView.cpp @@ -47,12 +47,12 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode, BStringView *versionView = new BStringView("version", version); BStringView *copyrightView = new BStringView( - "Copyright", B_UTF8_COPYRIGHT "2003-2006 Haiku Inc."); + "Copyright", B_UTF8_COPYRIGHT "2003-2018 Haiku Inc."); // setup PNG interlace options fInterlaceMenu = new BPopUpMenu(B_TRANSLATE("Interlace Option")); - BMenuItem* item = new BMenuItem(B_TRANSLATE("None"), + BMenuItem* item = new BMenuItem(B_TRANSLATE("None"), _InterlaceMessage(PNG_INTERLACE_NONE)); if (fSettings->SetGetInt32(PNG_SETTING_INTERLACE) == PNG_INTERLACE_NONE) item->SetMarked(true); @@ -89,17 +89,6 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode, .End() .AddGlue() .Add(fCopyrightView); - - BFont font; - GetFont(&font); - SetExplicitPreferredSize(BSize((font.Size() * 390) / 12, - (font.Size() * 180) / 12)); - - // TODO: remove this workaround for ticket #4217 - fCopyrightView->SetExplicitPreferredSize( - BSize(fCopyrightView->LineWidth(4), fCopyrightView->TextHeight(0, 80))); - fCopyrightView->SetExplicitMaxSize(fCopyrightView->ExplicitPreferredSize()); - fCopyrightView->SetExplicitMinSize(fCopyrightView->ExplicitPreferredSize()); }