2 * Copyright 2002-2009, Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT license.
7 * Axel Dörfler, axeld@pinc-software.de
10 /*! A view with information about the BMPTranslator. */
14 #include "BMPTranslator.h"
17 #include <LayoutBuilder.h>
18 #include <StringView.h>
22 #undef B_TRANSLATION_CONTEXT
23 #define B_TRANSLATION_CONTEXT "BMPView"
26 BMPView::BMPView(const BRect
&frame
, const char *name
, uint32 resizeMode
,
27 uint32 flags
, TranslatorSettings
*settings
)
28 : BView(frame
, name
, resizeMode
, flags
)
31 SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR
));
33 BStringView
*titleView
= new BStringView("title",
34 B_TRANSLATE("BMP image translator"));
35 titleView
->SetFont(be_bold_font
);
38 snprintf(version
, sizeof(version
), B_TRANSLATE("Version %d.%d.%d, %s"),
39 int(B_TRANSLATION_MAJOR_VERSION(BMP_TRANSLATOR_VERSION
)),
40 int(B_TRANSLATION_MINOR_VERSION(BMP_TRANSLATOR_VERSION
)),
41 int(B_TRANSLATION_REVISION_VERSION(BMP_TRANSLATOR_VERSION
)),
43 BStringView
*versionView
= new BStringView("version", version
);
44 BStringView
*copyrightView
= new BStringView("Copyright", B_UTF8_COPYRIGHT
"2002-2010 Haiku Inc.");
46 BLayoutBuilder::Group
<>(this, B_VERTICAL
, 0)
47 .SetInsets(B_USE_DEFAULT_SPACING
)
55 SetExplicitPreferredSize(BSize((font
.Size() * 300)/12,
56 (font
.Size() * 100)/12));