2 * Copyright 2012, Gerasim Troeglazov, 3dEyes@gmail.com. All rights reserved.
3 * Distributed under the terms of the MIT License.
6 #include "ConfigView.h"
7 #include "ICNSTranslator.h"
10 #include <LayoutBuilder.h>
11 #include <StringView.h>
12 #include <ControlLook.h>
16 #undef B_TRANSLATION_CONTEXT
17 #define B_TRANSLATION_CONTEXT "ICNSConfig"
20 ConfigView::ConfigView(TranslatorSettings
*settings
)
21 : BGroupView("ICNSTranslator Settings", B_VERTICAL
, 0)
25 BStringView
*titleView
= new BStringView("title", B_TRANSLATE("Apple icon translator"));
26 titleView
->SetFont(be_bold_font
);
29 sprintf(version
, B_TRANSLATE("Version %d.%d.%d, %s"),
30 int(B_TRANSLATION_MAJOR_VERSION(ICNS_TRANSLATOR_VERSION
)),
31 int(B_TRANSLATION_MINOR_VERSION(ICNS_TRANSLATOR_VERSION
)),
32 int(B_TRANSLATION_REVISION_VERSION(ICNS_TRANSLATOR_VERSION
)),
35 BStringView
*versionView
= new BStringView("version", version
);
38 BStringView
*copyrightView
= new BStringView("copyright",
39 B_UTF8_COPYRIGHT
"2005-2006 Haiku Inc.");
41 BStringView
*copyright2View
= new BStringView("my_copyright",
42 B_UTF8_COPYRIGHT
"2012 Gerasim Troeglazov <3dEyes@gmail.com>.");
44 BStringView
*infoView
= new BStringView("support_sizes",
45 B_TRANSLATE("Valid sizes: 16, 32, 48, 128, 256, 512, 1024"));
47 BStringView
*info2View
= new BStringView("support_colors",
48 B_TRANSLATE("Valid colors: RGB32, RGBA32"));
50 BStringView
*copyright3View
= new BStringView("copyright3",
53 BStringView
*copyright4View
= new BStringView("copyright4",
54 "2001-2012 Mathew Eis <mathew@eisbox.net>");
56 BLayoutBuilder::Group
<>(this, B_VERTICAL
, 0)
57 .SetInsets(B_USE_DEFAULT_SPACING
)
69 SetExplicitPreferredSize(GroupLayout()->MinSize());
73 ConfigView::~ConfigView()