Apply theme to bookmark panel, implement RGBA4f->wxColour operator

This commit is contained in:
Charles J. Cliffe
2016-09-29 21:57:23 -04:00
parent 003758b799
commit 560caccbc7
8 changed files with 51 additions and 28 deletions
+3 -3
View File
@@ -62,13 +62,13 @@ BookmarkPanel::BookmarkPanel( wxWindow* parent, wxWindowID id, const wxPoint& po
bSizer1->Add( m_propPanel, 1, wxBOTTOM|wxEXPAND|wxTOP, 5 );
m_bookmarkButton = new wxButton( this, wxID_ANY, wxT("Bookmark"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer1->Add( m_bookmarkButton, 0, wxALL|wxEXPAND, 5 );
bSizer1->Add( m_bookmarkButton, 0, wxEXPAND, 5 );
m_activateButton = new wxButton( this, wxID_ANY, wxT("Activate"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer1->Add( m_activateButton, 0, wxALL|wxEXPAND, 5 );
bSizer1->Add( m_activateButton, 0, wxEXPAND, 5 );
m_removeButton = new wxButton( this, wxID_ANY, wxT("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
bSizer1->Add( m_removeButton, 0, wxALL|wxEXPAND, 5 );
bSizer1->Add( m_removeButton, 0, wxEXPAND, 5 );
this->SetSizer( bSizer1 );
+3 -3
View File
@@ -952,7 +952,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -1040,7 +1040,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
@@ -1128,7 +1128,7 @@
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="wxButton" expanded="1">
<property name="BottomDockable">1</property>
+26 -1
View File
@@ -20,6 +20,32 @@ void BookmarkView::onUpdateTimer( wxTimerEvent& event ) {
}
}
void BookmarkView::updateTheme() {
wxColour bgColor(ThemeMgr::mgr.currentTheme->generalBackground);
wxColour textColor(ThemeMgr::mgr.currentTheme->text);
wxColour btn(ThemeMgr::mgr.currentTheme->button);
wxColour btnHl(ThemeMgr::mgr.currentTheme->buttonHighlight);
m_treeView->SetBackgroundColour(bgColor);
m_treeView->SetForegroundColour(textColor);
m_propPanel->SetBackgroundColour(bgColor);
m_propPanel->SetForegroundColour(textColor);
m_labelLabel->SetForegroundColour(textColor);
m_frequencyVal->SetForegroundColour(textColor);
m_frequencyLabel->SetForegroundColour(textColor);
m_bandwidthVal->SetForegroundColour(textColor);
m_bandwidthLabel->SetForegroundColour(textColor);
m_modulationVal->SetForegroundColour(textColor);
m_modulationLabel->SetForegroundColour(textColor);
m_bookmarkButton->SetBackgroundColour(bgColor);
m_removeButton->SetBackgroundColour(bgColor);
m_activateButton->SetBackgroundColour(bgColor);
}
void BookmarkView::updateActiveList() {
doUpdateActive = true;
}
@@ -53,7 +79,6 @@ void BookmarkView::doUpdateActiveList() {
m_treeView->Enable();
m_treeView->ExpandAll();
}
void BookmarkView::onTreeBeginLabelEdit( wxTreeEvent& event ) {
+1
View File
@@ -10,6 +10,7 @@ public:
void updateActiveList();
void activeSelection(DemodulatorInstance *dsel);
void updateTheme();
protected: