mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2026-06-03 06:24:49 -04:00
Apply theme to bookmark panel, implement RGBA4f->wxColour operator
This commit is contained in:
@@ -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 );
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
@@ -10,6 +10,7 @@ public:
|
||||
|
||||
void updateActiveList();
|
||||
void activeSelection(DemodulatorInstance *dsel);
|
||||
void updateTheme();
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user