diff options
author | Chris Xiong <chirs241097@gmail.com> | 2019-11-07 01:20:03 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2019-11-07 01:20:03 +0800 |
commit | 048e57b723c946d96aca260e26ba60dd380fde90 (patch) | |
tree | f8fe6d361e33235d81248105a63fc568b7c956d8 /simple-visualization/qmpkeyboardwindow.cpp | |
parent | b2ef363f49db70219ac1eaebb7d69dcdade8d60b (diff) | |
download | QMidiPlayer-048e57b723c946d96aca260e26ba60dd380fde90.tar.xz |
Colorful keyboards.
Diffstat (limited to 'simple-visualization/qmpkeyboardwindow.cpp')
-rw-r--r-- | simple-visualization/qmpkeyboardwindow.cpp | 4 |
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( |