Added bitmaps for the horizontal and vertical thumbs.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11244 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -8,6 +8,41 @@
|
|||||||
#include <Debug.h>
|
#include <Debug.h>
|
||||||
#include <PropertyInfo.h>
|
#include <PropertyInfo.h>
|
||||||
|
|
||||||
|
const static unsigned char
|
||||||
|
kVerticalKnobData[] = {
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0xcb, 0xcb, 0xcb, 0xcb, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0xff
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
const static unsigned char
|
||||||
|
kHorizontalKnobData[] = {
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0xff, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0xcb, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0x00, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x3f, 0x00, 0x12, 0xff,
|
||||||
|
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x12, 0xff,
|
||||||
|
0xff, 0xff, 0xff, 0xff, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0xff, 0xff
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
static property_info
|
static property_info
|
||||||
sPropertyInfo[] = {
|
sPropertyInfo[] = {
|
||||||
@@ -173,6 +208,7 @@ BChannelSlider::Draw(BRect updateRect)
|
|||||||
void
|
void
|
||||||
BChannelSlider::MouseDown(BPoint where)
|
BChannelSlider::MouseDown(BPoint where)
|
||||||
{
|
{
|
||||||
|
// TODO: Implement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -326,10 +362,22 @@ BChannelSlider::DrawThumb(BView *into, int32 channel, BPoint where, bool pressed
|
|||||||
const BBitmap *
|
const BBitmap *
|
||||||
BChannelSlider::ThumbFor(int32 channel, bool pressed)
|
BChannelSlider::ThumbFor(int32 channel, bool pressed)
|
||||||
{
|
{
|
||||||
return NULL;
|
// TODO: Finish me
|
||||||
|
if (fLeftKnob == NULL) {
|
||||||
|
if (Vertical()) {
|
||||||
|
fLeftKnob = new BBitmap(BRect(0, 0, 11, 14), B_CMAP8);
|
||||||
|
fLeftKnob->SetBits(kVerticalKnobData, sizeof(kVerticalKnobData), 0, B_CMAP8);
|
||||||
|
} else {
|
||||||
|
fLeftKnob = new BBitmap(BRect(0, 0, 14, 10), B_CMAP8);
|
||||||
|
fLeftKnob->SetBits(kHorizontalKnobData, sizeof(kHorizontalKnobData), 0, B_CMAP8);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return fLeftKnob;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BRect
|
BRect
|
||||||
BChannelSlider::ThumbFrameFor(int32 channel)
|
BChannelSlider::ThumbFrameFor(int32 channel)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user