aboutsummaryrefslogtreecommitdiff
path: root/simple-visualization/qmpkeyboardwindow.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2019-11-07 01:20:03 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2019-11-07 01:20:03 +0800
commit048e57b723c946d96aca260e26ba60dd380fde90 (patch)
treef8fe6d361e33235d81248105a63fc568b7c956d8 /simple-visualization/qmpkeyboardwindow.cpp
parentb2ef363f49db70219ac1eaebb7d69dcdade8d60b (diff)
downloadQMidiPlayer-048e57b723c946d96aca260e26ba60dd380fde90.tar.xz
Colorful keyboards.
Diffstat (limited to 'simple-visualization/qmpkeyboardwindow.cpp')
-rw-r--r--simple-visualization/qmpkeyboardwindow.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/simple-visualization/qmpkeyboardwindow.cpp b/simple-visualization/qmpkeyboardwindow.cpp
index 8fe0e6f..91b7a61 100644
--- a/simple-visualization/qmpkeyboardwindow.cpp
+++ b/simple-visualization/qmpkeyboardwindow.cpp
@@ -16,6 +16,10 @@ qmpKeyboardWindow::qmpKeyboardWindow(qmpPluginAPI *_api,QWidget *parent):
grid->addWidget(lb[ch]=new QLabel,ch,0);
grid->addWidget(pw[ch]=new qmpPianoWidget(this),ch,1);
pw[ch]->setSizePolicy(QSizePolicy::Policy::Expanding,QSizePolicy::Policy::Preferred);
+ QPalette p=palette();
+ p.setColor(QPalette::ColorRole::Highlight,api->getOptionUint("Keyboard/acolor"+std::to_string(ch)));
+ p.setColor(QPalette::ColorRole::Base,api->getOptionUint("Keyboard/bcolor"+std::to_string(ch)));
+ pw[ch]->setPalette(p);
}
hide();
eh=api->registerEventHandler(