Store canvas attributes in the canvas itself in the dialogs sample.
Simplify the code by not transferring font and colours between canvas and wxTheApp but use canvas font and colours directly instead. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62265 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -117,9 +117,6 @@ class MyApp: public wxApp
|
||||
public:
|
||||
virtual bool OnInit();
|
||||
|
||||
wxFont m_canvasFont;
|
||||
wxColour m_canvasTextColour;
|
||||
|
||||
protected:
|
||||
#if wxUSE_LOG
|
||||
virtual wxAppTraits *CreateTraits() { return new MyAppTraits; }
|
||||
@@ -434,7 +431,9 @@ class MyCanvas: public wxScrolledWindow
|
||||
public:
|
||||
MyCanvas(wxWindow *parent) : wxScrolledWindow(parent, wxID_ANY)
|
||||
{
|
||||
SetForegroundColour(*wxBLACK);
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
SetFont(*wxNORMAL_FONT);
|
||||
}
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user