From 58a7b112e1823bcef4743878b9ff1da28c7384c8 Mon Sep 17 00:00:00 2001 From: harukalover Date: Wed, 1 Jul 2009 03:16:47 +0000 Subject: [PATCH] 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. --- aegisub/src/dialog_colorpicker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/dialog_colorpicker.cpp b/aegisub/src/dialog_colorpicker.cpp index aa2759f2f..dc30685f4 100644 --- a/aegisub/src/dialog_colorpicker.cpp +++ b/aegisub/src/dialog_colorpicker.cpp @@ -548,10 +548,12 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color) recent_box = new ColorPickerRecent(this, SELECTOR_RECENT, 8, 4, 16); +#ifdef __WXMSW__ eyedropper_bitmap = wxBITMAP(eyedropper_tool); 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 = new ColorPickerScreenDropper(this, SELECTOR_DROPPER_PICK, 7, 7, 8, false); +#endif // Arrange the controls in a nice way wxSizer *spectop_sizer = new wxBoxSizer(wxHORIZONTAL); @@ -661,11 +663,13 @@ DialogColorPicker::DialogColorPicker(wxWindow *parent, wxColour initial_color) SetColor(initial_color); recent_box->LoadFromString(Options.AsText(_T("Color Picker Recent"))); +#ifdef __WXMSW__ // The mouse event handler for the Dropper control must be manually assigned // 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_LEFT_DOWN, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this); screen_dropper_icon->Connect(wxEVT_LEFT_UP, wxMouseEventHandler(DialogColorPicker::OnDropperMouse), 0, this); +#endif }