mirror of
https://github.com/cjcliffe/CubicSDR.git
synced 2024-11-08 01:56:05 -05:00
Update theme needs repaint; limit wxColour conversion
This commit is contained in:
parent
83cb2659ff
commit
1ec92e0d9e
@ -153,6 +153,8 @@ void BookmarkView::updateTheme() {
|
||||
m_treeView->SetForegroundColour(textColor);
|
||||
|
||||
m_propPanel->SetBackgroundColour(bgColor);
|
||||
m_buttonPanel->SetBackgroundColour(bgColor);
|
||||
|
||||
m_propPanel->SetForegroundColour(textColor);
|
||||
|
||||
m_labelLabel->SetForegroundColour(textColor);
|
||||
@ -163,7 +165,7 @@ void BookmarkView::updateTheme() {
|
||||
m_modulationVal->SetForegroundColour(textColor);
|
||||
m_modulationLabel->SetForegroundColour(textColor);
|
||||
|
||||
m_buttonPanel->SetBackgroundColour(bgColor);
|
||||
refreshLayout();
|
||||
}
|
||||
|
||||
|
||||
@ -653,6 +655,7 @@ void BookmarkView::showButtons() {
|
||||
void BookmarkView::refreshLayout() {
|
||||
GetSizer()->Layout();
|
||||
Update();
|
||||
Refresh();
|
||||
}
|
||||
|
||||
|
||||
|
@ -42,9 +42,9 @@ public:
|
||||
|
||||
operator wxColour() {
|
||||
return wxColour(
|
||||
(unsigned char) (r * 255.0),
|
||||
(unsigned char) (g * 255.0),
|
||||
(unsigned char) (b * 255.0));
|
||||
(unsigned char) std::min((r * 255.0), 255.0),
|
||||
(unsigned char) std::min((g * 255.0), 255.0),
|
||||
(unsigned char) std::min((b * 255.0), 255.0));
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user