wip: dark/light mode adaptation
This commit is contained in:
parent
0bf8b321ae
commit
13855c2e6f
10 changed files with 125 additions and 14 deletions
|
|
@ -1,7 +1,29 @@
|
|||
#include "qtclasses.h"
|
||||
#include "meterslider.h"
|
||||
|
||||
#define POLLING_RATE 2
|
||||
|
||||
bool DarkModeEventFilter::nativeEventFilter(const QByteArray &eventType, void *message, qintptr *) {
|
||||
if (eventType == "windows_generic_MSG") {
|
||||
ProcessedNativeEvent event = osh->processTopLevelWindowMessage(message);
|
||||
switch(event) {
|
||||
case LIGHT_MODE:
|
||||
StylingHelper::setBackgroundColor(osh->isLightMode());
|
||||
return true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
/*
|
||||
* if ([event type] == NSKeyDown) {
|
||||
* // Handle key event
|
||||
* qDebug() << QString::fromNSString([event characters]);
|
||||
* }
|
||||
*/
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
CustomWidgetEvent<T>::CustomWidgetEvent(QEvent::Type type, T payload) : QEvent(type){
|
||||
this->payload = payload;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue