Fixed removal of the color dropper tool on non-Windows platforms (it was still appearing, though misaligned in the color picker). updates #861

Originally committed to SVN as r3092.
This commit is contained in:
harukalover 2009-07-01 03:16:47 +00:00
parent 1c630e60cf
commit 49423c613e
1 changed files with 4 additions and 0 deletions

View File

@ -548,10 +548,12 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color)
recent_box = new ColorPickerRecent(this, SELECTOR_RECENT, 8, 4, 16); recent_box = new ColorPickerRecent(this, SELECTOR_RECENT, 8, 4, 16);
#ifdef __WXMSW__
eyedropper_bitmap = wxBITMAP(eyedropper_tool); eyedropper_bitmap = wxBITMAP(eyedropper_tool);
eyedropper_bitmap.SetMask(new wxMask(eyedropper_bitmap, wxColour(255, 0, 255))); eyedropper_bitmap.SetMask(new wxMask(eyedropper_bitmap, wxColour(255, 0, 255)));
screen_dropper_icon = new wxStaticBitmap(this, SELECTOR_DROPPER, eyedropper_bitmap, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER); screen_dropper_icon = new wxStaticBitmap(this, SELECTOR_DROPPER, eyedropper_bitmap, wxDefaultPosition, wxDefaultSize, wxRAISED_BORDER);
screen_dropper = new ColorPickerScreenDropper(this, SELECTOR_DROPPER_PICK, 7, 7, 8, false); screen_dropper = new ColorPickerScreenDropper(this, SELECTOR_DROPPER_PICK, 7, 7, 8, false);
#endif
// Arrange the controls in a nice way // Arrange the controls in a nice way
wxSizer *spectop_sizer = new wxBoxSizer(wxHORIZONTAL); wxSizer *spectop_sizer = new wxBoxSizer(wxHORIZONTAL);
@ -661,11 +663,13 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color)
SetColor(initial_color); SetColor(initial_color);
recent_box->LoadFromString(Options.AsText(_T("Color Picker Recent"))); recent_box->LoadFromString(Options.AsText(_T("Color Picker Recent")));
#ifdef __WXMSW__
// The mouse event handler for the Dropper control must be manually assigned // The mouse event handler for the Dropper control must be manually assigned
// The EVT_MOUSE_EVENTS macro can't take a control id // The EVT_MOUSE_EVENTS macro can't take a control id
screen_dropper_icon->Connect(wxEVT_MOTION, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this); screen_dropper_icon->Connect(wxEVT_MOTION, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this);
screen_dropper_icon->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this); screen_dropper_icon->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this);
screen_dropper_icon->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this); screen_dropper_icon->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this);
#endif
} }