Updated the screensavers Haiku, Icons and Message to use the new default
settings view function. Also some clean-up. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33405 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -2,12 +2,11 @@ SubDir HAIKU_TOP src add-ons screen_savers haiku ;
|
||||
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
UsePrivateHeaders screen_saver ;
|
||||
# For BuildScreenSaverDefaultSettingsView
|
||||
|
||||
Addon Haiku :
|
||||
ScreenSaver.cpp
|
||||
: be screensaver $(TARGET_LIBSUPC++)
|
||||
;
|
||||
|
||||
Package haiku-screensaverkit-cvs :
|
||||
Haiku :
|
||||
boot home config add-ons Screen\ Savers
|
||||
;
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
#include <Font.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||
|
||||
|
||||
class ScreenSaver : public BScreenSaver
|
||||
{
|
||||
public:
|
||||
@@ -52,7 +55,8 @@ ScreenSaver::ScreenSaver(BMessage *archive, image_id id)
|
||||
void
|
||||
ScreenSaver::StartConfig(BView *view)
|
||||
{
|
||||
view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "Haiku, by Marcus Overhagen"));
|
||||
BPrivate::BuildScreenSaverDefaultSettingsView(view, "Haiku",
|
||||
"by Marcus Overhagen");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <MimeType.h>
|
||||
#include <StringView.h>
|
||||
|
||||
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||
|
||||
#include "IconDisplay.h"
|
||||
|
||||
|
||||
@@ -183,21 +185,7 @@ IconsSaver::Draw(BView *view, int32 frame)
|
||||
void
|
||||
IconsSaver::StartConfig(BView* view)
|
||||
{
|
||||
const uint8 spacer = 5;
|
||||
BRect frame = view->Frame();
|
||||
BRect position(spacer, spacer, frame.Width() - 2 * spacer, 0);
|
||||
|
||||
view->SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR));
|
||||
|
||||
BStringView* stringView = new BStringView(position, "", "Icons");
|
||||
stringView->SetFont(be_bold_font);
|
||||
stringView->ResizeToPreferred();
|
||||
position.top += stringView->Frame().Height();
|
||||
view->AddChild(stringView);
|
||||
|
||||
stringView = new BStringView(position, "", "By Vincent Duvert");
|
||||
stringView->ResizeToPreferred();
|
||||
position.top += stringView->Frame().Height();
|
||||
view->AddChild(stringView);
|
||||
BPrivate::BuildScreenSaverDefaultSettingsView(view, "Icons",
|
||||
"by Vincent Duvert");
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
SubDir HAIKU_TOP src add-ons screen_savers icons ;
|
||||
|
||||
UseLibraryHeaders icon ;
|
||||
UsePrivateHeaders screen_saver ;
|
||||
# For BuildScreenSaverDefaultSettingsView
|
||||
|
||||
ScreenSaver Icons :
|
||||
IconDisplay.cpp IconsSaver.cpp :
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
SubDir HAIKU_TOP src add-ons screen_savers message ;
|
||||
|
||||
UsePrivateHeaders screen_saver ;
|
||||
# For BuildScreenSaverDefaultSettingsView
|
||||
UsePrivateHeaders shared ;
|
||||
# For ObjectList
|
||||
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <Bitmap.h>
|
||||
#include <Font.h>
|
||||
#include <ObjectList.h>
|
||||
@@ -14,12 +18,10 @@
|
||||
#include <Screen.h>
|
||||
#include <ScreenSaver.h>
|
||||
#include <String.h>
|
||||
#include <StringView.h>
|
||||
#include <TextView.h>
|
||||
#include <View.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||
|
||||
// Double brackets to satisfy a compiler warning
|
||||
const pattern kCheckered = { { 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33 } };
|
||||
@@ -123,8 +125,8 @@ Message::~Message()
|
||||
void
|
||||
Message::StartConfig(BView *view)
|
||||
{
|
||||
view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "Message, by Ryan Leavengood"));
|
||||
view->AddChild(new BStringView(BRect(20, 40, 200, 65), "", "Inspired by Jon Watte's Original"));
|
||||
BPrivate::BuildScreenSaverDefaultSettingsView(view, "Message",
|
||||
"by Ryan Leavengood");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user