ColorListView: Handle color dropped on unselected
Remove shared message handling from ColorListView, you are expected to implement this yourself and these message constants were not actually being used by the message target. Do color drop handling in Appearance and Terminal. Handle all color drops in WasDropped(). Allow current selection to remain, only update color. TODO Changing selection on external drops should be fixed in BListView. Work-around in BColorListView. Fixes #19562 Change-Id: Ic99bbb1288fd736778eac831d38e453122815abc Reviewed-on: https://review.haiku-os.org/c/haiku/+/9296 Reviewed-by: John Scipione <[email protected]> Tested-by: Commit checker robot <[email protected]> Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
@@ -18,19 +18,13 @@ namespace BPrivate {
|
||||
|
||||
class BColorListView : public BListView {
|
||||
public:
|
||||
enum {
|
||||
B_MESSAGE_SET_CURRENT_COLOR = 'sccl',
|
||||
B_MESSAGE_SET_COLOR = 'sclr'
|
||||
};
|
||||
|
||||
BColorListView(const char* name,
|
||||
list_view_type type = B_SINGLE_SELECTION_LIST,
|
||||
uint32 flags = B_WILL_DRAW | B_FRAME_EVENTS | B_NAVIGABLE);
|
||||
virtual ~BColorListView();
|
||||
|
||||
virtual bool InitiateDrag(BPoint where, int32 index,
|
||||
bool wasSelected);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual bool InitiateDrag(BPoint where, int32 index, bool wasSelected);
|
||||
virtual void MouseUp(BPoint where);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user