2 * Copyright 2008, Jérôme Duval. All rights reserved.
3 * Copyright 2005-2007, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
4 * Copyright 2009, Maxime Simon, maxime.simon@gmail.com. All rights reserved.
5 * Distributed under the terms of the MIT License.
9 #include "ConfigView.h"
10 #include "EXRTranslator.h"
14 #include <LayoutBuilder.h>
15 #include <StringView.h>
17 #include <OpenEXRConfig.h>
22 #undef B_TRANSLATION_CONTEXT
23 #define B_TRANSLATION_CONTEXT "ConfigView"
26 ConfigView::ConfigView(uint32 flags
)
27 : BView("EXRTranslator Settings", flags
)
29 SetViewUIColor(B_PANEL_BACKGROUND_COLOR
);
31 BStringView
*titleView
= new BStringView("title",
32 B_TRANSLATE("EXR image translator"));
33 titleView
->SetFont(be_bold_font
);
36 sprintf(version
, B_TRANSLATE("Version %d.%d.%d, %s"),
37 int(B_TRANSLATION_MAJOR_VERSION(EXR_TRANSLATOR_VERSION
)),
38 int(B_TRANSLATION_MINOR_VERSION(EXR_TRANSLATOR_VERSION
)),
39 int(B_TRANSLATION_REVISION_VERSION(EXR_TRANSLATOR_VERSION
)),
41 BStringView
*versionView
= new BStringView("version", version
);
43 BStringView
*copyrightView
= new BStringView("copyright",
44 B_UTF8_COPYRIGHT
"2008 Haiku Inc.");
46 BString openExrInfo
= B_TRANSLATE("Based on OpenEXR %version%");
47 openExrInfo
.ReplaceAll("%version%", OPENEXR_VERSION_STRING
);
48 BStringView
*copyrightView2
= new BStringView("copyright2",
49 openExrInfo
.String());
51 BStringView
*copyrightView3
= new BStringView("copyright3",
52 B_UTF8_COPYRIGHT
"2002-2014 Industrial Light & Magic,");
54 BStringView
*copyrightView4
= new BStringView("copyright4",
55 B_TRANSLATE("a division of Lucasfilm Entertainment Company Ltd"));
58 BLayoutBuilder::Group
<>(this, B_VERTICAL
, 0)
59 .SetInsets(B_USE_DEFAULT_SPACING
)
70 SetExplicitPreferredSize(BSize(font
.Size() * 400 / 12,
71 font
.Size() * 200 / 12));
75 ConfigView::~ConfigView()