From 0b67f4c1660385750c7362da6e7aef03107b8422 Mon Sep 17 00:00:00 2001 From: "PANIK\\chris" Date: Tue, 30 Dec 2025 23:34:28 +0100 Subject: [PATCH] Added demos. --- bc.h | 5 +- bionxcontrol.qrc | 6 +- .../.qtcreator/claude_fluent_light.pro.user | 224 +++++ .../claude_fluent_light.pro | 26 + doc/claude_fluent_light/fluentwidget.cpp | 2 + doc/claude_fluent_light/fluentwidget.h | 466 +++++++++ doc/claude_fluent_light/main.cpp | 37 + doc/claude_fluent_light/mainwindow.cpp | 9 + doc/claude_fluent_light/mainwindow.h | 16 + doc/claude_fluent_light/mainwindow.ui | 31 + .../.qtcreator/gem_fluend_dark.pro.user | 224 +++++ doc/gem_fluend_dark/gem_fluend_dark.pro | 24 + doc/gem_fluend_dark/main.cpp | 219 +++++ doc/gem_fluend_dark/mainwindow.cpp | 9 + doc/gem_fluend_dark/mainwindow.h | 16 + doc/gem_fluend_dark/mainwindow.ui | 31 + .../.qtcreator/gemini_fluent_light.pro.user | 224 +++++ .../gemini_fluent_light.pro | 24 + doc/gemini_fluent_light/main.cpp | 228 +++++ doc/gemini_fluent_light/mainwindow.cpp | 9 + doc/gemini_fluent_light/mainwindow.h | 16 + doc/gemini_fluent_light/mainwindow.ui | 31 + main.cpp | 23 +- resources/claude_light_mode.qss | 890 ++++++++++++++++++ 24 files changed, 2784 insertions(+), 6 deletions(-) create mode 100644 doc/claude_fluent_light/.qtcreator/claude_fluent_light.pro.user create mode 100644 doc/claude_fluent_light/claude_fluent_light.pro create mode 100644 doc/claude_fluent_light/fluentwidget.cpp create mode 100644 doc/claude_fluent_light/fluentwidget.h create mode 100644 doc/claude_fluent_light/main.cpp create mode 100644 doc/claude_fluent_light/mainwindow.cpp create mode 100644 doc/claude_fluent_light/mainwindow.h create mode 100644 doc/claude_fluent_light/mainwindow.ui create mode 100644 doc/gem_fluend_dark/.qtcreator/gem_fluend_dark.pro.user create mode 100644 doc/gem_fluend_dark/gem_fluend_dark.pro create mode 100644 doc/gem_fluend_dark/main.cpp create mode 100644 doc/gem_fluend_dark/mainwindow.cpp create mode 100644 doc/gem_fluend_dark/mainwindow.h create mode 100644 doc/gem_fluend_dark/mainwindow.ui create mode 100644 doc/gemini_fluent_light/.qtcreator/gemini_fluent_light.pro.user create mode 100644 doc/gemini_fluent_light/gemini_fluent_light.pro create mode 100644 doc/gemini_fluent_light/main.cpp create mode 100644 doc/gemini_fluent_light/mainwindow.cpp create mode 100644 doc/gemini_fluent_light/mainwindow.h create mode 100644 doc/gemini_fluent_light/mainwindow.ui create mode 100644 resources/claude_light_mode.qss diff --git a/bc.h b/bc.h index a31259b..770d4ea 100644 --- a/bc.h +++ b/bc.h @@ -578,9 +578,8 @@ public: Reg_Charger_Rev_Charger = 0x56, // - - //{%Endregion} - - // {%Region Motor} + + ID_Motor = 0x20, // ID_Motor_Response = 0x08, Motor_Assist_Level = 0x09, // [Unit:%, Range:-100..100, Factor:1.5625] !!! Signed !!! diff --git a/bionxcontrol.qrc b/bionxcontrol.qrc index 714868b..f2d4cd4 100644 --- a/bionxcontrol.qrc +++ b/bionxcontrol.qrc @@ -2,7 +2,9 @@ resources/bikeinfo.xml resources/bionxcontrol.qss - resources/bionx_akku.png + resources/claude_dark_mode.qss + resources/claude_light_mode.qss + resources/bionx_akku.png resources/bionx_console.png resources/bionx_motor.png resources/exit.png @@ -11,6 +13,6 @@ resources/splash.png resources/connect.png resources/connected.png - resources/disconnected.png + resources/disconnected.png diff --git a/doc/claude_fluent_light/.qtcreator/claude_fluent_light.pro.user b/doc/claude_fluent_light/.qtcreator/claude_fluent_light.pro.user new file mode 100644 index 0000000..0fb51d9 --- /dev/null +++ b/doc/claude_fluent_light/.qtcreator/claude_fluent_light.pro.user @@ -0,0 +1,224 @@ + + + + + + EnvironmentId + {350f6538-4791-42f9-b43d-6ea1a7b22b7b} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + true + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 1 + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + false + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 16 + true + + + + true + + 0 + + + + ProjectExplorer.Project.Target.0 + + Desktop + true + Desktop Qt 6.10.1 MinGW 64-bit + Desktop Qt 6.10.1 MinGW 64-bit + qt.qt6.6101.win64_mingw_kit + 0 + 0 + 0 + + 0 + C:\syncMePlease\projects.now\claude_fluent_light\build\Desktop_Qt_6_10_1_MinGW_64_bit-Debug + C:/syncMePlease/projects.now/claude_fluent_light/build/Desktop_Qt_6_10_1_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/claude_fluent_light/claude_fluent_light.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + 2 + + 1 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/claude_fluent_light/claude_fluent_light.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + Version + 22 + + diff --git a/doc/claude_fluent_light/claude_fluent_light.pro b/doc/claude_fluent_light/claude_fluent_light.pro new file mode 100644 index 0000000..5cfb900 --- /dev/null +++ b/doc/claude_fluent_light/claude_fluent_light.pro @@ -0,0 +1,26 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + fluentwidget.cpp \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + fluentwidget.h \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/doc/claude_fluent_light/fluentwidget.cpp b/doc/claude_fluent_light/fluentwidget.cpp new file mode 100644 index 0000000..b0b0929 --- /dev/null +++ b/doc/claude_fluent_light/fluentwidget.cpp @@ -0,0 +1,2 @@ +#include "fluentwidget.h" + diff --git a/doc/claude_fluent_light/fluentwidget.h b/doc/claude_fluent_light/fluentwidget.h new file mode 100644 index 0000000..e7701ff --- /dev/null +++ b/doc/claude_fluent_light/fluentwidget.h @@ -0,0 +1,466 @@ +// FluentWidget.h +#ifndef FLUENTWIDGET_H +#define FLUENTWIDGET_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Fluent Card Widget mit Hover-Effekt +class FluentCard : public QWidget { + Q_OBJECT + Q_PROPERTY(qreal elevationFactor READ elevationFactor WRITE setElevationFactor) + +public: + FluentCard(const QString& title, const QString& subtitle, + const QColor& accentColor, QWidget* parent = nullptr) + : QWidget(parent), m_title(title), m_subtitle(subtitle), + m_accentColor(accentColor), m_elevationFactor(0.0) { + + setFixedSize(280, 140); + setMouseTracking(true); + } + + qreal elevationFactor() const { return m_elevationFactor; } + void setElevationFactor(qreal factor) + { + qDebug() << " --- set: " << factor; + m_elevationFactor = factor; + update(); + } + +protected: + void paintEvent(QPaintEvent*) override { + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing); + + // Draw shadow manually (multiple layers for smooth shadow) + int shadowSize = 2 + m_elevationFactor * 10; + int shadowOffset = m_elevationFactor * 4; + + for (int i = shadowSize; i > 0; i--) { + int alpha = 15 * (1.0 - i / (qreal)shadowSize); + QColor shadowColor(0, 0, 0, alpha); + painter.setPen(Qt::NoPen); + painter.setBrush(shadowColor); + painter.drawRoundedRect( + rect().adjusted(-i, -i + shadowOffset, i, i + shadowOffset), + 8 + i, 8 + i + ); + } + + // Card background + painter.setBrush(QColor(43, 43, 43)); // Dark surface + painter.setPen(QPen(QColor(63, 63, 63), 1)); // Border + painter.drawRoundedRect(rect().adjusted(1, 1, -1, -1), 8, 8); + + // Accent icon circle + QColor iconBg = m_accentColor; + iconBg.setAlpha(40); + painter.setBrush(iconBg); + painter.setPen(Qt::NoPen); + painter.drawEllipse(20, 20, 48, 48); + + // Icon (simplified) + painter.setPen(m_accentColor); + QFont iconFont = font(); + iconFont.setPointSize(24); + iconFont.setBold(true); + painter.setFont(iconFont); + painter.drawText(QRect(20, 20, 48, 48), Qt::AlignCenter, "📄"); + + // Title + painter.setPen(Qt::white); + QFont titleFont = font(); + titleFont.setPointSize(12); + titleFont.setWeight(QFont::DemiBold); + painter.setFont(titleFont); + painter.drawText(QRect(20, 80, width() - 40, 25), + Qt::AlignLeft | Qt::AlignVCenter, m_title); + + // Subtitle + painter.setPen(QColor(176, 176, 176)); + QFont subFont = font(); + subFont.setPointSize(9); + painter.setFont(subFont); + painter.drawText(QRect(20, 105, width() - 40, 20), + Qt::AlignLeft | Qt::AlignVCenter, m_subtitle); + } + + void enterEvent(QEnterEvent*) override { + QPropertyAnimation* anim = new QPropertyAnimation(this, "elevationFactor"); + anim->setDuration(200); + anim->setEasingCurve(QEasingCurve::OutCubic); + anim->setStartValue(m_elevationFactor); + anim->setEndValue(1.0); + anim->start(QAbstractAnimation::DeleteWhenStopped); + } + + void leaveEvent(QEvent*) override { + QPropertyAnimation* anim = new QPropertyAnimation(this, "elevationFactor"); + anim->setDuration(200); + anim->setEasingCurve(QEasingCurve::OutCubic); + anim->setStartValue(m_elevationFactor); + anim->setEndValue(0.0); + anim->start(QAbstractAnimation::DeleteWhenStopped); + } + +private: + QString m_title; + QString m_subtitle; + QColor m_accentColor; + qreal m_elevationFactor; +}; + +// Fluent Button mit Acrylic-Style +class FluentButton : public QPushButton { + Q_OBJECT + +public: + enum ButtonStyle { Primary, Secondary, Accent }; + + FluentButton(const QString& text, ButtonStyle style = Secondary, + QWidget* parent = nullptr) + : QPushButton(text, parent), m_style(style), m_pressed(false) { + + setMinimumHeight(32); + setCursor(Qt::PointingHandCursor); + updateStyle(); + } + +protected: + void enterEvent(QEnterEvent*) override { + updateStyle(true); + } + + void leaveEvent(QEvent*) override { + updateStyle(false); + } + + void mousePressEvent(QMouseEvent* e) override { + m_pressed = true; + QPushButton::mousePressEvent(e); + } + + void mouseReleaseEvent(QMouseEvent* e) override { + m_pressed = false; + QPushButton::mouseReleaseEvent(e); + } + +private: + void updateStyle(bool hovered = false) { + QString style; + + switch (m_style) { + case Primary: + if (hovered) { + style = "QPushButton { background-color: #106EBE; color: white; " + "border: none; border-radius: 4px; font-size: 9pt; " + "padding: 6px 16px; font-weight: 500; }"; + } else { + style = "QPushButton { background-color: #0078D4; color: white; " + "border: none; border-radius: 4px; font-size: 9pt; " + "padding: 6px 16px; font-weight: 500; }"; + } + break; + + case Secondary: + if (hovered) { + style = "QPushButton { background-color: #3A3A3A; color: white; " + "border: 1px solid #5A5A5A; border-radius: 4px; " + "font-size: 9pt; padding: 6px 16px; font-weight: 500; }"; + } else { + style = "QPushButton { background-color: #2B2B2B; color: white; " + "border: 1px solid #3F3F3F; border-radius: 4px; " + "font-size: 9pt; padding: 6px 16px; font-weight: 500; }"; + } + break; + + case Accent: + if (hovered) { + style = "QPushButton { background-color: rgba(0, 120, 212, 0.15); " + "color: #60CDFF; border: none; border-radius: 4px; " + "font-size: 9pt; padding: 6px 16px; font-weight: 500; }"; + } else { + style = "QPushButton { background-color: transparent; " + "color: #60CDFF; border: none; border-radius: 4px; " + "font-size: 9pt; padding: 6px 16px; font-weight: 500; }"; + } + break; + } + + setStyleSheet(style); + } + + ButtonStyle m_style; + bool m_pressed; +}; + +// Fluent Toggle Switch +class FluentToggle : public QWidget { + Q_OBJECT + Q_PROPERTY(int position READ position WRITE setPosition) + +public: + FluentToggle(QWidget* parent = nullptr) + : QWidget(parent), m_checked(false), m_position(2) { + + setFixedSize(44, 20); + setCursor(Qt::PointingHandCursor); + } + + bool isChecked() const { return m_checked; } + + void setChecked(bool checked) { + if (m_checked != checked) { + m_checked = checked; + animateToggle(); + emit toggled(m_checked); + } + } + + int position() const { return m_position; } + void setPosition(int pos) { + m_position = pos; + update(); + } + +signals: + void toggled(bool checked); + +protected: + void paintEvent(QPaintEvent*) override { + QPainter painter(this); + painter.setRenderHint(QPainter::Antialiasing); + + // Track + QColor trackColor = m_checked ? QColor("#0078D4") : QColor("#3F3F3F"); + painter.setPen(Qt::NoPen); + painter.setBrush(trackColor); + painter.drawRoundedRect(rect(), 10, 10); + + // Thumb + painter.setBrush(Qt::white); + painter.drawEllipse(m_position, 2, 16, 16); + } + + void mousePressEvent(QMouseEvent*) override { + setChecked(!m_checked); + } + +private: + void animateToggle() { + QPropertyAnimation* anim = new QPropertyAnimation(this, "position"); + anim->setDuration(150); + anim->setEasingCurve(QEasingCurve::InOutQuad); + anim->setEndValue(m_checked ? 26 : 2); + anim->start(QAbstractAnimation::DeleteWhenStopped); + } + + bool m_checked; + int m_position; +}; + +// Main Fluent Widget +class FluentWidget : public QWidget { + Q_OBJECT + +public: + FluentWidget(QWidget* parent = nullptr) : QWidget(parent) { + setupUI(); + applyFluentDarkTheme(); + } + +private: + void setupUI() { + QVBoxLayout* mainLayout = new QVBoxLayout(this); + mainLayout->setContentsMargins(0, 0, 0, 0); + mainLayout->setSpacing(0); + + // Title Bar + QWidget* titleBar = createTitleBar(); + mainLayout->addWidget(titleBar); + + // Content Area + QWidget* content = new QWidget(); + content->setStyleSheet("background-color: #202020;"); + + QVBoxLayout* contentLayout = new QVBoxLayout(content); + contentLayout->setContentsMargins(40, 40, 40, 40); + contentLayout->setSpacing(32); + + // Header + QLabel* titleLabel = new QLabel("Fluent Design System"); + titleLabel->setStyleSheet("color: white; font-size: 28pt; font-weight: 600;"); + contentLayout->addWidget(titleLabel); + + QLabel* subtitleLabel = new QLabel("Modern Windows 11 inspired UI components"); + subtitleLabel->setStyleSheet("color: #B0B0B0; font-size: 11pt;"); + contentLayout->addWidget(subtitleLabel); + + contentLayout->addSpacing(20); + + // Cards Grid + QWidget* cardsWidget = new QWidget(); + QGridLayout* cardsLayout = new QGridLayout(cardsWidget); + cardsLayout->setSpacing(20); + + cardsLayout->addWidget(new FluentCard("Documents", "128 files", + QColor("#0078D4")), 0, 0); + cardsLayout->addWidget(new FluentCard("Photos", "1,234 items", + QColor("#8764B8")), 0, 1); + cardsLayout->addWidget(new FluentCard("Music", "89 songs", + QColor("#00B7C3")), 0, 2); + cardsLayout->addWidget(new FluentCard("Videos", "24 clips", + QColor("#E3008C")), 1, 0); + cardsLayout->addWidget(new FluentCard("Downloads", "45 items", + QColor("#00CC6A")), 1, 1); + cardsLayout->addWidget(new FluentCard("Projects", "12 folders", + QColor("#FF8C00")), 1, 2); + + contentLayout->addWidget(cardsWidget); + + contentLayout->addSpacing(20); + + // Controls Section + QWidget* controlsPanel = createControlsPanel(); + contentLayout->addWidget(controlsPanel); + + contentLayout->addStretch(); + + mainLayout->addWidget(content); + } + + QWidget* createTitleBar() { + QWidget* titleBar = new QWidget(); + titleBar->setFixedHeight(48); + titleBar->setStyleSheet("background-color: #2B2B2B; border-bottom: 1px solid #3F3F3F;"); + + QHBoxLayout* layout = new QHBoxLayout(titleBar); + layout->setContentsMargins(16, 0, 16, 0); + + // App Icon + QLabel* iconLabel = new QLabel("💎"); + iconLabel->setStyleSheet("font-size: 20pt;"); + layout->addWidget(iconLabel); + + QLabel* appName = new QLabel("Fluent Demo"); + appName->setStyleSheet("color: white; font-size: 10pt; font-weight: 600;"); + layout->addWidget(appName); + + layout->addStretch(); + + // Action Buttons + QPushButton* searchBtn = new QPushButton("🔍"); + searchBtn->setFixedSize(32, 32); + searchBtn->setStyleSheet("QPushButton { background: transparent; color: white; " + "border: none; border-radius: 4px; font-size: 14pt; }" + "QPushButton:hover { background: #3A3A3A; }"); + layout->addWidget(searchBtn); + + QPushButton* notifBtn = new QPushButton("🔔"); + notifBtn->setFixedSize(32, 32); + notifBtn->setStyleSheet("QPushButton { background: transparent; color: white; " + "border: none; border-radius: 4px; font-size: 14pt; }" + "QPushButton:hover { background: #3A3A3A; }"); + layout->addWidget(notifBtn); + + QPushButton* userBtn = new QPushButton("👤"); + userBtn->setFixedSize(32, 32); + userBtn->setStyleSheet("QPushButton { background: transparent; color: white; " + "border: none; border-radius: 4px; font-size: 14pt; }" + "QPushButton:hover { background: #3A3A3A; }"); + layout->addWidget(userBtn); + + return titleBar; + } + + QWidget* createControlsPanel() { + QWidget* panel = new QWidget(); + panel->setStyleSheet("background-color: #2B2B2B; border: 1px solid #3F3F3F; " + "border-radius: 8px;"); + + QVBoxLayout* layout = new QVBoxLayout(panel); + layout->setContentsMargins(24, 24, 24, 24); + layout->setSpacing(24); + + // Section Title + QLabel* sectionTitle = new QLabel("Controls"); + sectionTitle->setStyleSheet("color: white; font-size: 16pt; font-weight: 600;"); + layout->addWidget(sectionTitle); + + // Buttons Demo + QLabel* btnLabel = new QLabel("Buttons"); + btnLabel->setStyleSheet("color: #B0B0B0; font-size: 10pt; font-weight: 600;"); + layout->addWidget(btnLabel); + + QHBoxLayout* btnLayout = new QHBoxLayout(); + btnLayout->setSpacing(12); + btnLayout->addWidget(new FluentButton("Primary", FluentButton::Primary)); + btnLayout->addWidget(new FluentButton("Secondary", FluentButton::Secondary)); + btnLayout->addWidget(new FluentButton("Accent", FluentButton::Accent)); + btnLayout->addStretch(); + layout->addLayout(btnLayout); + + // Slider Demo + QLabel* sliderLabel = new QLabel("Slider"); + sliderLabel->setStyleSheet("color: #B0B0B0; font-size: 10pt; font-weight: 600;"); + layout->addWidget(sliderLabel); + + QSlider* slider = new QSlider(Qt::Horizontal); + slider->setRange(0, 100); + slider->setValue(50); + slider->setStyleSheet( + "QSlider::groove:horizontal { background: #3F3F3F; height: 4px; " + "border-radius: 2px; }" + "QSlider::handle:horizontal { background: #0078D4; width: 16px; " + "height: 16px; margin: -6px 0; border-radius: 8px; }" + "QSlider::add-page:horizontal { background: #3F3F3F; }" + "QSlider::sub-page:horizontal { background: #0078D4; }" + ); + layout->addWidget(slider); + + // Toggle Demo + QLabel* toggleLabel = new QLabel("Toggles"); + toggleLabel->setStyleSheet("color: #B0B0B0; font-size: 10pt; font-weight: 600;"); + layout->addWidget(toggleLabel); + + QStringList toggleTexts = {"Enable notifications", "Dark mode", "Auto-save"}; + for (const QString& text : toggleTexts) { + QHBoxLayout* toggleRow = new QHBoxLayout(); + + QLabel* label = new QLabel(text); + label->setStyleSheet("color: white; font-size: 10pt;"); + toggleRow->addWidget(label); + + toggleRow->addStretch(); + + FluentToggle* toggle = new FluentToggle(); + if (text == "Dark mode") { + toggle->setChecked(true); + } + toggleRow->addWidget(toggle); + + layout->addLayout(toggleRow); + } + + return panel; + } + + void applyFluentDarkTheme() { + setStyleSheet("QWidget { font-family: 'Segoe UI', 'Noto Sans', sans-serif; }"); + } +}; + +#endif // FLUENTWIDGET_H diff --git a/doc/claude_fluent_light/main.cpp b/doc/claude_fluent_light/main.cpp new file mode 100644 index 0000000..a8b51a1 --- /dev/null +++ b/doc/claude_fluent_light/main.cpp @@ -0,0 +1,37 @@ + +// main.cpp +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "FluentWidget.h" + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + + // Set font + QFont font; + font.setFamily("Segoe UI"); + font.setPointSize(9); + app.setFont(font); + + FluentWidget window; + window.setWindowTitle("Fluent Design Demo"); + window.resize(1000, 800); + window.show(); + + return app.exec(); +} diff --git a/doc/claude_fluent_light/mainwindow.cpp b/doc/claude_fluent_light/mainwindow.cpp new file mode 100644 index 0000000..ffc1962 --- /dev/null +++ b/doc/claude_fluent_light/mainwindow.cpp @@ -0,0 +1,9 @@ +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + setupUi(this); +} + +MainWindow::~MainWindow() {} diff --git a/doc/claude_fluent_light/mainwindow.h b/doc/claude_fluent_light/mainwindow.h new file mode 100644 index 0000000..3c2e413 --- /dev/null +++ b/doc/claude_fluent_light/mainwindow.h @@ -0,0 +1,16 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "ui_mainwindow.h" + +#include + +class MainWindow : public QMainWindow, private Ui::MainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); +}; +#endif // MAINWINDOW_H diff --git a/doc/claude_fluent_light/mainwindow.ui b/doc/claude_fluent_light/mainwindow.ui new file mode 100644 index 0000000..becc91c --- /dev/null +++ b/doc/claude_fluent_light/mainwindow.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 18 + + + + + + + + diff --git a/doc/gem_fluend_dark/.qtcreator/gem_fluend_dark.pro.user b/doc/gem_fluend_dark/.qtcreator/gem_fluend_dark.pro.user new file mode 100644 index 0000000..7f5a183 --- /dev/null +++ b/doc/gem_fluend_dark/.qtcreator/gem_fluend_dark.pro.user @@ -0,0 +1,224 @@ + + + + + + EnvironmentId + {350f6538-4791-42f9-b43d-6ea1a7b22b7b} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + true + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 1 + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + false + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 16 + true + + + + true + + 0 + + + + ProjectExplorer.Project.Target.0 + + Desktop + true + Desktop Qt 6.10.1 MinGW 64-bit + Desktop Qt 6.10.1 MinGW 64-bit + qt.qt6.6101.win64_mingw_kit + 0 + 0 + 0 + + 0 + C:\syncMePlease\projects.now\gem_fluend_dark\build\Desktop_Qt_6_10_1_MinGW_64_bit-Debug + C:/syncMePlease/projects.now/gem_fluend_dark/build/Desktop_Qt_6_10_1_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/gem_fluend_dark/gem_fluend_dark.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + 2 + + 1 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/gem_fluend_dark/gem_fluend_dark.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + Version + 22 + + diff --git a/doc/gem_fluend_dark/gem_fluend_dark.pro b/doc/gem_fluend_dark/gem_fluend_dark.pro new file mode 100644 index 0000000..b915c09 --- /dev/null +++ b/doc/gem_fluend_dark/gem_fluend_dark.pro @@ -0,0 +1,24 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/doc/gem_fluend_dark/main.cpp b/doc/gem_fluend_dark/main.cpp new file mode 100644 index 0000000..aa92944 --- /dev/null +++ b/doc/gem_fluend_dark/main.cpp @@ -0,0 +1,219 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Hilfsfunktion: Setzt die Fluent Dark Palette global +void applyFluentDarkTheme(QApplication &app) { + // 1. Schriftart setzen (Segoe UI ist Standard für Fluent, Fallback auf Sans) + QFont font = app.font(); + font.setFamily("Segoe UI Variable Display"); // Windows 11 Font + if (!QFontDatabase().families().contains("Segoe UI Variable Display")) { + font.setFamily("Segoe UI"); // Windows 10 + } + font.setPointSize(10); + app.setFont(font); + + // 2. Die Palette definieren + QPalette p; + // Window / Background: #202020 (Mica Alt Base) + QColor colBackground("#202020"); + // Surface / Container: #2D2D2D (Control Fill Secondary) + QColor colSurface("#2D2D2D"); + // Accent: #60CDFF (System Accent Light 2) + QColor colAccent("#60CDFF"); + // Text: White + QColor colText(Qt::white); + QColor colSubText("#D0D0D0"); + + p.setColor(QPalette::Window, colBackground); + p.setColor(QPalette::WindowText, colText); + p.setColor(QPalette::Base, colSurface); + p.setColor(QPalette::AlternateBase, colBackground); + p.setColor(QPalette::ToolTipBase, colSurface); + p.setColor(QPalette::ToolTipText, colText); + p.setColor(QPalette::Text, colText); + p.setColor(QPalette::Button, colSurface); + p.setColor(QPalette::ButtonText, colText); + p.setColor(QPalette::PlaceholderText, colSubText); + p.setColor(QPalette::Highlight, colAccent); + p.setColor(QPalette::HighlightedText, Qt::black); // Kontrast auf Accent + + app.setPalette(p); + + // 3. Stylesheets für die Details (Runde Ecken, Hover) + // Fluent Design nutzt Radius 4px für Controls und 8px für Layer + app.setStyleSheet(R"( + QWidget { + background-color: #202020; + color: #FFFFFF; + } + + /* CARD / CONTAINER STYLE */ + QFrame#Card { + background-color: #2D2D2D; + border: 1px solid #3A3A3A; + border-radius: 8px; + } + + /* BUTTONS */ + QPushButton { + background-color: #2D2D2D; + border: 1px solid #3A3A3A; + border-radius: 4px; + padding: 6px 12px; + border-bottom: 1px solid #505050; /* Leichter 3D Effekt */ + } + QPushButton:hover { + background-color: #3A3A3A; /* Hover Layer */ + } + QPushButton:pressed { + background-color: #1F1F1F; + color: #D0D0D0; + } + /* Accent Button (Primary) */ + QPushButton#PrimaryButton { + background-color: #60CDFF; + color: #000000; + border: 1px solid #60CDFF; + } + QPushButton#PrimaryButton:hover { + background-color: #70D5FF; + } + QPushButton#PrimaryButton:pressed { + background-color: #50B0DD; + } + + /* INPUT FIELDS */ + QLineEdit { + background-color: #2D2D2D; + border: 1px solid #3A3A3A; + border-radius: 4px; + padding: 5px; + border-bottom: 2px solid #505050; /* Focus indicator line hint */ + selection-background-color: #60CDFF; + selection-color: #000000; + } + QLineEdit:focus { + background-color: #1F1F1F; + border-bottom: 2px solid #60CDFF; /* Active highlight */ + } + + /* LABELS */ + QLabel#Title { + font-size: 18pt; + font-weight: bold; + } + QLabel#Subtitle { + font-size: 10pt; + color: #A0A0A0; + } + + /* PROGRESS BAR */ + QProgressBar { + border: none; + background-color: #3A3A3A; + border-radius: 2px; + height: 4px; + text-align: center; + } + QProgressBar::chunk { + background-color: #60CDFF; + border-radius: 2px; + } + )"); +} + +// Eine "Card" Komponente (wiederverwendbar) +class FluentCard : public QFrame { +public: + FluentCard(const QString &title, const QString &value) { + setObjectName("Card"); // Für Stylesheet + QVBoxLayout *layout = new QVBoxLayout(this); + + QLabel *lblTitle = new QLabel(title); + lblTitle->setObjectName("Subtitle"); + + QLabel *lblValue = new QLabel(value); + lblValue->setStyleSheet("font-size: 24pt; font-weight: 300;"); + + layout->addWidget(lblTitle); + layout->addWidget(lblValue); + layout->addStretch(); + } +}; + +int main(int argc, char *argv[]) { + QApplication app(argc, argv); + + // Theme anwenden + applyFluentDarkTheme(app); + + // Hauptfenster + QWidget window; + window.setWindowTitle("Fluent Dark Mode Demo"); + window.resize(800, 500); + + // Layouts + QVBoxLayout *mainLayout = new QVBoxLayout(&window); + mainLayout->setContentsMargins(24, 24, 24, 24); + mainLayout->setSpacing(20); + + // Header + QLabel *header = new QLabel("Dashboard"); + header->setObjectName("Title"); + mainLayout->addWidget(header); + + // Content Area (Grid aus Cards) + QHBoxLayout *cardsLayout = new QHBoxLayout(); + cardsLayout->setSpacing(12); + + cardsLayout->addWidget(new FluentCard("CPU Temp", "42.5 °C")); + cardsLayout->addWidget(new FluentCard("Memory", "1.2 GB")); + cardsLayout->addWidget(new FluentCard("Network", "12 Mb/s")); + + mainLayout->addLayout(cardsLayout); + + // Controls Area (Card für Settings) + QFrame *controlsCard = new QFrame(); + controlsCard->setObjectName("Card"); + QVBoxLayout *controlsLayout = new QVBoxLayout(controlsCard); + + QLabel *lblSettings = new QLabel("System Settings"); + lblSettings->setStyleSheet("font-size: 14pt; font-weight: bold; margin-bottom: 10px;"); + controlsLayout->addWidget(lblSettings); + + // Input Row + QHBoxLayout *inputRow = new QHBoxLayout(); + QLineEdit *edit = new QLineEdit(); + edit->setPlaceholderText("Enter Device Name..."); + QPushButton *btnApply = new QPushButton("Apply"); + btnApply->setObjectName("PrimaryButton"); // Accent Color! + + inputRow->addWidget(edit); + inputRow->addWidget(btnApply); + controlsLayout->addLayout(inputRow); + + // Progress Bar + controlsLayout->addSpacing(10); + QLabel *lblProgress = new QLabel("Processing..."); + lblProgress->setObjectName("Subtitle"); + controlsLayout->addWidget(lblProgress); + + QProgressBar *progress = new QProgressBar(); + progress->setValue(75); + progress->setTextVisible(false); // Fluent Bars haben meist keinen Text + controlsLayout->addWidget(progress); + + mainLayout->addWidget(controlsCard); + mainLayout->addStretch(); // Schiebt alles nach oben + + window.show(); + return app.exec(); +} diff --git a/doc/gem_fluend_dark/mainwindow.cpp b/doc/gem_fluend_dark/mainwindow.cpp new file mode 100644 index 0000000..ffc1962 --- /dev/null +++ b/doc/gem_fluend_dark/mainwindow.cpp @@ -0,0 +1,9 @@ +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + setupUi(this); +} + +MainWindow::~MainWindow() {} diff --git a/doc/gem_fluend_dark/mainwindow.h b/doc/gem_fluend_dark/mainwindow.h new file mode 100644 index 0000000..3c2e413 --- /dev/null +++ b/doc/gem_fluend_dark/mainwindow.h @@ -0,0 +1,16 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "ui_mainwindow.h" + +#include + +class MainWindow : public QMainWindow, private Ui::MainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); +}; +#endif // MAINWINDOW_H diff --git a/doc/gem_fluend_dark/mainwindow.ui b/doc/gem_fluend_dark/mainwindow.ui new file mode 100644 index 0000000..becc91c --- /dev/null +++ b/doc/gem_fluend_dark/mainwindow.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 18 + + + + + + + + diff --git a/doc/gemini_fluent_light/.qtcreator/gemini_fluent_light.pro.user b/doc/gemini_fluent_light/.qtcreator/gemini_fluent_light.pro.user new file mode 100644 index 0000000..a09e5c9 --- /dev/null +++ b/doc/gemini_fluent_light/.qtcreator/gemini_fluent_light.pro.user @@ -0,0 +1,224 @@ + + + + + + EnvironmentId + {350f6538-4791-42f9-b43d-6ea1a7b22b7b} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + true + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 1 + 80 + true + true + 1 + 0 + false + true + false + 2 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + false + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 16 + true + + + + true + + 0 + + + + ProjectExplorer.Project.Target.0 + + Desktop + true + Desktop Qt 6.10.1 MinGW 64-bit + Desktop Qt 6.10.1 MinGW 64-bit + qt.qt6.6101.win64_mingw_kit + 0 + 0 + 0 + + 0 + C:\syncMePlease\projects.now\gemini_fluent_light\build\Desktop_Qt_6_10_1_MinGW_64_bit-Debug + C:/syncMePlease/projects.now/gemini_fluent_light/build/Desktop_Qt_6_10_1_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/gemini_fluent_light/gemini_fluent_light.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + 2 + + 1 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + + Qt4ProjectManager.Qt4RunConfiguration: + C:/syncMePlease/projects.now/gemini_fluent_light/gemini_fluent_light.pro + false + + true + true + true + %{RunConfig:Executable:Path} + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + Version + 22 + + diff --git a/doc/gemini_fluent_light/gemini_fluent_light.pro b/doc/gemini_fluent_light/gemini_fluent_light.pro new file mode 100644 index 0000000..b915c09 --- /dev/null +++ b/doc/gemini_fluent_light/gemini_fluent_light.pro @@ -0,0 +1,24 @@ +QT += core gui + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + mainwindow.h + +FORMS += \ + mainwindow.ui + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target diff --git a/doc/gemini_fluent_light/main.cpp b/doc/gemini_fluent_light/main.cpp new file mode 100644 index 0000000..4b6ba0d --- /dev/null +++ b/doc/gemini_fluent_light/main.cpp @@ -0,0 +1,228 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Hilfsfunktion: Setzt die Fluent LIGHT Palette global +void applyFluentLightTheme(QApplication &app) { + // 1. Schriftart setzen + QFont font = app.font(); + font.setFamily("Segoe UI Variable Display"); + if (!QFontDatabase().families().contains("Segoe UI Variable Display")) { + font.setFamily("Segoe UI"); + } + font.setPointSize(10); + app.setFont(font); + + // 2. Die Palette definieren (Light Mode) + QPalette p; + // Window / Background: #F3F3F3 (Mica Alt) + QColor colBackground("#F3F3F3"); + // Surface / Container: #FFFFFF (Solid White) + QColor colSurface("#FFFFFF"); + // Accent: #0078D4 (System Accent Default) + QColor colAccent("#0078D4"); + // Text: Black / Dark Gray + QColor colText("#1A1A1A"); // Fast Schwarz für weicheren Kontrast + QColor colSubText("#5D5D5D"); + + p.setColor(QPalette::Window, colBackground); + p.setColor(QPalette::WindowText, colText); + p.setColor(QPalette::Base, colSurface); + p.setColor(QPalette::AlternateBase, colBackground); + p.setColor(QPalette::ToolTipBase, colSurface); + p.setColor(QPalette::ToolTipText, colText); + p.setColor(QPalette::Text, colText); + p.setColor(QPalette::Button, colSurface); + p.setColor(QPalette::ButtonText, colText); + p.setColor(QPalette::PlaceholderText, colSubText); + p.setColor(QPalette::Highlight, colAccent); + p.setColor(QPalette::HighlightedText, Qt::white); // Weißer Text auf Blau + + app.setPalette(p); + + // 3. Stylesheets für die Details + app.setStyleSheet(R"( + QWidget { + background-color: #F3F3F3; + color: #1A1A1A; + } + + /* CARD / CONTAINER STYLE */ + QFrame#Card { + background-color: #FFFFFF; + border: 1px solid #E5E5E5; /* Subtiler Rand zur Abgrenzung */ + border-radius: 8px; + /* Optional: Qt unterstützt simple Schatten, aber auf Pi teuer. + Der Border reicht hier. */ + } + + /* BUTTONS */ + QPushButton { + background-color: #FFFFFF; + border: 1px solid #D1D1D1; + border-bottom: 1px solid #B0B0B0; /* Tiefe simulieren */ + border-radius: 4px; + padding: 6px 12px; + color: #1A1A1A; + } + QPushButton:hover { + background-color: #FBFBFB; + border: 1px solid #C0C0C0; + } + QPushButton:pressed { + background-color: #F0F0F0; + color: #5D5D5D; + border-bottom: 1px solid #D1D1D1; /* Flach drücken */ + } + + /* Accent Button (Primary) */ + QPushButton#PrimaryButton { + background-color: #0078D4; + color: #FFFFFF; + border: 1px solid #0078D4; + } + QPushButton#PrimaryButton:hover { + background-color: #1084D9; + } + QPushButton#PrimaryButton:pressed { + background-color: #006CC1; + border-color: #006CC1; + } + + /* INPUT FIELDS */ + QLineEdit { + background-color: #FFFFFF; + border: 1px solid #D1D1D1; + border-bottom: 2px solid #8A8A8A; /* Stärkerer Indikator */ + border-radius: 4px; + padding: 5px; + selection-background-color: #0078D4; + selection-color: #FFFFFF; + } + QLineEdit:hover { + background-color: #FDFDFD; + } + QLineEdit:focus { + background-color: #FFFFFF; + border-bottom: 2px solid #0078D4; /* Active highlight */ + } + + /* LABELS */ + QLabel#Title { + font-size: 18pt; + font-weight: bold; + color: #000000; + } + QLabel#Subtitle { + font-size: 10pt; + color: #5D5D5D; + } + + /* PROGRESS BAR */ + QProgressBar { + border: none; + background-color: #E0E0E0; /* Track Color */ + border-radius: 2px; + height: 4px; + text-align: center; + } + QProgressBar::chunk { + background-color: #0078D4; /* Accent Color */ + border-radius: 2px; + } + )"); +} + +// Eine "Card" Komponente (Identisch zum Dark Mode) +class FluentCard : public QFrame { +public: + FluentCard(const QString &title, const QString &value) { + setObjectName("Card"); + QVBoxLayout *layout = new QVBoxLayout(this); + + QLabel *lblTitle = new QLabel(title); + lblTitle->setObjectName("Subtitle"); + + QLabel *lblValue = new QLabel(value); + lblValue->setStyleSheet("font-size: 24pt; font-weight: 300; background: transparent;"); + // Wichtig: background transparent erzwingen, sonst erben Labels manchmal falsche Farbe + + layout->addWidget(lblTitle); + layout->addWidget(lblValue); + layout->addStretch(); + } +}; + +int main(int argc, char *argv[]) { + QApplication app(argc, argv); + + // HIER: Light Theme anwenden + applyFluentLightTheme(app); + + QWidget window; + window.setWindowTitle("Fluent Light Mode Demo"); + window.resize(800, 500); + + QVBoxLayout *mainLayout = new QVBoxLayout(&window); + mainLayout->setContentsMargins(24, 24, 24, 24); + mainLayout->setSpacing(20); + + // Header + QLabel *header = new QLabel("Dashboard"); + header->setObjectName("Title"); + mainLayout->addWidget(header); + + // Content Area + QHBoxLayout *cardsLayout = new QHBoxLayout(); + cardsLayout->setSpacing(12); + + cardsLayout->addWidget(new FluentCard("CPU Temp", "42.5 °C")); + cardsLayout->addWidget(new FluentCard("Memory", "1.2 GB")); + cardsLayout->addWidget(new FluentCard("Network", "12 Mb/s")); + + mainLayout->addLayout(cardsLayout); + + // Controls Area + QFrame *controlsCard = new QFrame(); + controlsCard->setObjectName("Card"); + QVBoxLayout *controlsLayout = new QVBoxLayout(controlsCard); + + QLabel *lblSettings = new QLabel("System Settings"); + lblSettings->setStyleSheet("font-size: 14pt; font-weight: bold; margin-bottom: 10px; background: transparent;"); + controlsLayout->addWidget(lblSettings); + + // Input Row + QHBoxLayout *inputRow = new QHBoxLayout(); + QLineEdit *edit = new QLineEdit(); + edit->setPlaceholderText("Enter Device Name..."); + QPushButton *btnApply = new QPushButton("Apply"); + btnApply->setObjectName("PrimaryButton"); + + inputRow->addWidget(edit); + inputRow->addWidget(btnApply); + controlsLayout->addLayout(inputRow); + + // Progress Bar + controlsLayout->addSpacing(10); + QLabel *lblProgress = new QLabel("Processing..."); + lblProgress->setObjectName("Subtitle"); + controlsLayout->addWidget(lblProgress); + + QProgressBar *progress = new QProgressBar(); + progress->setValue(75); + progress->setTextVisible(false); + controlsLayout->addWidget(progress); + + mainLayout->addWidget(controlsCard); + mainLayout->addStretch(); + + window.show(); + return app.exec(); +} diff --git a/doc/gemini_fluent_light/mainwindow.cpp b/doc/gemini_fluent_light/mainwindow.cpp new file mode 100644 index 0000000..ffc1962 --- /dev/null +++ b/doc/gemini_fluent_light/mainwindow.cpp @@ -0,0 +1,9 @@ +#include "mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) +{ + setupUi(this); +} + +MainWindow::~MainWindow() {} diff --git a/doc/gemini_fluent_light/mainwindow.h b/doc/gemini_fluent_light/mainwindow.h new file mode 100644 index 0000000..3c2e413 --- /dev/null +++ b/doc/gemini_fluent_light/mainwindow.h @@ -0,0 +1,16 @@ +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "ui_mainwindow.h" + +#include + +class MainWindow : public QMainWindow, private Ui::MainWindow +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); +}; +#endif // MAINWINDOW_H diff --git a/doc/gemini_fluent_light/mainwindow.ui b/doc/gemini_fluent_light/mainwindow.ui new file mode 100644 index 0000000..becc91c --- /dev/null +++ b/doc/gemini_fluent_light/mainwindow.ui @@ -0,0 +1,31 @@ + + + MainWindow + + + + 0 + 0 + 800 + 600 + + + + MainWindow + + + + + + 0 + 0 + 800 + 18 + + + + + + + + diff --git a/main.cpp b/main.cpp index 587aaf0..e3e7728 100644 --- a/main.cpp +++ b/main.cpp @@ -52,8 +52,29 @@ bool setApplicationStyleSheet( QAnyStringView path ) int main(int argc, char *argv[]) { + + QApplication app(argc, argv); - //setApplicationStyleSheet( ":/bionxcontrol.qss"_L1 ); + setApplicationStyleSheet( ":/claude_dark_mode.qss"_L1 ); + /* + app.setStyleSheet(R"( + QWidget { + background-color: #F3F3F3; + font-family: 'Segoe UI Variable', 'Segoe UI', sans-serif; + } + )"); + */ + /* + app.setStyleSheet(R"( + * { + font-family: 'Calibri', 'Carlito', 'Arial', sans-serif; + font-size: 12pt; + })"); + +*/ + //QFont font("segoe UI", 12); // Name, Größe + //QFont font("calibri", 12); // Name, Größe + //app.setFont(font); BCMainWindow w; w.show(); diff --git a/resources/claude_light_mode.qss b/resources/claude_light_mode.qss new file mode 100644 index 0000000..7df148e --- /dev/null +++ b/resources/claude_light_mode.qss @@ -0,0 +1,890 @@ +/* =================================================================== + Fluent Design Light Mode Stylesheet for Qt6 + Windows 11 inspired light theme + =================================================================== */ + +/* === Color Palette === + Background: #F3F3F3 + Surface: #FFFFFF + Surface Hover: #F9F9F9 + Border: #E1DFDD + Text: #000000 + Text Secondary: #605E5C + Accent: #0078D4 + Accent Hover: #106EBE + === */ + +/* === Global Styles === */ +* { + font-family: "Segoe UI", "Noto Sans", Roboto, sans-serif; + font-size: 9pt; +} + +QWidget { + background-color: #F3F3F3; + color: #000000; + selection-background-color: #0078D4; + selection-color: #FFFFFF; +} + +/* === QMainWindow === */ +QMainWindow { + background-color: #F3F3F3; +} + +QMainWindow::separator { + background-color: #E1DFDD; + width: 1px; + height: 1px; +} + +QMainWindow::separator:hover { + background-color: #0078D4; +} + +/* === QPushButton === */ +QPushButton { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 6px 16px; + min-height: 20px; + font-weight: 500; +} + +QPushButton:hover { + background-color: #F9F9F9; + border-color: #D1CFCD; +} + +QPushButton:pressed { + background-color: #F0F0F0; + border-color: #E1DFDD; +} + +QPushButton:disabled { + background-color: #F9F9F9; + color: #A19F9D; + border-color: #E1DFDD; +} + +QPushButton:default { + background-color: #0078D4; + border-color: #0078D4; + color: #FFFFFF; +} + +QPushButton:default:hover { + background-color: #106EBE; + border-color: #106EBE; +} + +QPushButton:default:pressed { + background-color: #005A9E; + border-color: #005A9E; +} + +/* === QLineEdit === */ +QLineEdit { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 6px 8px; + selection-background-color: #0078D4; +} + +QLineEdit:hover { + border-color: #D1CFCD; +} + +QLineEdit:focus { + background-color: #FFFFFF; + border: 2px solid #0078D4; + padding: 5px 7px; +} + +QLineEdit:disabled { + background-color: #F9F9F9; + color: #A19F9D; + border-color: #E1DFDD; +} + +QLineEdit[readOnly="true"] { + background-color: #F9F9F9; + color: #605E5C; +} + +/* === QTextEdit & QPlainTextEdit === */ +QTextEdit, QPlainTextEdit { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 8px; + selection-background-color: #0078D4; +} + +QTextEdit:hover, QPlainTextEdit:hover { + border-color: #D1CFCD; +} + +QTextEdit:focus, QPlainTextEdit:focus { + border: 2px solid #0078D4; + padding: 7px; +} + +QTextEdit:disabled, QPlainTextEdit:disabled { + background-color: #F9F9F9; + color: #A19F9D; +} + +/* === QComboBox === */ +QComboBox { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 6px 8px; + min-height: 20px; +} + +QComboBox:hover { + background-color: #F9F9F9; + border-color: #D1CFCD; +} + +QComboBox:focus { + border: 2px solid #0078D4; +} + +QComboBox:disabled { + background-color: #F9F9F9; + color: #A19F9D; +} + +QComboBox::drop-down { + border: none; + width: 20px; +} + +QComboBox::down-arrow { + image: url(:/icons/down-arrow-light.png); + width: 12px; + height: 12px; +} + +QComboBox QAbstractItemView { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + selection-background-color: #0078D4; + selection-color: #FFFFFF; + outline: none; +} + +QComboBox QAbstractItemView::item { + min-height: 28px; + padding-left: 8px; +} + +QComboBox QAbstractItemView::item:hover { + background-color: #F9F9F9; +} + +/* === QSpinBox & QDoubleSpinBox === */ +QSpinBox, QDoubleSpinBox { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 6px 8px; + min-height: 20px; +} + +QSpinBox:hover, QDoubleSpinBox:hover { + border-color: #D1CFCD; +} + +QSpinBox:focus, QDoubleSpinBox:focus { + border: 2px solid #0078D4; +} + +QSpinBox:disabled, QDoubleSpinBox:disabled { + background-color: #F9F9F9; + color: #A19F9D; +} + +QSpinBox::up-button, QDoubleSpinBox::up-button { + background-color: transparent; + border: none; + width: 16px; +} + +QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover { + background-color: #F0F0F0; +} + +QSpinBox::down-button, QDoubleSpinBox::down-button { + background-color: transparent; + border: none; + width: 16px; +} + +QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover { + background-color: #F0F0F0; +} + +/* === QCheckBox === */ +QCheckBox { + spacing: 8px; + color: #000000; +} + +QCheckBox::indicator { + width: 18px; + height: 18px; + border-radius: 4px; + border: 1px solid #8A8886; + background-color: #FFFFFF; +} + +QCheckBox::indicator:hover { + background-color: #F9F9F9; + border-color: #605E5C; +} + +QCheckBox::indicator:checked { + background-color: #0078D4; + border-color: #0078D4; + image: url(:/icons/checkmark-white.png); +} + +QCheckBox::indicator:checked:hover { + background-color: #106EBE; + border-color: #106EBE; +} + +QCheckBox::indicator:disabled { + background-color: #F9F9F9; + border-color: #E1DFDD; +} + +QCheckBox:disabled { + color: #A19F9D; +} + +/* === QRadioButton === */ +QRadioButton { + spacing: 8px; + color: #000000; +} + +QRadioButton::indicator { + width: 18px; + height: 18px; + border-radius: 9px; + border: 1px solid #8A8886; + background-color: #FFFFFF; +} + +QRadioButton::indicator:hover { + background-color: #F9F9F9; + border-color: #605E5C; +} + +QRadioButton::indicator:checked { + background-color: #0078D4; + border-color: #0078D4; +} + +QRadioButton::indicator:checked:hover { + background-color: #106EBE; + border-color: #106EBE; +} + +QRadioButton::indicator:checked::after { + width: 8px; + height: 8px; + border-radius: 4px; + background-color: #FFFFFF; +} + +QRadioButton::indicator:disabled { + background-color: #F9F9F9; + border-color: #E1DFDD; +} + +QRadioButton:disabled { + color: #A19F9D; +} + +/* === QSlider === */ +QSlider::groove:horizontal { + height: 4px; + background-color: #E1DFDD; + border-radius: 2px; +} + +QSlider::handle:horizontal { + background-color: #FFFFFF; + border: 2px solid #0078D4; + width: 16px; + height: 16px; + margin: -7px 0; + border-radius: 8px; +} + +QSlider::handle:horizontal:hover { + background-color: #FFFFFF; + border: 2px solid #106EBE; +} + +QSlider::handle:horizontal:pressed { + background-color: #F0F0F0; +} + +QSlider::sub-page:horizontal { + background-color: #0078D4; + border-radius: 2px; +} + +QSlider::groove:vertical { + width: 4px; + background-color: #E1DFDD; + border-radius: 2px; +} + +QSlider::handle:vertical { + background-color: #FFFFFF; + border: 2px solid #0078D4; + width: 16px; + height: 16px; + margin: 0 -7px; + border-radius: 8px; +} + +QSlider::sub-page:vertical { + background-color: #0078D4; + border-radius: 2px; +} + +/* === QProgressBar === */ +QProgressBar { + background-color: #E1DFDD; + border: none; + border-radius: 2px; + height: 4px; + text-align: center; + color: transparent; +} + +QProgressBar::chunk { + background-color: #0078D4; + border-radius: 2px; +} + +QProgressBar:disabled { + background-color: #E1DFDD; +} + +/* === QScrollBar === */ +QScrollBar:horizontal { + background-color: transparent; + height: 12px; + margin: 0; +} + +QScrollBar::handle:horizontal { + background-color: #C8C6C4; + min-width: 40px; + border-radius: 6px; + margin: 2px; +} + +QScrollBar::handle:horizontal:hover { + background-color: #A19F9D; +} + +QScrollBar::handle:horizontal:pressed { + background-color: #8A8886; +} + +QScrollBar::add-line:horizontal, +QScrollBar::sub-line:horizontal { + width: 0px; +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal { + background: none; +} + +QScrollBar:vertical { + background-color: transparent; + width: 12px; + margin: 0; +} + +QScrollBar::handle:vertical { + background-color: #C8C6C4; + min-height: 40px; + border-radius: 6px; + margin: 2px; +} + +QScrollBar::handle:vertical:hover { + background-color: #A19F9D; +} + +QScrollBar::handle:vertical:pressed { + background-color: #8A8886; +} + +QScrollBar::add-line:vertical, +QScrollBar::sub-line:vertical { + height: 0px; +} + +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: none; +} + +/* === QTabWidget === */ +QTabWidget::pane { + background-color: #FFFFFF; + border: 1px solid #E1DFDD; + border-radius: 4px; + top: -1px; +} + +QTabBar::tab { + background-color: transparent; + color: #605E5C; + border: none; + border-bottom: 2px solid transparent; + padding: 8px 16px; + margin-right: 4px; +} + +QTabBar::tab:hover { + color: #000000; + background-color: #F9F9F9; + border-bottom: 2px solid #C8C6C4; +} + +QTabBar::tab:selected { + color: #000000; + background-color: #FFFFFF; + border-bottom: 2px solid #0078D4; +} + +QTabBar::tab:disabled { + color: #A19F9D; +} + +/* === QGroupBox === */ +QGroupBox { + background-color: #FFFFFF; + border: 1px solid #E1DFDD; + border-radius: 6px; + margin-top: 12px; + padding-top: 12px; + font-weight: 600; +} + +QGroupBox::title { + subcontrol-origin: margin; + subcontrol-position: top left; + padding: 0 8px; + color: #000000; + background-color: #FFFFFF; +} + +/* === QLabel === */ +QLabel { + background-color: transparent; + color: #000000; +} + +QLabel:disabled { + color: #A19F9D; +} + +/* === QToolButton === */ +QToolButton { + background-color: transparent; + color: #000000; + border: none; + border-radius: 4px; + padding: 6px; +} + +QToolButton:hover { + background-color: #F9F9F9; +} + +QToolButton:pressed { + background-color: #F0F0F0; +} + +QToolButton:checked { + background-color: #0078D4; + color: #FFFFFF; +} + +QToolButton:disabled { + color: #A19F9D; +} + +/* === QMenu === */ +QMenu { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + padding: 4px; +} + +QMenu::item { + background-color: transparent; + padding: 6px 24px 6px 8px; + border-radius: 4px; +} + +QMenu::item:selected { + background-color: #F9F9F9; +} + +QMenu::item:disabled { + color: #A19F9D; +} + +QMenu::separator { + height: 1px; + background-color: #E1DFDD; + margin: 4px 0; +} + +QMenu::icon { + padding-left: 8px; +} + +/* === QMenuBar === */ +QMenuBar { + background-color: #FFFFFF; + color: #000000; + border-bottom: 1px solid #E1DFDD; +} + +QMenuBar::item { + background-color: transparent; + padding: 6px 12px; + border-radius: 4px; +} + +QMenuBar::item:selected { + background-color: #F9F9F9; +} + +QMenuBar::item:pressed { + background-color: #F0F0F0; +} + +/* === QToolBar === */ +QToolBar { + background-color: #FFFFFF; + border: none; + border-bottom: 1px solid #E1DFDD; + spacing: 4px; + padding: 4px; +} + +QToolBar::handle { + background-color: #E1DFDD; + width: 1px; + height: 1px; + margin: 4px; +} + +QToolBar::separator { + background-color: #E1DFDD; + width: 1px; + height: 1px; + margin: 4px; +} + +/* === QStatusBar === */ +QStatusBar { + background-color: #FFFFFF; + color: #605E5C; + border-top: 1px solid #E1DFDD; +} + +QStatusBar::item { + border: none; +} + +/* === QDockWidget === */ +QDockWidget { + background-color: #FFFFFF; + color: #000000; + titlebar-close-icon: url(:/icons/close-light.png); + titlebar-normal-icon: url(:/icons/float-light.png); +} + +QDockWidget::title { + background-color: #FFFFFF; + border: 1px solid #E1DFDD; + padding: 6px; + text-align: left; +} + +QDockWidget::close-button, +QDockWidget::float-button { + background-color: transparent; + border: none; + padding: 4px; +} + +QDockWidget::close-button:hover, +QDockWidget::float-button:hover { + background-color: #F9F9F9; + border-radius: 4px; +} + +/* === QListView & QListWidget === */ +QListView, QListWidget { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + outline: none; +} + +QListView::item, QListWidget::item { + padding: 6px; + border-radius: 4px; +} + +QListView::item:hover, QListWidget::item:hover { + background-color: #F9F9F9; +} + +QListView::item:selected, QListWidget::item:selected { + background-color: #0078D4; + color: #FFFFFF; +} + +QListView::item:disabled, QListWidget::item:disabled { + color: #A19F9D; +} + +/* === QTreeView & QTreeWidget === */ +QTreeView, QTreeWidget { + background-color: #FFFFFF; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + outline: none; + show-decoration-selected: 1; +} + +QTreeView::item, QTreeWidget::item { + padding: 4px; + border-radius: 4px; +} + +QTreeView::item:hover, QTreeWidget::item:hover { + background-color: #F9F9F9; +} + +QTreeView::item:selected, QTreeWidget::item:selected { + background-color: #0078D4; + color: #FFFFFF; +} + +QTreeView::branch, QTreeWidget::branch { + background-color: transparent; +} + +QTreeView::branch:closed:has-children, QTreeWidget::branch:closed:has-children { + image: url(:/icons/branch-closed-light.png); +} + +QTreeView::branch:open:has-children, QTreeWidget::branch:open:has-children { + image: url(:/icons/branch-open-light.png); +} + +/* === QTableView & QTableWidget === */ +QTableView, QTableWidget { + background-color: #FFFFFF; + color: #000000; + gridline-color: #E1DFDD; + border: 1px solid #E1DFDD; + border-radius: 4px; + selection-background-color: #0078D4; +} + +QTableView::item, QTableWidget::item { + padding: 4px; +} + +QTableView::item:hover, QTableWidget::item:hover { + background-color: #F9F9F9; +} + +QTableView::item:selected, QTableWidget::item:selected { + background-color: #0078D4; + color: #FFFFFF; +} + +QHeaderView::section { + background-color: #FFFFFF; + color: #000000; + padding: 6px; + border: none; + border-right: 1px solid #E1DFDD; + border-bottom: 1px solid #E1DFDD; + font-weight: 600; +} + +QHeaderView::section:hover { + background-color: #F9F9F9; +} + +/* === QDialog === */ +QDialog { + background-color: #FFFFFF; +} + +/* === QMessageBox === */ +QMessageBox { + background-color: #FFFFFF; +} + +QMessageBox QLabel { + color: #000000; +} + +/* === QToolTip === */ +QToolTip { + background-color: #F9F9F9; + color: #000000; + border: 1px solid #E1DFDD; + border-radius: 4px; + padding: 4px 8px; +} + +/* === QCalendarWidget === */ +QCalendarWidget { + background-color: #FFFFFF; +} + +QCalendarWidget QToolButton { + color: #000000; + background-color: transparent; + border: none; + border-radius: 4px; + padding: 4px; +} + +QCalendarWidget QToolButton:hover { + background-color: #F9F9F9; +} + +QCalendarWidget QMenu { + background-color: #FFFFFF; +} + +QCalendarWidget QSpinBox { + background-color: #FFFFFF; + color: #000000; + selection-background-color: #0078D4; +} + +QCalendarWidget QAbstractItemView { + background-color: #FFFFFF; + color: #000000; + selection-background-color: #0078D4; + selection-color: #FFFFFF; +} + +/* === QSplitter === */ +QSplitter::handle { + background-color: #E1DFDD; +} + +QSplitter::handle:hover { + background-color: #0078D4; +} + +QSplitter::handle:horizontal { + width: 1px; +} + +QSplitter::handle:vertical { + height: 1px; +} + +/* === Custom Classes === */ +.accent-button { + background-color: #0078D4; + color: #FFFFFF; + border: none; +} + +.accent-button:hover { + background-color: #106EBE; +} + +.accent-button:pressed { + background-color: #005A9E; +} + +.danger-button { + background-color: #C42B1C; + color: #FFFFFF; + border: none; +} + +.danger-button:hover { + background-color: #A52314; +} + +.success-button { + background-color: #107C10; + color: #FFFFFF; + border: none; +} + +.success-button:hover { + background-color: #0E6B0E; +} + +.card { + background-color: #FFFFFF; + border: 1px solid #E1DFDD; + border-radius: 8px; + padding: 16px; +} + +.surface { + background-color: #FFFFFF; + border: 1px solid #E1DFDD; +} + +.divider { + background-color: #E1DFDD; + min-height: 1px; + max-height: 1px; +} + +.secondary-text { + color: #605E5C; +} + +.disabled-text { + color: #A19F9D; +} \ No newline at end of file