Applied patch by Alexander Deckner (with a few small changes by myself):
Implemented palette mode and fixed bugs listed at ticket #1701. Thanks for your work! git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23671 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -87,16 +87,26 @@ class BColorControl : public BControl {
|
||||
float size, bool useOffscreen,
|
||||
BMessage* archive = NULL);
|
||||
void _LayoutView();
|
||||
void _UpdateOffscreen(BRect update);
|
||||
void _InitOffscreen();
|
||||
void _DrawColorArea(BView* target, BRect update);
|
||||
void _DrawSelectors(BView* target);
|
||||
void _ColorRamp(BRect rect, BView* target,
|
||||
rgb_color baseColor, int16 flag,
|
||||
bool focused);
|
||||
|
||||
bool focused, BRect update);
|
||||
BPoint _SelectorPosition(const BRect& rampRect, uint8 shade) const;
|
||||
BRect _PaletteSelectorFrame(uint8 colorIndex) const;
|
||||
BRect _RampFrame(uint8 rampIndex) const;
|
||||
|
||||
private:
|
||||
BRect fPaletteFrame;
|
||||
int16 fSelectedPaletteColorIndex;
|
||||
int16 fPreviousSelectedPaletteColorIndex;
|
||||
|
||||
float fCellSize;
|
||||
int32 fRows;
|
||||
int32 fColumns;
|
||||
bool fPaletteMode;
|
||||
bool _unused[3];
|
||||
|
||||
BTextControl* fRedText;
|
||||
BTextControl* fGreenText;
|
||||
@@ -105,8 +115,8 @@ class BColorControl : public BControl {
|
||||
BBitmap* fBitmap;
|
||||
BView* fOffscreenView;
|
||||
|
||||
int32 fFocusedComponent;
|
||||
uint32 _reserved[8];
|
||||
int32 fFocusedComponent;
|
||||
uint32 _reserved[2];
|
||||
};
|
||||
|
||||
inline void
|
||||
|
||||
Reference in New Issue
Block a user