diff --git a/bcguihelpers.cpp b/bcguihelpers.cpp
index 72bd28a..e6f8b20 100644
--- a/bcguihelpers.cpp
+++ b/bcguihelpers.cpp
@@ -43,23 +43,25 @@ BCThemeSwitchButton::BCThemeSwitchButton(QWidget *parent )
// CSS: Transparent, damit es sich nahtlos in den StatusBar einfügt
// Schriftgröße etwas erhöhen, damit die Emojis gut erkennbar sind
- /*
+
setStyleSheet(R"(
- QPushButton {
+ BCThemeSwitchButton
+ {
border: none;
- background-color: transparent;
+ background-color: green;
font-size: 11pt;
}
- QPushButton:hover {
- background-color: rgba(128, 128, 128, 30); // Leichter Hover-Effekt
+ BCThemeSwitchButton:Hover
+ {
+ background-color: rgba(128, 128, 128, 30);
border-radius: 24px;
}
)");
- */
+
// Initialer Status (Startet im Dark Mode -> zeigt Mond)
updateIcon();
- connect(this, &QPushButton::clicked, this, &BCThemeSwitchButton::toggle);
+ connect(this, &QPushButton::clicked, this, &BCThemeSwitchButton::toggleMode);
}
diff --git a/bcmainwindow.cpp b/bcmainwindow.cpp
index 6abae35..1730fc1 100644
--- a/bcmainwindow.cpp
+++ b/bcmainwindow.cpp
@@ -144,10 +144,11 @@ void BCMainWindow::initMainWindow()
// 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( &_transmitter, &BCTransmitter::valueUpdated, this, &BCMainWindow::onValueUpdated );
+ connect( _exitButton, &QToolButton::clicked, qApp, &QCoreApplication::quit );
- connect(this, &BCMainWindow::requestValueUpdate, &_transmitter, &BCTransmitter::onUpdateValue);
- connect(&_worker, &QThread::finished, &_transmitter, &QObject::deleteLater);
+ connect( &_transmitter, &BCTransmitter::valueUpdated, this, &BCMainWindow::onValueUpdated );
+ connect( this, &BCMainWindow::requestValueUpdate, &_transmitter, &BCTransmitter::onUpdateValue);
+ connect( &_worker, &QThread::finished, &_transmitter, &QObject::deleteLater);
connect( &_transmitter, &BCTransmitter::driverStateChanged, this, &BCMainWindow::onDriverStateChanged );
// transmitter starten
@@ -186,15 +187,19 @@ void BCMainWindow::initStatusBar()
statBar->addPermanentWidget(themeBtn);
connect(themeBtn, &BCThemeSwitchButton::themeChanged, this, [this](bool isDark)
{
+
QString message = isDark ? "Dark Mode Activated" : "Light Mode Activated";
statusBar()->showMessage( message, 3000);
- setApplicationStyleSheet( isDark ? ":/claude_dark_mode.qss"_L1 : ":/claude_light_mode.qss"_L1 );
+ setApplicationStyleSheet( isDark ? ":claude_dark_mode.qss"_L1 : ":claude_light_mode.qss"_L1 );
});
// Wir starten im light mode
//themeBtn->setDarkMode( false );
statBar->showMessage("Ready");
+
+ setApplicationStyleSheet(":bionxcontrol.qss"_L1);
+ //setApplicationStyleSheet(":alt.qss"_L1);
}
/*
diff --git a/bcmainwindow.ui b/bcmainwindow.ui
index 15c3acd..4a6cb67 100644
--- a/bcmainwindow.ui
+++ b/bcmainwindow.ui
@@ -120,7 +120,7 @@
- -
+
-
Qt::Orientation::Vertical
@@ -142,7 +142,11 @@
- SYNC
+
+
+
+
+ :/sync_yellow.svg:/sync_yellow.svg
@@ -164,7 +168,11 @@
- CONNECT
+
+
+
+
+ :/connect.svg:/connect.svg
@@ -188,6 +196,10 @@
Quit
+
+
+ :/exit_red.svg:/exit_red.svg
+
48
@@ -199,9 +211,6 @@
-
-
-
@@ -315,11 +324,7 @@
-
-
- background-color: #DADADA
-
-
+
@@ -329,7 +334,7 @@
motor
- Show motor settings
+ Motoreinstellungen anzeigen und bearbeiten
@@ -341,7 +346,7 @@
battery
- Show battery settings
+ Batterieeinstellungen anzeigen und bearbeiten
@@ -353,31 +358,19 @@
console
- Show console settings
-
-
-
-
-
- :exit.svg:exit.svg
-
-
- Exit
-
-
- Exit
+ Konseleneinstellungen anzeigen und bearbeiten
-
+
:/connected.png:/connected.png
connect
- connect to bike
+ TinyCAN native Treiber laden
QAction::MenuRole::TextHeuristicRole
diff --git a/bionxcontrol.qrc b/bionxcontrol.qrc
index 2961e4c..21cd50f 100644
--- a/bionxcontrol.qrc
+++ b/bionxcontrol.qrc
@@ -7,17 +7,13 @@
resources/bionx_akku.png
resources/bionx_console.png
resources/bionx_motor.png
- resources/exit.png
- resources/important.png
- resources/restart.png
- resources/splash.png
- resources/connect.png
- resources/connected.png
- resources/disconnected.png
- resources/connect_white.svg
- resources/a_connect.svg
- resources/a_exit.svg
- resources/a_sync_green.svg
- resources/a_sync_yellow.svg
+ resources/connect.svg
+ resources/exit.svg
+ resources/exit_red.svg
+ resources/sync_green.svg
+ resources/sync_yellow.svg
+ resources/alt.qss
+ resources/connect_white.svg
+ resources/sync.svg
diff --git a/resources/TinyCan_812.exe b/resources/TinyCan_812.exe
deleted file mode 100644
index 72941d6..0000000
Binary files a/resources/TinyCan_812.exe and /dev/null differ
diff --git a/resources/alt.qss b/resources/alt.qss
new file mode 100644
index 0000000..490dfd4
--- /dev/null
+++ b/resources/alt.qss
@@ -0,0 +1,120 @@
+/* appqss */
+
+/* Alle QWidgets bekommen diesen Font */
+QWidget
+{
+ font-size: 14px;
+ font-family: Segoe UI, sans-serif;
+}
+/*
+QMainWindow
+{
+ background-color: #272727;
+}
+*/
+
+/* Spezifisches Styling für Buttons */
+QPushButton
+{
+ background-color: #0078d7;
+ color: white;
+ border-radius: 4px;
+ padding: 6px;
+}
+
+QPushButton:hover
+{
+ background-color: #1084e3;
+}
+
+QPushButton:pressed
+{
+ background-color: #005a9e;
+}
+
+/* Normal */
+QToolButton {
+ background-color: transparent;
+ border: 1px solid transparent;
+ border-radius: 4px;
+ padding: 4px;
+}
+
+/* Hover */
+QToolButton:hover {
+ background-color: #E3F2FD;
+ border: 1px solid #2196F3;
+}
+
+/* Pressed/Clicked */
+QToolButton:pressed {
+ background-color: #BBDEFB;
+}
+
+/* Checked (bei checkable buttons) */
+QToolButton:checked {
+ background-color: #2196F3;
+ color: white;
+}
+
+/* Checked + Hover */
+QToolButton:checked:hover {
+ background-color: #1976D2;
+}
+
+/* Disabled */
+QToolButton:disabled {
+ color: #BDBDBD;
+ background-color: transparent;
+}
+
+/*
+QTableView
+{
+ background-color: #404142;
+ border-radius: 8px;
+ outline: none;
+ show-decoration-selected: 0;
+}
+
+QTableView::item
+{
+ border: 2px solid #2196F3;
+ border-radius: 8px;
+ padding: 8px;
+ margin: 4px;
+ background-color: white;
+}
+*/
+
+QTableView::item:hover
+{
+ border-color: #FF9800;
+ background-color: #fff8f0;
+}
+
+QTableView::item:selected
+{
+ border-color: #F44336; /* Roter Rahmen */
+ background-color: #ffebee;
+}
+
+QTableView::item:selected:hover
+{
+ border-color: #FF9800;
+ background-color: #ffe0b2;
+}
+*/
+
+QTableView::item:focus
+{
+/*
+// outline: none; Entfernt das Focus-Rectangle
+// border-color: green;
+// background-color: #ffe0b2;
+*/
+ border: 2px solid gray;
+ border-style: inset;
+ background-color: white;
+ color: black;
+}
diff --git a/resources/bionxcontrol.qss b/resources/bionxcontrol.qss
index 490dfd4..a03a15f 100644
--- a/resources/bionxcontrol.qss
+++ b/resources/bionxcontrol.qss
@@ -3,118 +3,81 @@
/* Alle QWidgets bekommen diesen Font */
QWidget
{
- font-size: 14px;
- font-family: Segoe UI, sans-serif;
+ font-family: "Calibri", "Carlito", "Open Sans", sans-serif;
+ font-size: 6pt;
+ margin: 0px;
+ padding: 0px;
}
+
/*
-QMainWindow
+QToolButton
{
- background-color: #272727;
-}
+ background-color: white;
+ color: #201F1E;
+ border: 1px solid #8A8886;
+ border-radius: 4px;
+
+
+ min-width: 64px;
+ max-width: 64px;
+ min-height: 64px;
+ max-height: 64px;
+
+}
+
+QToolButton:hover
+{
+ background-color: #F3F2F1;
+ border: 1px solid #323130;
+}
+
+QToolButton:pressed
+{
+ background-color: #EDEBE9;
+ border: 1px solid #201F1E;
+}
+
+QToolButton:disabled
+{
+ background-color: #F3F2F1;
+ color: #A19F9D;
+ border: 1px solid #EDEBE9;
+}
*/
-/* Spezifisches Styling für Buttons */
-QPushButton
-{
- background-color: #0078d7;
- color: white;
+/* === QToolButton === */
+QToolButton
+ {
+ background-color: transparent;
+ color: #000000;
+ border: none;
border-radius: 4px;
padding: 6px;
+
+ min-width: 64px;
+ max-width: 64px;
+ min-height: 64px;
+ max-height: 64px;
}
-QPushButton:hover
+QToolButton:hover
+ {
+ background-color: #F9F9F9;
+ border: 1px solid #DDDDDD;
+}
+
+QToolButton:pressed
{
- background-color: #1084e3;
+ background-color: #E0E0E0;
}
-QPushButton:pressed
+QToolButton:checked
{
- background-color: #005a9e;
+ background-color: #0078D4;
+ color: #FFFFFF;
}
-/* Normal */
-QToolButton {
- background-color: transparent;
- border: 1px solid transparent;
- border-radius: 4px;
- padding: 4px;
-}
-
-/* Hover */
-QToolButton:hover {
- background-color: #E3F2FD;
- border: 1px solid #2196F3;
-}
-
-/* Pressed/Clicked */
-QToolButton:pressed {
- background-color: #BBDEFB;
-}
-
-/* Checked (bei checkable buttons) */
-QToolButton:checked {
- background-color: #2196F3;
- color: white;
-}
-
-/* Checked + Hover */
-QToolButton:checked:hover {
- background-color: #1976D2;
-}
-
-/* Disabled */
-QToolButton:disabled {
- color: #BDBDBD;
- background-color: transparent;
-}
-
-/*
-QTableView
-{
- background-color: #404142;
- border-radius: 8px;
- outline: none;
- show-decoration-selected: 0;
-}
-
-QTableView::item
-{
- border: 2px solid #2196F3;
- border-radius: 8px;
- padding: 8px;
- margin: 4px;
- background-color: white;
-}
-*/
-
-QTableView::item:hover
-{
- border-color: #FF9800;
- background-color: #fff8f0;
-}
-
-QTableView::item:selected
-{
- border-color: #F44336; /* Roter Rahmen */
- background-color: #ffebee;
-}
-
-QTableView::item:selected:hover
-{
- border-color: #FF9800;
- background-color: #ffe0b2;
-}
-*/
-
-QTableView::item:focus
-{
-/*
-// outline: none; Entfernt das Focus-Rectangle
-// border-color: green;
-// background-color: #ffe0b2;
-*/
- border: 2px solid gray;
- border-style: inset;
- background-color: white;
- color: black;
-}
+QToolButton:disabled
+ {
+ color: #A19F9D;
+}
\ No newline at end of file
diff --git a/resources/connect.png b/resources/connect.png
deleted file mode 100644
index e0c1571..0000000
Binary files a/resources/connect.png and /dev/null differ
diff --git a/resources/a_connect.svg b/resources/connect.svg
similarity index 100%
rename from resources/a_connect.svg
rename to resources/connect.svg
diff --git a/resources/connected.png b/resources/connected.png
deleted file mode 100644
index 43d40b9..0000000
Binary files a/resources/connected.png and /dev/null differ
diff --git a/resources/disconnected.png b/resources/disconnected.png
deleted file mode 100644
index 6a7e035..0000000
Binary files a/resources/disconnected.png and /dev/null differ
diff --git a/resources/document-import.png b/resources/document-import.png
deleted file mode 100644
index 662b134..0000000
Binary files a/resources/document-import.png and /dev/null differ
diff --git a/resources/document-revert.png b/resources/document-revert.png
deleted file mode 100644
index fb38bd5..0000000
Binary files a/resources/document-revert.png and /dev/null differ
diff --git a/resources/document-save-as.png b/resources/document-save-as.png
deleted file mode 100644
index 3f4641f..0000000
Binary files a/resources/document-save-as.png and /dev/null differ
diff --git a/resources/document-save.png b/resources/document-save.png
deleted file mode 100644
index f412793..0000000
Binary files a/resources/document-save.png and /dev/null differ
diff --git a/resources/exit.png b/resources/exit.png
deleted file mode 100644
index 8f2d4e6..0000000
Binary files a/resources/exit.png and /dev/null differ
diff --git a/resources/a_exit.svg b/resources/exit.svg
similarity index 100%
rename from resources/a_exit.svg
rename to resources/exit.svg
diff --git a/resources/exit_red.svg b/resources/exit_red.svg
new file mode 100644
index 0000000..1f77451
--- /dev/null
+++ b/resources/exit_red.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/resources/go-first.png b/resources/go-first.png
deleted file mode 100644
index c271161..0000000
Binary files a/resources/go-first.png and /dev/null differ
diff --git a/resources/go-jump.png b/resources/go-jump.png
deleted file mode 100644
index e2002d6..0000000
Binary files a/resources/go-jump.png and /dev/null differ
diff --git a/resources/go-last.png b/resources/go-last.png
deleted file mode 100644
index 85ed476..0000000
Binary files a/resources/go-last.png and /dev/null differ
diff --git a/resources/important.png b/resources/important.png
deleted file mode 100644
index f162ee5..0000000
Binary files a/resources/important.png and /dev/null differ
diff --git a/resources/restart.png b/resources/restart.png
deleted file mode 100644
index 2136f49..0000000
Binary files a/resources/restart.png and /dev/null differ
diff --git a/resources/splash.pdn b/resources/splash.pdn
deleted file mode 100644
index 88e2808..0000000
Binary files a/resources/splash.pdn and /dev/null differ
diff --git a/resources/splash.png b/resources/splash.png
deleted file mode 100644
index ca74553..0000000
Binary files a/resources/splash.png and /dev/null differ
diff --git a/resources/sync.svg b/resources/sync.svg
new file mode 100644
index 0000000..461246f
--- /dev/null
+++ b/resources/sync.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/resources/a_sync_green.svg b/resources/sync_green.svg
similarity index 100%
rename from resources/a_sync_green.svg
rename to resources/sync_green.svg
diff --git a/resources/a_sync_yellow.svg b/resources/sync_yellow.svg
similarity index 100%
rename from resources/a_sync_yellow.svg
rename to resources/sync_yellow.svg
diff --git a/resources/tiny_can_linux64_790.tar.gz b/resources/tiny_can_linux64_790.tar.gz
deleted file mode 100644
index dcc3008..0000000
Binary files a/resources/tiny_can_linux64_790.tar.gz and /dev/null differ
diff --git a/resources/tiny_can_raspberry_790.tar.gz b/resources/tiny_can_raspberry_790.tar.gz
deleted file mode 100644
index 1747c45..0000000
Binary files a/resources/tiny_can_raspberry_790.tar.gz and /dev/null differ