headers/bsd: Add sys/queue.h.
[haiku.git] / src / kits / screensaver / DefaultSettingsView.cpp
blob4294f630cd53d11725086c328471f6b7bc0353e8
1 /*
2 * Copyright 2009-2016 Haiku, Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
5 * Authors:
6 * Ryan Leavengood, leavengood@gmail.com
7 * John Scipione, jscipione@gmail.com
8 */
11 #include <DefaultSettingsView.h>
13 #include <LayoutBuilder.h>
14 #include <StringView.h>
17 namespace BPrivate {
19 // Provides a consistent look for the settings view for screen savers
20 // that don't provide any configuration settings.
21 void
22 BuildDefaultSettingsView(BView* view, const char* moduleName, const char* info)
24 view->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
26 BStringView* nameStringView = new BStringView("module", moduleName);
27 nameStringView->SetFont(be_bold_font);
29 BStringView* infoStringView = new BStringView("info", info);
31 BLayoutBuilder::Group<>(view, B_VERTICAL, B_USE_SMALL_SPACING)
32 .Add(nameStringView)
33 .Add(infoStringView)
34 .AddGlue()
35 .SetInsets(B_USE_DEFAULT_SPACING)
36 .End();
39 } // namespace BPrivate