FIX: [STUDIO-2364] use generic render for item selection
Change-Id: Iebda6269b736e25802798fcc128230d4bb87c760
This commit is contained in:
parent
aebbe807f2
commit
8be8f20f75
|
@ -34,6 +34,7 @@
|
||||||
|
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
#include "wx/uiaction.h"
|
#include "wx/uiaction.h"
|
||||||
|
#include <wx/renderer.h>
|
||||||
#endif /* __WXMSW__ */
|
#endif /* __WXMSW__ */
|
||||||
|
|
||||||
namespace Slic3r
|
namespace Slic3r
|
||||||
|
@ -73,6 +74,17 @@ static void take_snapshot(const std::string& snapshot_name)
|
||||||
plater->take_snapshot(snapshot_name);
|
plater->take_snapshot(snapshot_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class wxRenderer : public wxDelegateRendererNative
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
wxRenderer() : wxDelegateRendererNative(wxRendererNative::Get()) {}
|
||||||
|
virtual void DrawItemSelectionRect(wxWindow *win,
|
||||||
|
wxDC& dc,
|
||||||
|
const wxRect& rect,
|
||||||
|
int flags = 0) wxOVERRIDE
|
||||||
|
{ GetGeneric().DrawItemSelectionRect(win, dc, rect, flags); }
|
||||||
|
};
|
||||||
|
|
||||||
ObjectList::ObjectList(wxWindow* parent) :
|
ObjectList::ObjectList(wxWindow* parent) :
|
||||||
wxDataViewCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE)
|
wxDataViewCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +92,8 @@ ObjectList::ObjectList(wxWindow* parent) :
|
||||||
SetFont(Label::sysFont(13));
|
SetFont(Label::sysFont(13));
|
||||||
#ifdef __WXMSW__
|
#ifdef __WXMSW__
|
||||||
GenericGetHeader()->SetFont(Label::sysFont(13));
|
GenericGetHeader()->SetFont(Label::sysFont(13));
|
||||||
|
static auto render = new wxRenderer;
|
||||||
|
wxRendererNative::Set(render);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// create control
|
// create control
|
||||||
|
|
Loading…
Reference in New Issue