DataTranslations: use layout, standard format.
* Small layout fix. * Fixes #11999.
This commit is contained in:
@@ -174,9 +174,6 @@ GIFView::GIFView(TranslatorSettings* settings)
|
||||
.AddGlue()
|
||||
.End();
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
|
||||
fSettings->Acquire();
|
||||
|
||||
RestorePrefs();
|
||||
|
||||
@@ -56,7 +56,6 @@ ConfigView::ConfigView()
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(titleView)
|
||||
.AddStrut(B_USE_SMALL_SPACING)
|
||||
.Add(versionView)
|
||||
.Add(copyrightView)
|
||||
.AddGlue()
|
||||
|
||||
@@ -63,15 +63,12 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode,
|
||||
item->SetMarked(true);
|
||||
fInterlaceMenu->AddItem(item);
|
||||
|
||||
|
||||
BMenuField* menuField = new BMenuField(
|
||||
B_TRANSLATE("PNG Interlace Menu"),
|
||||
B_TRANSLATE("Interlacing type:"), fInterlaceMenu);
|
||||
menuField->SetDivider(menuField->StringWidth(menuField->Label()) + 7.0f);
|
||||
menuField->ResizeToPreferred();
|
||||
|
||||
|
||||
|
||||
fCopyrightView = new BTextView("PNG copyright");
|
||||
fCopyrightView->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
fCopyrightView->SetLowColor(fCopyrightView->ViewColor());
|
||||
@@ -80,21 +77,20 @@ PNGView::PNGView(const BRect &frame, const char *name, uint32 resizeMode,
|
||||
fCopyrightView->MakeResizable(true);
|
||||
fCopyrightView->SetText(png_get_copyright(NULL));
|
||||
|
||||
BFont font;
|
||||
//font.SetSize(font.Size() * 0.8);
|
||||
//fCopyrightView->SetFontAndColor(&font, B_FONT_SIZE, NULL);
|
||||
|
||||
|
||||
BLayoutBuilder::Group<>(this, B_VERTICAL, 0)
|
||||
.SetInsets(B_USE_DEFAULT_SPACING)
|
||||
.Add(titleView)
|
||||
.Add(versionView)
|
||||
.Add(copyrightView)
|
||||
.AddGlue()
|
||||
.Add(menuField)
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.Add(menuField)
|
||||
.AddGlue()
|
||||
.End()
|
||||
.AddGlue()
|
||||
.Add(fCopyrightView);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 390) / 12,
|
||||
(font.Size() * 180) / 12));
|
||||
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
"bits big-endian"), CSMessage(B_RGBA15_BIG)));
|
||||
fMenu->AddItem(new BMenuItem(B_TRANSLATE("RGB 5:6:5 16 bits "
|
||||
"big-endian"), CSMessage(B_RGB16)));
|
||||
fField = new BMenuField(B_TRANSLATE("Input Color Space"),
|
||||
fField = new BMenuField(B_TRANSLATE("Input Color Space:"),
|
||||
fMenu);
|
||||
fField->SetViewColor(ViewColor());
|
||||
SelectColorSpace(g_settings.out_space);
|
||||
@@ -523,18 +523,19 @@ public:
|
||||
.Add(fTitle)
|
||||
.Add(fDetail)
|
||||
.AddGlue()
|
||||
.AddGrid(10, 10)
|
||||
.Add(fField->CreateLabelLayoutItem(), 0, 0)
|
||||
.Add(fField->CreateMenuBarLayoutItem(), 1, 0)
|
||||
.Add(fAscii, 0, 1)
|
||||
.End()
|
||||
.AddGroup(B_HORIZONTAL)
|
||||
.Add(fField)
|
||||
.AddGlue()
|
||||
.End()
|
||||
.Add(fAscii)
|
||||
.AddGlue()
|
||||
.Add(fBasedOn)
|
||||
.Add(fCopyright);
|
||||
|
||||
BFont font;
|
||||
GetFont(&font);
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 350)/12, (font.Size() * 200)/12));
|
||||
SetExplicitPreferredSize(BSize((font.Size() * 350)/12,
|
||||
(font.Size() * 200)/12));
|
||||
}
|
||||
~PPMView()
|
||||
{
|
||||
|
||||
@@ -37,6 +37,7 @@ ConfigView::ConfigView(TranslatorSettings *settings)
|
||||
|
||||
fCompressionField = new BMenuField("compression",
|
||||
B_TRANSLATE("Compression: "), compressionPopupMenu);
|
||||
fCompressionField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
BPopUpMenu* versionPopupMenu = new BPopUpMenu("popup_version");
|
||||
|
||||
@@ -52,6 +53,7 @@ ConfigView::ConfigView(TranslatorSettings *settings)
|
||||
|
||||
fVersionField = new BMenuField("version",
|
||||
B_TRANSLATE("Format: "), versionPopupMenu);
|
||||
fVersionField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
BStringView *titleView = new BStringView("title",
|
||||
B_TRANSLATE("Photoshop image translator"));
|
||||
@@ -78,6 +80,12 @@ ConfigView::ConfigView(TranslatorSettings *settings)
|
||||
.AddGlue()
|
||||
.Add(fVersionField)
|
||||
.Add(fCompressionField)
|
||||
.AddGrid(10.0f, 5.0f)
|
||||
.Add(fVersionField->CreateLabelLayoutItem(), 0, 0)
|
||||
.Add(fVersionField->CreateMenuBarLayoutItem(), 1, 0)
|
||||
.Add(fCompressionField->CreateLabelLayoutItem(), 0, 1)
|
||||
.Add(fCompressionField->CreateMenuBarLayoutItem(), 1, 1)
|
||||
.End()
|
||||
.AddGlue()
|
||||
.Add(copyright2View);
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
BTextView* infoView = new BTextView("info");
|
||||
infoView->SetText(BString(B_TRANSLATE("written by:\n"))
|
||||
.Append(author)
|
||||
.Append(B_TRANSLATE("\n\nbased on GIMP SGI plugin v1.5:\n"))
|
||||
.Append(B_TRANSLATE("\nbased on GIMP SGI plugin v1.5:\n"))
|
||||
.Append(kSGICopyright).String());
|
||||
infoView->SetExplicitAlignment(labelAlignment);
|
||||
infoView->SetWordWrap(false);
|
||||
@@ -144,7 +144,7 @@ SGIView::SGIView(const char* name, uint32 flags, TranslatorSettings* settings)
|
||||
|
||||
// TODO: remove this workaround for ticket #4217
|
||||
infoView->SetExplicitPreferredSize(
|
||||
BSize(infoView->LineWidth(4), infoView->TextHeight(0, 80)));
|
||||
BSize(infoView->LineWidth(3), infoView->TextHeight(0, 80)));
|
||||
infoView->SetExplicitMaxSize(infoView->ExplicitPreferredSize());
|
||||
infoView->SetExplicitMinSize(infoView->ExplicitPreferredSize());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user