From 7e1c8418c55f98cb6f781562114975515e8f0153 Mon Sep 17 00:00:00 2001 From: talksik Date: Sat, 24 Jan 2026 11:21:31 -0800 Subject: [PATCH] chore: spike on qt widgets and ui files --- CMakeLists.txt | 4 +- CMakeLists.txt.user | 460 ++++++++++++++++++++++++++++++++++++ main.cpp | 8 + src/MainWindow.cpp | 181 ++------------ src/MainWindow.h | 20 +- src/mainwindow.ui | 146 ++++++++++++ styles/remarkable.qss | 533 ++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 1172 insertions(+), 180 deletions(-) create mode 100644 CMakeLists.txt.user create mode 100644 src/mainwindow.ui create mode 100644 styles/remarkable.qss diff --git a/CMakeLists.txt b/CMakeLists.txt index 82cf415..79a4abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,7 +8,6 @@ find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets - SvgWidgets ) qt_standard_project_setup(REQUIRES 6.8) @@ -19,6 +18,7 @@ qt_add_executable(llink src/MainWindow.h src/VerticalLabel.cpp src/VerticalLabel.h + src/mainwindow.ui ) qt_add_resources(llink @@ -27,6 +27,7 @@ qt_add_resources(llink assets/icons/mono/basic/menu.svg assets/icons/mono/basic/plus.svg assets/logo.png + styles/remarkable.qss ) # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1. @@ -45,7 +46,6 @@ target_link_libraries(llink Qt6::Core Qt6::Gui Qt6::Widgets - Qt6::SvgWidgets ) include(GNUInstallDirs) diff --git a/CMakeLists.txt.user b/CMakeLists.txt.user new file mode 100644 index 0000000..f2a6217 --- /dev/null +++ b/CMakeLists.txt.user @@ -0,0 +1,460 @@ + + + + + + EnvironmentId + {1354daad-1138-41d2-985c-27357b7ee48a} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + true + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 0 + 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 + 5 + true + + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Qt 6.8.6 for macOS + Qt 6.8.6 for macOS + qt.qt6.686.clang_64_kit + 0 + 0 + 0 + + Debug + 2 + false + + -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DCMAKE_BUILD_TYPE:STRING=Debug +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} + 0 + /Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Debug + + + + + all + + false + + true + Build + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + Build + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + CMakeProjectManager.CMakeBuildConfiguration + + + Release + 2 + false + + -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DCMAKE_BUILD_TYPE:STRING=Release +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} + /Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Release + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + CMakeProjectManager.CMakeBuildConfiguration + + + RelWithDebInfo + 2 + false + + -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} + /Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-RelWithDebInfo + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release with Debug Information + CMakeProjectManager.CMakeBuildConfiguration + + + RelWithDebInfo + 2 + false + + -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} + 0 + /Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-Profile + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + CMakeProjectManager.CMakeBuildConfiguration + + + MinSizeRel + 2 + false + + -DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=%{BuildConfig:BuildDirectory:NativeFilePath}/.qtc/package-manager/auto-setup.cmake +-DCMAKE_BUILD_TYPE:STRING=MinSizeRel +-DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX} +-DCMAKE_GENERATOR:STRING=Ninja +-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON +-DCMAKE_C_COMPILER:FILEPATH=%{Compiler:Executable:C} +-DCMAKE_CXX_COMPILER:FILEPATH=%{Compiler:Executable:Cxx} +-DCMAKE_CXX_FLAGS_INIT:STRING=%{Qt:QML_DEBUG_FLAG} +-DQT_QMAKE_EXECUTABLE:FILEPATH=%{Qt:qmakeExecutable} + /Users/talksik/Documents/code/llink/build/Qt_6_8_6_for_macOS-MinSizeRel + + + + + all + + false + + true + CMakeProjectManager.MakeStep + + 1 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + + + clean + + false + + true + CMakeProjectManager.MakeStep + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Minimum Size Release + CMakeProjectManager.CMakeBuildConfiguration + + 5 + + + 0 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + + + + + + + + false + + true + ApplicationManagerPlugin.Deploy.CMakePackageStep + + + install-package --acknowledge + true + Install Application Manager package + ApplicationManagerPlugin.Deploy.InstallPackageStep + + + + + + + + 2 + Deploy + Deploy + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ApplicationManagerPlugin.Deploy.Configuration + + 2 + + true + true + 0 + true + + 2 + + false + -e cpu-cycles --call-graph dwarf,4096 -F 250 + + ProjectExplorer.CustomExecutableRunConfiguration + + false + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/main.cpp b/main.cpp index ca08276..f7a480c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,5 @@ #include +#include #include "src/MainWindow.h" int main(int argc, char *argv[]) @@ -6,6 +7,13 @@ int main(int argc, char *argv[]) qDebug() << "hello world"; QApplication a(argc, argv); + // Load reMarkable e-ink stylesheet + QFile styleFile(":/styles/remarkable.qss"); + if (styleFile.open(QFile::ReadOnly | QFile::Text)) { + a.setStyleSheet(styleFile.readAll()); + styleFile.close(); + } + MainWindow w; w.show(); return a.exec(); diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 2d5ce1c..a40420c 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -3,182 +3,34 @@ // #include "MainWindow.h" -#include -#include -#include -#include -#include -#include -#include #include #include #include -#include "VerticalLabel.h" - +#include "ui_mainwindow.h" +#include MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), m_trayIcon(nullptr) { - this->setAttribute(Qt::WA_TranslucentBackground, true); - this->setAttribute(Qt::WA_AcceptTouchEvents, true); - this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::Tool); - this->resize(QSize(150, 200)); + ui = new Ui::MainWindow; + ui->setupUi(this); + QWidget *widget = new QWidget(this); + ui->tabWidget->addTab(widget, "Flowy Labs, Inc"); - QWidget *centralWidget = new QWidget(this); - centralWidget->setObjectName("glass"); - centralWidget->setStyleSheet(R"( - #glass { - background: rgba(25, 25, 25, 0.2); - border: none; - border-radius: 0px; - } - #glass:hover { - background: rgba(25, 25, 25, 0.5); - border: none; - border-radius: 0px; - } - QLabel { - color: rgba(255, 255, 255, 0.9); - } - QToolButton { - background: transparent; - border: none; - border-radius: 4px; - padding: 4px; - } - QToolButton:hover { - background: rgba(255, 255, 255, 0.1); - } - )"); + connect(ui->pushButton, &QPushButton::clicked, this, [this]() { + qDebug() << "Button clicked for signing on"; + // TODO: this would make some other calls, and then + // we listen to another signal from some service/underlying model + // when auth state changes + // And then we can hide the UI or change the stackview + ui->tabWidget->setCurrentIndex(1); - QHBoxLayout *mainLayout = new QHBoxLayout(centralWidget); - mainLayout->setContentsMargins(0, 0, 0, 0); - mainLayout->setSpacing(0); - - // Left sidebar - slim vertical strip - QVBoxLayout *sidebarLayout = new QVBoxLayout(); - sidebarLayout->setContentsMargins(2, 4, 2, 4); - sidebarLayout->setSpacing(4); - - m_handleBar = new QSvgWidget(QStringLiteral(":/assets/icons/mono/basic/menu.svg"), centralWidget); - m_handleBar->setFixedSize(QSize(16, 16)); - m_handleBar->setCursor(Qt::OpenHandCursor); - - // Rotated 90° "STREAMS" label - VerticalLabel *label = new VerticalLabel("STREAMS", centralWidget); - label->setStyleSheet("font-weight: bold; font-size: 10px; letter-spacing: 2px; color: rgba(255, 255, 255, 0.9);"); - - QToolButton *addButton = new QToolButton(centralWidget); - connect(addButton, &QToolButton::clicked, this, []() { - qDebug() << "addButtonClicked"; + // we can call some other method to initialize some data whenever we are done logging in + // the complexity of this flow in qml is similar but just less imperative, more declarative + // managing the ui is technically more work, but not once we get used to it, perhaps. }); - addButton->setIcon(QIcon(QStringLiteral(":/assets/icons/mono/basic/plus.svg"))); - addButton->setFixedSize(16, 16); - addButton->setIconSize(QSize(12, 12)); - - sidebarLayout->addWidget(m_handleBar, 0, Qt::AlignHCenter); - sidebarLayout->addWidget(label, 1, Qt::AlignHCenter); - sidebarLayout->addWidget(addButton, 0, Qt::AlignHCenter); - - // Vertical separator - QFrame *separator = new QFrame(centralWidget); - separator->setStyleSheet("background-color: rgba(255, 255, 255, 0.1);"); - separator->setFrameShape(QFrame::VLine); - separator->setFixedWidth(1); - - // Right side with list - QVBoxLayout *contentLayout = new QVBoxLayout(); - contentLayout->setContentsMargins(0, 0, 0, 0); - contentLayout->setSpacing(0); - - QListWidget *listWidget = new QListWidget(centralWidget); - listWidget->addItems(QStringList{ - "[j,a] what are we going to...", - "[p] going to it", - "[p, f] change the ui", - "[d,j,k] drop off the money", - }); - listWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - QListWidgetItem *item = new QListWidgetItem(listWidget); - item->setCheckState(Qt::Checked); - item->setText("do this"); - listWidget->setStyleSheet(R"( - QListWidget { - background: transparent; - border: none; - color: white; - font-size: 14px; - outline: none; - } - QListWidget::item { - padding: 2px; - border-radius: 0px; - margin: 2px 0px; - } - QListWidget::item:hover { - background: rgba(255, 255, 255, 0.1); - } - QListWidget::item:selected { - background: rgba(255, 255, 255, 0.15); - } - )"); - listWidget->viewport()->setStyleSheet("background: transparent;"); - - QLabel *actionLabel = new QLabel("Hold space"); - actionLabel->setStyleSheet("color: lightgrey;"); - actionLabel->setAlignment(Qt::AlignHCenter); - - contentLayout->addWidget(listWidget); - contentLayout->addWidget(actionLabel); - - mainLayout->addLayout(sidebarLayout); - mainLayout->addWidget(separator); - mainLayout->addLayout(contentLayout, 1); - - const QScreen *screen = QGuiApplication::primaryScreen(); - const QRect screenSize = screen->geometry(); - qDebug() << "Width of window: " << this->width(); - qDebug() << "Height of window: " << this->height(); - - int x = screenSize.left(); - int y = (screenSize.bottom() / 2) - (this->height() / 2); - this->move(x, y); - - this->setCentralWidget(centralWidget); - setupTrayIcon(); } -void MainWindow::resizeEvent(QResizeEvent *event) -{ - QMainWindow::resizeEvent(event); // Let layout finish first -} - -void MainWindow::mousePressEvent(QMouseEvent *event) -{ - if (event->button() == Qt::LeftButton && m_handleBar->geometry().contains(event->pos())) - { - dragging = true; - dragPosition = event->globalPosition().toPoint() - frameGeometry().topLeft(); - setCursor(Qt::ClosedHandCursor); - event->accept(); - } -} - -void MainWindow::mouseMoveEvent(QMouseEvent *event) -{ - if (dragging && (event->buttons() & Qt::LeftButton)) - { - move(event->globalPosition().toPoint() - dragPosition); - event->accept(); - } -} - -void MainWindow::mouseReleaseEvent(QMouseEvent *event) -{ - dragging = false; - unsetCursor(); -} - void MainWindow::setupTrayIcon() { m_trayIcon = new QSystemTrayIcon(this); @@ -201,4 +53,5 @@ void MainWindow::setupTrayIcon() MainWindow::~MainWindow() { + delete ui; } diff --git a/src/MainWindow.h b/src/MainWindow.h index 5c7a08e..d6097f2 100644 --- a/src/MainWindow.h +++ b/src/MainWindow.h @@ -8,10 +8,13 @@ #include QT_BEGIN_NAMESPACE -class QSvgWidget; class QSystemTrayIcon; QT_END_NAMESPACE +namespace Ui { +class MainWindow; +} + class MainWindow : public QMainWindow { Q_OBJECT @@ -21,22 +24,11 @@ public: ~MainWindow(); -protected: - void resizeEvent(QResizeEvent *event) override; - - void mousePressEvent(QMouseEvent *event) override; - - void mouseMoveEvent(QMouseEvent *event) override; - - void mouseReleaseEvent(QMouseEvent *event) override; - private: void setupTrayIcon(); - QSvgWidget *m_handleBar; QSystemTrayIcon *m_trayIcon; - QPoint dragPosition; - bool dragging = false; + Ui::MainWindow *ui; }; -#endif //LLINK_MAINWINDOW_H \ No newline at end of file +#endif //LLINK_MAINWINDOW_H diff --git a/src/mainwindow.ui b/src/mainwindow.ui new file mode 100644 index 0000000..3544510 --- /dev/null +++ b/src/mainwindow.ui @@ -0,0 +1,146 @@ + + + MainWindow + + + + 0 + 0 + 800 + 598 + + + + Flowy.llink + + + + + + 0 + 0 + 801 + 541 + + + + 0 + + + + Sign in + + + + + 250 + 150 + 291 + 151 + + + + QFrame::Shape::StyledPanel + + + QFrame::Shadow::Raised + + + + + 20 + 30 + 251 + 21 + + + + + + + 20 + 80 + 71 + 21 + + + + + + + 20 + 10 + 58 + 16 + + + + Email + + + + + + 20 + 60 + 58 + 16 + + + + Code + + + + + + 20 + 110 + 101 + 32 + + + + Continue + + + false + + + true + + + false + + + + + + + App + + + + + 110 + 40 + 551 + 401 + + + + + + + + + + 0 + 0 + + + + + + + diff --git a/styles/remarkable.qss b/styles/remarkable.qss new file mode 100644 index 0000000..5694863 --- /dev/null +++ b/styles/remarkable.qss @@ -0,0 +1,533 @@ +/* + * reMarkable E-Ink Aesthetic + * Minimalist, paper-like design inspired by reMarkable tablet + */ + +/* Color Palette: + * Paper: #FAFAF8 (warm off-white) + * Ink: #1A1A1A (soft black) + * Muted: #6B6B6B (gray for secondary text) + * Border: #D4D4D4 (subtle gray) + * Hover: #F0F0EE (slightly darker paper) + * Pressed: #E5E5E3 (pressed state) + */ + +/* Base Widget - Paper background */ +QWidget { + background-color: #FAFAF8; + color: #1A1A1A; + font-family: "SF Pro Text", "Helvetica Neue", "Segoe UI", sans-serif; + font-size: 13px; +} + +QMainWindow { + background-color: #FAFAF8; +} + +/* Labels */ +QLabel { + background-color: transparent; + color: #1A1A1A; + padding: 2px; +} + +QLabel:disabled { + color: #6B6B6B; +} + +/* Push Buttons - Minimalist ink style */ +QPushButton { + background-color: #FAFAF8; + color: #1A1A1A; + border: 1px solid #1A1A1A; + padding: 8px 16px; + border-radius: 2px; + font-weight: 500; +} + +QPushButton:hover { + background-color: #F0F0EE; +} + +QPushButton:pressed { + background-color: #1A1A1A; + color: #FAFAF8; +} + +QPushButton:disabled { + background-color: #FAFAF8; + color: #A0A0A0; + border-color: #D4D4D4; +} + +QPushButton:flat { + border: none; + background-color: transparent; +} + +QPushButton:flat:hover { + background-color: #F0F0EE; +} + +/* Primary/Default Button - Filled ink style */ +QPushButton:default { + background-color: #1A1A1A; + color: #FAFAF8; +} + +QPushButton:default:hover { + background-color: #333333; +} + +QPushButton:default:pressed { + background-color: #000000; +} + +/* Line Edit - Clean input fields */ +QLineEdit { + background-color: #FFFFFF; + color: #1A1A1A; + border: 1px solid #D4D4D4; + border-bottom: 1px solid #1A1A1A; + border-radius: 0px; + padding: 8px; + selection-background-color: #1A1A1A; + selection-color: #FAFAF8; +} + +QLineEdit:focus { + border: 1px solid #1A1A1A; +} + +QLineEdit:disabled { + background-color: #F5F5F5; + color: #A0A0A0; + border-color: #E0E0E0; +} + +QLineEdit::placeholder { + color: #A0A0A0; +} + +/* Text Edit / Plain Text Edit */ +QTextEdit, QPlainTextEdit { + background-color: #FFFFFF; + color: #1A1A1A; + border: 1px solid #D4D4D4; + border-radius: 2px; + padding: 8px; + selection-background-color: #1A1A1A; + selection-color: #FAFAF8; +} + +QTextEdit:focus, QPlainTextEdit:focus { + border-color: #1A1A1A; +} + +/* Tab Widget - Paper notebook style */ +QTabWidget::pane { + background-color: #FAFAF8; + border: 1px solid #D4D4D4; + border-top: none; +} + +QTabBar::tab { + background-color: #F0F0EE; + color: #6B6B6B; + border: 1px solid #D4D4D4; + border-bottom: none; + padding: 8px 16px; + margin-right: 2px; +} + +QTabBar::tab:selected { + background-color: #FAFAF8; + color: #1A1A1A; + border-bottom: 1px solid #FAFAF8; +} + +QTabBar::tab:hover:!selected { + background-color: #E5E5E3; +} + +/* Scroll Bars - Thin and minimal */ +QScrollBar:vertical { + background-color: #FAFAF8; + width: 8px; + margin: 0px; +} + +QScrollBar::handle:vertical { + background-color: #C0C0C0; + border-radius: 4px; + min-height: 30px; +} + +QScrollBar::handle:vertical:hover { + background-color: #A0A0A0; +} + +QScrollBar::handle:vertical:pressed { + background-color: #6B6B6B; +} + +QScrollBar::add-line:vertical, +QScrollBar::sub-line:vertical { + height: 0px; +} + +QScrollBar::add-page:vertical, +QScrollBar::sub-page:vertical { + background: none; +} + +QScrollBar:horizontal { + background-color: #FAFAF8; + height: 8px; + margin: 0px; +} + +QScrollBar::handle:horizontal { + background-color: #C0C0C0; + border-radius: 4px; + min-width: 30px; +} + +QScrollBar::handle:horizontal:hover { + background-color: #A0A0A0; +} + +QScrollBar::add-line:horizontal, +QScrollBar::sub-line:horizontal { + width: 0px; +} + +QScrollBar::add-page:horizontal, +QScrollBar::sub-page:horizontal { + background: none; +} + +/* Menu Bar */ +QMenuBar { + background-color: #FAFAF8; + color: #1A1A1A; + border-bottom: 1px solid #D4D4D4; + padding: 2px; +} + +QMenuBar::item { + background-color: transparent; + padding: 6px 12px; +} + +QMenuBar::item:selected { + background-color: #F0F0EE; +} + +QMenuBar::item:pressed { + background-color: #E5E5E3; +} + +/* Menus */ +QMenu { + background-color: #FAFAF8; + color: #1A1A1A; + border: 1px solid #D4D4D4; + padding: 4px 0px; +} + +QMenu::item { + padding: 8px 32px 8px 16px; +} + +QMenu::item:selected { + background-color: #1A1A1A; + color: #FAFAF8; +} + +QMenu::item:disabled { + color: #A0A0A0; +} + +QMenu::separator { + height: 1px; + background-color: #D4D4D4; + margin: 4px 8px; +} + +/* Tool Bar */ +QToolBar { + background-color: #FAFAF8; + border: none; + border-bottom: 1px solid #D4D4D4; + padding: 4px; + spacing: 4px; +} + +QToolBar::separator { + width: 1px; + background-color: #D4D4D4; + margin: 4px 8px; +} + +QToolButton { + background-color: transparent; + border: none; + padding: 6px; + border-radius: 2px; +} + +QToolButton:hover { + background-color: #F0F0EE; +} + +QToolButton:pressed { + background-color: #E5E5E3; +} + +/* Combo Box */ +QComboBox { + background-color: #FAFAF8; + color: #1A1A1A; + border: 1px solid #D4D4D4; + border-radius: 2px; + padding: 6px 12px; + padding-right: 24px; +} + +QComboBox:hover { + border-color: #1A1A1A; +} + +QComboBox::drop-down { + border: none; + width: 20px; +} + +QComboBox::down-arrow { + image: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 5px solid #1A1A1A; + margin-right: 8px; +} + +QComboBox QAbstractItemView { + background-color: #FAFAF8; + border: 1px solid #D4D4D4; + selection-background-color: #1A1A1A; + selection-color: #FAFAF8; +} + +/* Check Box */ +QCheckBox { + spacing: 8px; +} + +QCheckBox::indicator { + width: 16px; + height: 16px; + border: 1px solid #1A1A1A; + border-radius: 2px; + background-color: #FAFAF8; +} + +QCheckBox::indicator:hover { + background-color: #F0F0EE; +} + +QCheckBox::indicator:checked { + background-color: #1A1A1A; + image: none; +} + +QCheckBox::indicator:checked:after { + content: ""; +} + +QCheckBox:disabled { + color: #A0A0A0; +} + +QCheckBox::indicator:disabled { + border-color: #D4D4D4; +} + +/* Radio Button */ +QRadioButton { + spacing: 8px; +} + +QRadioButton::indicator { + width: 16px; + height: 16px; + border: 1px solid #1A1A1A; + border-radius: 8px; + background-color: #FAFAF8; +} + +QRadioButton::indicator:hover { + background-color: #F0F0EE; +} + +QRadioButton::indicator:checked { + background-color: #FAFAF8; + border: 5px solid #1A1A1A; +} + +/* Spin Box */ +QSpinBox, QDoubleSpinBox { + background-color: #FAFAF8; + color: #1A1A1A; + border: 1px solid #D4D4D4; + border-radius: 2px; + padding: 4px 8px; +} + +QSpinBox:focus, QDoubleSpinBox:focus { + border-color: #1A1A1A; +} + +QSpinBox::up-button, QDoubleSpinBox::up-button, +QSpinBox::down-button, QDoubleSpinBox::down-button { + background-color: transparent; + border: none; + width: 16px; +} + +QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover, +QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover { + background-color: #F0F0EE; +} + +/* Slider */ +QSlider::groove:horizontal { + height: 2px; + background-color: #D4D4D4; + border-radius: 1px; +} + +QSlider::handle:horizontal { + background-color: #1A1A1A; + width: 14px; + height: 14px; + margin: -6px 0px; + border-radius: 7px; +} + +QSlider::handle:horizontal:hover { + background-color: #333333; +} + +QSlider::groove:vertical { + width: 2px; + background-color: #D4D4D4; + border-radius: 1px; +} + +QSlider::handle:vertical { + background-color: #1A1A1A; + width: 14px; + height: 14px; + margin: 0px -6px; + border-radius: 7px; +} + +/* Progress Bar */ +QProgressBar { + background-color: #F0F0EE; + border: 1px solid #D4D4D4; + border-radius: 2px; + height: 8px; + text-align: center; +} + +QProgressBar::chunk { + background-color: #1A1A1A; + border-radius: 1px; +} + +/* Group Box */ +QGroupBox { + border: 1px solid #D4D4D4; + border-radius: 2px; + margin-top: 12px; + padding-top: 8px; +} + +QGroupBox::title { + subcontrol-origin: margin; + subcontrol-position: top left; + padding: 0px 8px; + color: #6B6B6B; + font-weight: 500; +} + +/* List/Tree/Table Views */ +QListView, QTreeView, QTableView { + background-color: #FAFAF8; + color: #1A1A1A; + border: 1px solid #D4D4D4; + border-radius: 2px; + alternate-background-color: #F5F5F3; + selection-background-color: #1A1A1A; + selection-color: #FAFAF8; +} + +QListView::item, QTreeView::item, QTableView::item { + padding: 6px; +} + +QListView::item:hover, QTreeView::item:hover, QTableView::item:hover { + background-color: #F0F0EE; +} + +QListView::item:selected, QTreeView::item:selected, QTableView::item:selected { + background-color: #1A1A1A; + color: #FAFAF8; +} + +QHeaderView::section { + background-color: #F0F0EE; + color: #1A1A1A; + border: none; + border-right: 1px solid #D4D4D4; + border-bottom: 1px solid #D4D4D4; + padding: 8px; + font-weight: 500; +} + +/* Tooltip */ +QToolTip { + background-color: #1A1A1A; + color: #FAFAF8; + border: none; + padding: 6px 10px; +} + +/* Status Bar */ +QStatusBar { + background-color: #FAFAF8; + border-top: 1px solid #D4D4D4; + color: #6B6B6B; +} + +/* Dialog */ +QDialog { + background-color: #FAFAF8; +} + +/* Frame */ +QFrame { + background-color: transparent; +} + +QFrame[frameShape="4"], /* HLine */ +QFrame[frameShape="5"] /* VLine */ { + background-color: #D4D4D4; +} + +/* Stacked Widget */ +QStackedWidget { + background-color: #FAFAF8; +}