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 ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
|
UsePrivateHeaders screen_saver ;
|
||||||
|
# For BuildScreenSaverDefaultSettingsView
|
||||||
|
|
||||||
Addon Haiku :
|
Addon Haiku :
|
||||||
ScreenSaver.cpp
|
ScreenSaver.cpp
|
||||||
: be screensaver $(TARGET_LIBSUPC++)
|
: be screensaver $(TARGET_LIBSUPC++)
|
||||||
;
|
;
|
||||||
|
|
||||||
Package haiku-screensaverkit-cvs :
|
|
||||||
Haiku :
|
|
||||||
boot home config add-ons Screen\ Savers
|
|
||||||
;
|
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
#include <Font.h>
|
#include <Font.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||||
|
|
||||||
|
|
||||||
class ScreenSaver : public BScreenSaver
|
class ScreenSaver : public BScreenSaver
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -52,7 +55,8 @@ ScreenSaver::ScreenSaver(BMessage *archive, image_id id)
|
|||||||
void
|
void
|
||||||
ScreenSaver::StartConfig(BView *view)
|
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 <MimeType.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
|
|
||||||
|
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||||
|
|
||||||
#include "IconDisplay.h"
|
#include "IconDisplay.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -183,21 +185,7 @@ IconsSaver::Draw(BView *view, int32 frame)
|
|||||||
void
|
void
|
||||||
IconsSaver::StartConfig(BView* view)
|
IconsSaver::StartConfig(BView* view)
|
||||||
{
|
{
|
||||||
const uint8 spacer = 5;
|
BPrivate::BuildScreenSaverDefaultSettingsView(view, "Icons",
|
||||||
BRect frame = view->Frame();
|
"by Vincent Duvert");
|
||||||
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);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
SubDir HAIKU_TOP src add-ons screen_savers icons ;
|
SubDir HAIKU_TOP src add-ons screen_savers icons ;
|
||||||
|
|
||||||
UseLibraryHeaders icon ;
|
UseLibraryHeaders icon ;
|
||||||
|
UsePrivateHeaders screen_saver ;
|
||||||
|
# For BuildScreenSaverDefaultSettingsView
|
||||||
|
|
||||||
ScreenSaver Icons :
|
ScreenSaver Icons :
|
||||||
IconDisplay.cpp IconsSaver.cpp :
|
IconDisplay.cpp IconsSaver.cpp :
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
SubDir HAIKU_TOP src add-ons screen_savers message ;
|
SubDir HAIKU_TOP src add-ons screen_savers message ;
|
||||||
|
|
||||||
|
UsePrivateHeaders screen_saver ;
|
||||||
|
# For BuildScreenSaverDefaultSettingsView
|
||||||
UsePrivateHeaders shared ;
|
UsePrivateHeaders shared ;
|
||||||
# For ObjectList
|
# For ObjectList
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#include <Bitmap.h>
|
#include <Bitmap.h>
|
||||||
#include <Font.h>
|
#include <Font.h>
|
||||||
#include <ObjectList.h>
|
#include <ObjectList.h>
|
||||||
@@ -14,12 +18,10 @@
|
|||||||
#include <Screen.h>
|
#include <Screen.h>
|
||||||
#include <ScreenSaver.h>
|
#include <ScreenSaver.h>
|
||||||
#include <String.h>
|
#include <String.h>
|
||||||
#include <StringView.h>
|
#include <TextView.h>
|
||||||
#include <View.h>
|
#include <View.h>
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <BuildScreenSaverDefaultSettingsView.h>
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
// Double brackets to satisfy a compiler warning
|
// Double brackets to satisfy a compiler warning
|
||||||
const pattern kCheckered = { { 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33 } };
|
const pattern kCheckered = { { 0xcc, 0xcc, 0x33, 0x33, 0xcc, 0xcc, 0x33, 0x33 } };
|
||||||
@@ -123,8 +125,8 @@ Message::~Message()
|
|||||||
void
|
void
|
||||||
Message::StartConfig(BView *view)
|
Message::StartConfig(BView *view)
|
||||||
{
|
{
|
||||||
view->AddChild(new BStringView(BRect(20, 10, 200, 35), "", "Message, by Ryan Leavengood"));
|
BPrivate::BuildScreenSaverDefaultSettingsView(view, "Message",
|
||||||
view->AddChild(new BStringView(BRect(20, 40, 200, 65), "", "Inspired by Jon Watte's Original"));
|
"by Ryan Leavengood");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user