@@ -43,32 +43,32 @@ GreekSidebar::GreekSidebar(wxWindow *parent,
43
43
: wxScrolled<wxPanel>(parent, ID), m_configuration(configuration),
44
44
m_lowercaseSizer(new Buttonwrapsizer(wxHORIZONTAL)),
45
45
m_uppercaseSizer(new Buttonwrapsizer(wxHORIZONTAL)), m_worksheet(worksheet) {
46
+ m_lowerCasePanel = new wxPanel (this );
47
+ m_upperCasePanel = new wxPanel (this );
46
48
wxBoxSizer *vbox = new wxBoxSizer (wxVERTICAL);
47
49
ShowScrollbars (wxSHOW_SB_NEVER, wxSHOW_SB_DEFAULT);
48
50
EnableScrolling (false , true );
49
51
SetScrollRate (5 , 5 );
50
52
UpdateSymbols ();
51
53
52
- wxPanel *lowerCasePanel = new wxPanel (this );
53
- lowerCasePanel->SetSizer (m_lowercaseSizer);
54
- wxPanel *upperCasePanel = new wxPanel (this );
55
- upperCasePanel->SetSizer (m_uppercaseSizer);
54
+ m_lowerCasePanel->SetSizer (m_lowercaseSizer);
55
+ m_upperCasePanel->SetSizer (m_uppercaseSizer);
56
56
57
57
Connect (wxEVT_SIZE, wxSizeEventHandler (GreekSidebar::OnSize),
58
58
NULL , this );
59
59
Connect (wxEVT_MENU,
60
60
wxCommandEventHandler (GreekSidebar::OnMenu), NULL , this );
61
- lowerCasePanel ->Connect (wxEVT_MENU,
61
+ m_lowerCasePanel ->Connect (wxEVT_MENU,
62
62
wxCommandEventHandler (GreekSidebar::OnMenu), NULL , this );
63
- upperCasePanel ->Connect (wxEVT_MENU,
63
+ m_upperCasePanel ->Connect (wxEVT_MENU,
64
64
wxCommandEventHandler (GreekSidebar::OnMenu), NULL , this );
65
65
Connect (wxEVT_RIGHT_DOWN,
66
66
wxMouseEventHandler (GreekSidebar::OnMouseRightDown), NULL , this );
67
67
GetTargetWindow ()->Connect (wxEVT_MENU,
68
68
wxCommandEventHandler (GreekSidebar::OnMenu), NULL ,
69
69
this );
70
- vbox->Add (lowerCasePanel , wxSizerFlags ().Expand ());
71
- vbox->Add (upperCasePanel , wxSizerFlags ().Expand ());
70
+ vbox->Add (m_lowerCasePanel , wxSizerFlags ().Expand ());
71
+ vbox->Add (m_upperCasePanel , wxSizerFlags ().Expand ());
72
72
SetSizer (vbox);
73
73
FitInside ();
74
74
SetMinSize (wxSize (GetContentScaleFactor () * 50 , GetMinSize ().y ));
@@ -183,7 +183,7 @@ void GreekSidebar::UpdateSymbols() {
183
183
(def.condition == Cond::Show_mu && Show_mu) ||
184
184
(def.condition == Cond::ShowLatinLookalikes && ShowLatinLookalikes))
185
185
{
186
- CharButton *button = new CharButton (this , m_worksheet, m_configuration, def);
186
+ CharButton *button = new CharButton (m_lowerCasePanel , m_worksheet, m_configuration, def);
187
187
m_lowercaseSizer->Add (button, wxSizerFlags ().Expand ());
188
188
button->Connect (wxEVT_RIGHT_DOWN,
189
189
wxMouseEventHandler (GreekSidebar::OnMouseRightDown), NULL , this );
@@ -202,7 +202,7 @@ void GreekSidebar::UpdateSymbols() {
202
202
(def.condition == Cond::Show_mu && Show_mu) ||
203
203
(def.condition == Cond::ShowLatinLookalikes && ShowLatinLookalikes))
204
204
{
205
- CharButton *button = new CharButton (this , m_worksheet, m_configuration, def);
205
+ CharButton *button = new CharButton (m_upperCasePanel , m_worksheet, m_configuration, def);
206
206
m_uppercaseSizer->Add (button, wxSizerFlags ().Expand ());
207
207
button->Connect (wxEVT_RIGHT_DOWN,
208
208
wxMouseEventHandler (GreekSidebar::OnMouseRightDown), NULL , this );
0 commit comments