Try to use PrusaIconTextRenderer(CustomRenderer) for IconText Rendering

+ experiments with button's color
+ removed "strange control part" from topLeft corner of the right panel
This commit is contained in:
YuSanka 2018-09-11 09:51:56 +02:00
parent 9c433f8e08
commit e3bb829e42
5 changed files with 81 additions and 11 deletions

View file

@ -415,6 +415,29 @@ public:
};
// ----------------------------------------------------------------------------
// PrusaIconTextRenderer
// ----------------------------------------------------------------------------
class PrusaIconTextRenderer : public wxDataViewCustomRenderer
{
public:
PrusaIconTextRenderer( const wxString &varianttype = wxT("PrusaDataViewIconText"),
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int align = wxDVR_DEFAULT_ALIGNMENT) {}
bool SetValue(const wxVariant &value);
bool GetValue(wxVariant &value) const;
virtual bool Render(wxRect cell, wxDC *dc, int state);
virtual wxSize GetSize() const;
virtual bool HasEditorCtrl() const { return false; }
private:
wxDataViewIconText m_value;
};
// ----------------------------------------------------------------------------
// MyCustomRenderer