Added new DarkMode style.
This commit is contained in:
@@ -140,10 +140,13 @@ void BCMainWindow::initMainWindow()
|
||||
|
||||
initStatusBar();
|
||||
|
||||
_connectButton->setDefaultAction( _connectAction);
|
||||
_syncButton->setDefaultAction( _syncAction);
|
||||
|
||||
// besser: model::emit dataChanged
|
||||
// also: emit dataChanged(index, index, {Qt::DisplayRole, Qt::EditRole, ValueRole});
|
||||
connect( _connectButton, &QToolButton::clicked, &_transmitter, &BCTransmitter::onToggleDriverConnection );
|
||||
connect( _syncButton, &QToolButton::clicked, this, &BCMainWindow::onSyncDeviceView );
|
||||
connect( _connectAction, &QAction::triggered, &_transmitter, &BCTransmitter::onToggleDriverConnection );
|
||||
connect( _syncAction, &QAction::triggered, this, &BCMainWindow::onSyncDeviceView );
|
||||
connect( _exitButton, &QToolButton::clicked, qApp, &QCoreApplication::quit );
|
||||
|
||||
connect( &_transmitter, &BCTransmitter::valueUpdated, this, &BCMainWindow::onValueUpdated );
|
||||
@@ -195,9 +198,9 @@ void BCMainWindow::initStatusBar()
|
||||
connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark)
|
||||
{
|
||||
|
||||
QString message = isDark ? "Dark Mode Activated" : "Light Mode Activated";
|
||||
QString message = isDark ? "DarkMode aktiviert" : "LightMode aktiviert";
|
||||
statusBar()->showMessage( message, 3000);
|
||||
setApplicationStyleSheet( isDark ? ":claude_dark_mode.qss"_L1 : ":claude_light_mode.qss"_L1 );
|
||||
setApplicationStyleSheet( isDark ? cDarkModeStyle : cLightModeStyle );
|
||||
});
|
||||
|
||||
// Wir starten im light mode
|
||||
@@ -205,7 +208,7 @@ void BCMainWindow::initStatusBar()
|
||||
|
||||
statBar->showMessage("Ready");
|
||||
|
||||
setApplicationStyleSheet(":bionxcontrol.qss"_L1);
|
||||
setApplicationStyleSheet(cLightModeStyle);
|
||||
|
||||
}
|
||||
|
||||
@@ -281,8 +284,7 @@ void BCMainWindow::onShowDevicePanel( BCDevice::ID deviceID )
|
||||
if( nxtPanel != _currentPanel )
|
||||
{
|
||||
_currentPanel = nxtPanel;
|
||||
qDebug() << " --- Firz: " << _currentPanel->property( BCKeyHeaderLabel );
|
||||
setHeaderLabel( _currentPanel->property( BCKeyHeaderLabel ).toString() );
|
||||
setHeaderLabel( _currentPanel->property( cBCKeyHeaderLabel ).toString() );
|
||||
_stackedWidget->setCurrentWidget( nxtPanel );
|
||||
|
||||
// knopf auch abschalten?
|
||||
|
||||
Reference in New Issue
Block a user