1/* 2 * Copyright 2009, Haiku. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Ryan Leavengood, leavengood@gmail.com 7 */ 8 9 10#include <BuildScreenSaverDefaultSettingsView.h> 11 12#include <StringView.h> 13#include <View.h> 14 15 16namespace BPrivate { 17 18// This is used to provide a consistent look for the settings view for screen 19// savers without any configuration. 20void 21BuildScreenSaverDefaultSettingsView(BView* view, const char* moduleName, const char* info) 22{ 23 BRect rect(15, 15, 20, 20); 24 BStringView* stringView = new BStringView(rect, "module", moduleName); 25 stringView->SetFont(be_bold_font); 26 stringView->ResizeToPreferred(); 27 view->AddChild(stringView); 28 29 rect.OffsetBy(0, stringView->Bounds().Height() + 4); 30 stringView = new BStringView(rect, "info", info); 31 stringView->ResizeToPreferred(); 32 view->AddChild(stringView); 33} 34 35} 36 37