Add drawing cursor images for wxCursorProperty under wxGTK.
Closes #16637 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,7 +69,7 @@
|
|||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__)
|
||||||
#define wxPG_CAN_DRAW_CURSOR 1
|
#define wxPG_CAN_DRAW_CURSOR 1
|
||||||
#elif defined(__WXGTK__)
|
#elif defined(__WXGTK__)
|
||||||
#define wxPG_CAN_DRAW_CURSOR 0
|
#define wxPG_CAN_DRAW_CURSOR 1
|
||||||
#elif defined(__WXMAC__)
|
#elif defined(__WXMAC__)
|
||||||
#define wxPG_CAN_DRAW_CURSOR 0
|
#define wxPG_CAN_DRAW_CURSOR 0
|
||||||
#else
|
#else
|
||||||
@@ -1816,7 +1816,15 @@ void wxCursorProperty::OnCustomPaint( wxDC& dc,
|
|||||||
|
|
||||||
wxCursor cursor( cursorIndex );
|
wxCursor cursor( cursorIndex );
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#if defined(__WXGTK__)
|
||||||
|
wxBitmap bmp(cursor);
|
||||||
|
if ( bmp.IsOk() )
|
||||||
|
{
|
||||||
|
dc.DrawBitmap(bmp, rect.GetTopLeft());
|
||||||
|
}
|
||||||
|
#elif defined(__WXMSW__)
|
||||||
|
// We have to use native API because monochrome bitmaps
|
||||||
|
// are not fully supported under MSW.
|
||||||
HDC hDc = (HDC)((const wxMSWDCImpl *)dc.GetImpl())->GetHDC();
|
HDC hDc = (HDC)((const wxMSWDCImpl *)dc.GetImpl())->GetHDC();
|
||||||
::DrawIconEx( hDc,
|
::DrawIconEx( hDc,
|
||||||
rect.x,
|
rect.x,
|
||||||
|
Reference in New Issue
Block a user