Remove unnecessary SetExplicitPreferredSize from translators using layouts.
This commit is contained in:
@@ -171,11 +171,6 @@ ConfigView::ConfigView(TranslatorSettings* settings)
|
||||
.AddGlue()
|
||||
.Add(copyright2View)
|
||||
.Add(copyright3View);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 250) / 12,
|
||||
(font.Size() * 350) / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -64,13 +64,8 @@ ConfigView::ConfigView(uint32 flags)
|
||||
.Add(copyrightView2)
|
||||
.Add(copyrightView3)
|
||||
.Add(copyrightView4);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize(font.Size() * 400 / 12,
|
||||
font.Size() * 200 / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
ConfigView::~ConfigView()
|
||||
{
|
||||
|
||||
@@ -35,7 +35,7 @@ HVIFView::HVIFView(const char* name, uint32 flags, TranslatorSettings *settings)
|
||||
title->SetExplicitAlignment(labelAlignment);
|
||||
|
||||
char versionString[256];
|
||||
snprintf(versionString, sizeof(versionString),
|
||||
snprintf(versionString, sizeof(versionString),
|
||||
B_TRANSLATE("Version %d.%d.%d, %s"),
|
||||
int(B_TRANSLATION_MAJOR_VERSION(HVIF_TRANSLATOR_VERSION)),
|
||||
int(B_TRANSLATION_MINOR_VERSION(HVIF_TRANSLATOR_VERSION)),
|
||||
@@ -70,11 +70,6 @@ HVIFView::HVIFView(const char* name, uint32 flags, TranslatorSettings *settings)
|
||||
.AddGlue()
|
||||
.Add(fRenderSize)
|
||||
.AddGlue();
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(
|
||||
BSize((font.Size() * 270) / 12, (font.Size() * 100) / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -707,11 +707,6 @@ TranslatorView::TranslatorView(const char* name, TranslatorSettings* settings)
|
||||
AddTab(new TranslatorAboutView(B_TRANSLATE("About")));
|
||||
|
||||
settings->Release();
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(
|
||||
BSize((font.Size() * 380) / 12, (font.Size() * 250) / 12));
|
||||
}
|
||||
|
||||
|
||||
@@ -1281,7 +1276,7 @@ JPEGTranslator::PopulateInfoFromFormat(translator_info* info,
|
||||
info->quality = formats[i].quality;
|
||||
info->capability = formats[i].capability;
|
||||
BString str1(formats[i].name);
|
||||
str1.ReplaceFirst("Be Bitmap Format (JPEGTranslator)",
|
||||
str1.ReplaceFirst("Be Bitmap Format (JPEGTranslator)",
|
||||
B_TRANSLATE("Be Bitmap Format (JPEGTranslator)"));
|
||||
strlcpy(info->name, str1.String(), sizeof(info->name));
|
||||
strcpy(info->MIME, formats[i].MIME);
|
||||
|
||||
@@ -714,8 +714,8 @@ TranslatorAboutView::TranslatorAboutView(const char* name)
|
||||
|
||||
char versionString[100];
|
||||
snprintf(versionString, sizeof(versionString),
|
||||
B_TRANSLATE("Version %d.%d.%d"),
|
||||
static_cast<int>(sTranslatorVersion >> 8),
|
||||
B_TRANSLATE("Version %d.%d.%d"),
|
||||
static_cast<int>(sTranslatorVersion >> 8),
|
||||
static_cast<int>((sTranslatorVersion >> 4) & 0xf),
|
||||
static_cast<int>(sTranslatorVersion & 0xf));
|
||||
|
||||
@@ -746,18 +746,13 @@ TranslatorView::TranslatorView(const char* name, TranslatorSettings* settings)
|
||||
{
|
||||
SetBorder(B_NO_BORDER);
|
||||
|
||||
AddTab(new TranslatorWriteView(B_TRANSLATE("Write"),
|
||||
AddTab(new TranslatorWriteView(B_TRANSLATE("Write"),
|
||||
settings->Acquire()));
|
||||
AddTab(new TranslatorReadView(B_TRANSLATE("Read"),
|
||||
AddTab(new TranslatorReadView(B_TRANSLATE("Read"),
|
||||
settings->Acquire()));
|
||||
AddTab(new TranslatorAboutView(B_TRANSLATE("About")));
|
||||
|
||||
settings->Release();
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(
|
||||
BSize((font.Size() * 380) / 12, (font.Size() * 250) / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -516,11 +516,6 @@ public:
|
||||
.AddGlue()
|
||||
.Add(fBasedOn)
|
||||
.Add(fCopyright);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(
|
||||
BSize((font.Size() * 350) / 12, (font.Size() * 200) / 12));
|
||||
}
|
||||
~PPMView() { /* nothing here */ }
|
||||
|
||||
|
||||
@@ -78,10 +78,10 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
{
|
||||
BPopUpMenu* menu = new BPopUpMenu("pick compression");
|
||||
|
||||
uint32 currentCompression =
|
||||
uint32 currentCompression =
|
||||
fSettings->SetGetInt32(SGI_SETTING_COMPRESSION);
|
||||
// create the menu items with the various compression methods
|
||||
add_menu_item(menu, SGI_COMP_NONE, B_TRANSLATE("None"),
|
||||
add_menu_item(menu, SGI_COMP_NONE, B_TRANSLATE("None"),
|
||||
currentCompression);
|
||||
//menu->AddSeparatorItem();
|
||||
add_menu_item(menu, SGI_COMP_RLE, B_TRANSLATE("RLE"), currentCompression);
|
||||
@@ -94,12 +94,12 @@ 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);
|
||||
|
||||
BStringView* titleView = new BStringView("title",
|
||||
BStringView* titleView = new BStringView("title",
|
||||
B_TRANSLATE("SGI image translator"));
|
||||
titleView->SetFont(be_bold_font);
|
||||
titleView->SetExplicitAlignment(labelAlignment);
|
||||
@@ -130,11 +130,6 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
.End()
|
||||
.AddGlue()
|
||||
.Add(infoView);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 390) / 12,
|
||||
(font.Size() * 180) / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ ConfigView::ConfigView(TranslatorSettings* settings)
|
||||
snprintf(libwebpVersion, sizeof(libwebpVersion),
|
||||
"%d.%d.%d", v >> 16, (v>>8)&255, v&255);
|
||||
libwebpInfo.ReplaceAll("%version%", libwebpVersion);
|
||||
|
||||
|
||||
BStringView *copyright2View = new BStringView("Copyright2",
|
||||
libwebpInfo.String());
|
||||
BStringView *copyright3View = new BStringView("Copyright3",
|
||||
@@ -147,11 +147,6 @@ ConfigView::ConfigView(TranslatorSettings* settings)
|
||||
.AddGlue()
|
||||
.Add(copyright2View)
|
||||
.Add(copyright3View);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 250) / 12,
|
||||
(font.Size() * 350) / 12));
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user