Updates by Jerome Duval
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2323 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -52,6 +52,45 @@
|
|||||||
|
|
||||||
void SetRGBColor(rgb_color *col,uint8 r, uint8 g, uint8 b, uint8 a=255);
|
void SetRGBColor(rgb_color *col,uint8 r, uint8 g, uint8 b, uint8 a=255);
|
||||||
|
|
||||||
|
uint8 hand_cursor_data[68] =
|
||||||
|
{
|
||||||
|
16,1,2,2,
|
||||||
|
|
||||||
|
0,0, // 0000000000000000
|
||||||
|
7,128, // 0000011110000000
|
||||||
|
61,112, // 0011110101110000
|
||||||
|
37,40, // 0010010100101000
|
||||||
|
36,168, // 0010010010101000
|
||||||
|
18,148, // 0001001010010100
|
||||||
|
18,84, // 0001001001010100
|
||||||
|
9,42, // 0000100100101010
|
||||||
|
8,1, // 0000100000000001
|
||||||
|
60,1, // 0011110000000001
|
||||||
|
76,1, // 0100110000000001
|
||||||
|
66,1, // 0100001000000001
|
||||||
|
48,1, // 0011000000000001
|
||||||
|
12,1, // 0000110000000001
|
||||||
|
2,0, // 0000001000000000
|
||||||
|
1,0, // 0000000100000000
|
||||||
|
|
||||||
|
0,0, // 0000000000000000
|
||||||
|
7,128, // 0000011110000000
|
||||||
|
63,240, // 0011111111110000
|
||||||
|
63,248, // 0011111111111000
|
||||||
|
63,248, // 0011111111111000
|
||||||
|
31,252, // 0001111111111100
|
||||||
|
31,252, // 0001111111111100
|
||||||
|
15,254, // 0000111111111110
|
||||||
|
15,255, // 0000111111111111
|
||||||
|
63,255, // 0011111111111111
|
||||||
|
127,255, // 0111111111111111
|
||||||
|
127,255, // 0111111111111111
|
||||||
|
63,255, // 0011111111111111
|
||||||
|
15,255, // 0000111111111111
|
||||||
|
3,254, // 0000001111111110
|
||||||
|
1,248 // 0000000111111000
|
||||||
|
};
|
||||||
|
|
||||||
BGView::BGView(BRect frame, const char *name, int32 resize, int32 flags)
|
BGView::BGView(BRect frame, const char *name, int32 resize, int32 flags)
|
||||||
:BView(frame,name,resize,flags),
|
:BView(frame,name,resize,flags),
|
||||||
fCurrent(NULL),
|
fCurrent(NULL),
|
||||||
@@ -807,7 +846,8 @@ BGView::UpdatePreview()
|
|||||||
fPreView->fImageBounds = BRect(bitmap->Bounds());
|
fPreView->fImageBounds = BRect(bitmap->Bounds());
|
||||||
fCurrent->Show(info, fPreView);
|
fCurrent->Show(info, fPreView);
|
||||||
}
|
}
|
||||||
}
|
} else
|
||||||
|
fPreView->SetEnabled(false);
|
||||||
fPreView->SetViewColor(fPicker->ValueAsColor());
|
fPreView->SetViewColor(fPicker->ValueAsColor());
|
||||||
fPreView->Invalidate();
|
fPreView->Invalidate();
|
||||||
}
|
}
|
||||||
@@ -1018,7 +1058,8 @@ BGView::AddItem(BGImageMenuItem *item)
|
|||||||
|
|
||||||
|
|
||||||
PreView::PreView(BRect frame, const char *name, int32 resize, int32 flags)
|
PreView::PreView(BRect frame, const char *name, int32 resize, int32 flags)
|
||||||
:BControl(frame,name,NULL, NULL, resize,flags)
|
:BControl(frame,name,NULL, NULL, resize,flags),
|
||||||
|
fMoveHandCursor(hand_cursor_data)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1062,7 +1103,9 @@ PreView::MouseUp(BPoint point)
|
|||||||
void
|
void
|
||||||
PreView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
PreView::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
|
||||||
{
|
{
|
||||||
if(IsEnabled())
|
if(IsEnabled())
|
||||||
|
SetViewCursor(&fMoveHandCursor);
|
||||||
|
else
|
||||||
SetViewCursor(B_CURSOR_SYSTEM_DEFAULT);
|
SetViewCursor(B_CURSOR_SYSTEM_DEFAULT);
|
||||||
if(IsTracking())
|
if(IsTracking())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -29,6 +29,7 @@
|
|||||||
#include <Picture.h>
|
#include <Picture.h>
|
||||||
#include <FilePanel.h>
|
#include <FilePanel.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
|
#include <Cursor.h>
|
||||||
#include "BackgroundImage.h"
|
#include "BackgroundImage.h"
|
||||||
|
|
||||||
#define SETTINGS_FILE "Backgrounds_settings"
|
#define SETTINGS_FILE "Backgrounds_settings"
|
||||||
@@ -84,6 +85,7 @@ class PreView : public BControl {
|
|||||||
PreView(BRect frame, const char *name, int32 resize, int32 flags);
|
PreView(BRect frame, const char *name, int32 resize, int32 flags);
|
||||||
BPoint fPoint;
|
BPoint fPoint;
|
||||||
BRect fImageBounds;
|
BRect fImageBounds;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void MouseDown(BPoint point);
|
void MouseDown(BPoint point);
|
||||||
void MouseUp(BPoint point);
|
void MouseUp(BPoint point);
|
||||||
@@ -93,6 +95,8 @@ class PreView : public BControl {
|
|||||||
BPoint fOldPoint;
|
BPoint fOldPoint;
|
||||||
float x_ratio,y_ratio;
|
float x_ratio,y_ratio;
|
||||||
display_mode mode;
|
display_mode mode;
|
||||||
|
|
||||||
|
BCursor fMoveHandCursor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user