mirror of
				https://github.com/SoftFever/OrcaSlicer.git
				synced 2025-10-31 12:41:20 -06:00 
			
		
		
		
	FIX: [STUDIO-2364] use generic render for item selection
Change-Id: Iebda6269b736e25802798fcc128230d4bb87c760
This commit is contained in:
		
							parent
							
								
									aebbe807f2
								
							
						
					
					
						commit
						8be8f20f75
					
				
					 1 changed files with 14 additions and 0 deletions
				
			
		|  | @ -34,6 +34,7 @@ | |||
| 
 | ||||
| #ifdef __WXMSW__ | ||||
| #include "wx/uiaction.h" | ||||
| #include <wx/renderer.h> | ||||
| #endif /* __WXMSW__ */ | ||||
| 
 | ||||
| namespace Slic3r | ||||
|  | @ -73,6 +74,17 @@ static void take_snapshot(const std::string& 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) : | ||||
|     wxDataViewCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE) | ||||
| { | ||||
|  | @ -80,6 +92,8 @@ ObjectList::ObjectList(wxWindow* parent) : | |||
|     SetFont(Label::sysFont(13)); | ||||
| #ifdef __WXMSW__ | ||||
|     GenericGetHeader()->SetFont(Label::sysFont(13)); | ||||
|     static auto render = new wxRenderer; | ||||
|     wxRendererNative::Set(render); | ||||
| #endif | ||||
| 
 | ||||
|     // create control
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 chunmao.guo
						chunmao.guo