diff --git a/CMakeLists.txt b/CMakeLists.txt index 57cae1a..a52e66d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,5 +1,12 @@ cmake_minimum_required(VERSION 3.16) -project(nepdate VERSION 2.0.2 LANGUAGES CXX) + +# Read version from VERSION.txt +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/resources/VERSION.txt" VERSION_CONTENTS) +string(STRIP "${VERSION_CONTENTS}" APP_VERSION) + +# Project definition +project(nepdate VERSION ${APP_VERSION} LANGUAGES CXX) + set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) @@ -11,7 +18,7 @@ elseif (UNIX AND NOT APPLE) message(STATUS "Configuring for Linux") endif() -# Try to find the highest available version of Qt (Qt7, Qt6, or Qt5) +# Find Qt version find_package(Qt6 QUIET COMPONENTS Widgets Gui Core) if (NOT Qt6_FOUND) find_package(Qt5 QUIET COMPONENTS Widgets Gui Core) @@ -41,16 +48,15 @@ function(add_nepdate_executable target_name sources headers forms resources) endif() endfunction() -### nepdate-widget executable ### -# Collect nepdate-widget sources +# Define nepdate-widget executable + set(NEPDATE_WIDGET_SOURCES main.cpp mainwindow.cpp calendarwindow.cpp ) -# Collect nepdate-widget headers set(NEPDATE_WIDGET_HEADERS mainwindow.h bikram.h @@ -59,30 +65,29 @@ set(NEPDATE_WIDGET_HEADERS calendarwindow.h ) -# Collect nepdate-widget forms set(NEPDATE_WIDGET_FORMS mainwindow.ui calendarwindow.ui ) -# Collect nepdate-widget resources set(NEPDATE_WIDGET_RESOURCES resources.qrc ) -# Create nepdate-widget executable -add_nepdate_executable(nepdate-widget "${NEPDATE_WIDGET_SOURCES}" "${NEPDATE_WIDGET_HEADERS}" "${NEPDATE_WIDGET_FORMS}" "${NEPDATE_WIDGET_RESOURCES}") -### nepdate-calendar executable ### +add_nepdate_executable(nepdate_widget "${NEPDATE_WIDGET_SOURCES}" "${NEPDATE_WIDGET_HEADERS}" "${NEPDATE_WIDGET_FORMS}" "${NEPDATE_WIDGET_RESOURCES}") -# Collect nepdate-calendar sources + +# Set the output name to nepdate-widget +set_target_properties(nepdate_widget PROPERTIES OUTPUT_NAME nepdate-widget) + +# Define nepdate-calendar executable set(NEPDATE_CALENDAR_SOURCES main_calendar.cpp calendarwindow.cpp mainwindow.cpp ) -# Collect nepdate-calendar headers set(NEPDATE_CALENDAR_HEADERS calendarwindow.h DayTithiWidget.h @@ -91,16 +96,16 @@ set(NEPDATE_CALENDAR_HEADERS mainwindow.h ) -# Collect nepdate-calendar forms set(NEPDATE_CALENDAR_FORMS calendarwindow.ui mainwindow.ui ) -# Collect nepdate-calendar resources set(NEPDATE_CALENDAR_RESOURCES resources.qrc ) -# Create nepdate-calendar executable -add_nepdate_executable(nepdate-calendar "${NEPDATE_CALENDAR_SOURCES}" "${NEPDATE_CALENDAR_HEADERS}" "${NEPDATE_CALENDAR_FORMS}" "${NEPDATE_CALENDAR_RESOURCES}") +add_nepdate_executable(nepdate_calendar "${NEPDATE_CALENDAR_SOURCES}" "${NEPDATE_CALENDAR_HEADERS}" "${NEPDATE_CALENDAR_FORMS}" "${NEPDATE_CALENDAR_RESOURCES}") + +# Set the output name to nepdate-calendar +set_target_properties(nepdate_calendar PROPERTIES OUTPUT_NAME nepdate_calendar) diff --git a/calendarwindow.cpp b/calendarwindow.cpp index 0b43d44..7147f55 100755 --- a/calendarwindow.cpp +++ b/calendarwindow.cpp @@ -32,6 +32,12 @@ CalendarWindow::CalendarWindow(QWidget *parent) : qApp->setStyleSheet(styleSheet); file.close(); } + + int fontId = QFontDatabase::addApplicationFont(":/resources/Laila-Medium.ttf"); + QString fontFamily = QFontDatabase::applicationFontFamilies(fontId).at(0); + QFont appFont(fontFamily); + CalendarWindow::setFont(appFont); + // Initialize current date to today's date QDate currentDate = QDate::currentDate(); // Populate AD combo boxes @@ -75,8 +81,7 @@ CalendarWindow::CalendarWindow(QWidget *parent) : QString bsMonthName = getBikramMonthName(bsMonth); QString tithiName = QString::fromStdString(tithi[(int)panchang.tithi_index]); QString paksha = QString::fromStdString(panchang.paksha); - QString tithipaksha = QString("%1 %2").arg(paksha).arg(tithiName); - + QString tithipaksha = QString("%1 %2").arg(paksha).arg(tithiName); // Set current date in BS combo boxes ui->yearselectBS->setCurrentText(QString::number(bsYear)); @@ -290,17 +295,17 @@ void CalendarWindow::showAbout() { } QString aboutText = QString(R"( -
-

About

-

Nepali Calendar

-

Author: khumnath

-

Version: %1

-

This application is written in C++ and Qt framework. For more information, visit my - GitHub page. +

+

Nepali Calendar

+

Author: khumnath

+

Version: %1

+

This application is written in C++ and the Qt framework. For more information, visit my + GitHub page.

)").arg(version); QMessageBox msgBox(QMessageBox::Information, "About", aboutText, QMessageBox::Ok, this); + msgBox.setTextFormat(Qt::RichText); msgBox.exec(); } @@ -443,10 +448,35 @@ void CalendarWindow::updateBsDateFromAd(int year, int month, int day) { // Populate BS day combo box based on current month and year populateBsDays(bsYear, bsMonth); - + //QDate currentDate = QDate::currentDate(); int bsDaysInMonth = converter.daysInMonth(bsYear, bsMonth); - ui->output->setText(QString("विक्रम सम्वत मा परिवर्तन गरियो: %1 %2 %3 गते %5 \n%2 %1 मा जम्मा दिन सङ्ख्या: %4") - .arg(convertToNepaliNumerals(bsYear)).arg(bsMonthName).arg(convertToNepaliNumerals(bsDay)).arg(convertToNepaliNumerals(bsDaysInMonth)).arg(tithipaksha)); + QDate bsDate(bsYear, bsMonth, bsDay); + // Get the current AD (Gregorian) system date + QDate systemDate = QDate::currentDate(); + + // Retrieve the selected AD date from combo boxes + int selectedAdYear = ui->yearselectAD->currentText().toInt(); + int selectedAdMonth = ui->monthselectAD->currentIndex() + 1; // Adjust index + int selectedAdDay = ui->dayselectAD->currentText().toInt(); + QDate selectedAdDate(selectedAdYear, selectedAdMonth, selectedAdDay); + + // Check if the selected AD date matches the current system date + if (selectedAdDate == systemDate) { + ui->output->setText(QString("आज: बिक्रम सम्वत: %1 %2 %3 गते %5\n %2 %1 मा जम्मा दिन सङ्ख्या: %4") + .arg(convertToNepaliNumerals(bsYear)) + .arg(bsMonthName) + .arg(convertToNepaliNumerals(bsDay)) + .arg(convertToNepaliNumerals(bsDaysInMonth)) + .arg(tithipaksha)); + } else { + ui->output->setText(QString("विक्रम सम्वत मा परिवर्तन गरियो: %1 %2 %3 गते %5\n %2 %1 मा जम्मा दिन सङ्ख्या: %4") + .arg(convertToNepaliNumerals(bsYear)) + .arg(bsMonthName) + .arg(convertToNepaliNumerals(bsDay)) + .arg(convertToNepaliNumerals(bsDaysInMonth)) + .arg(tithipaksha)); + } + diff --git a/mainwindow.cpp b/mainwindow.cpp index 28d63c9..248bffd 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #ifdef Q_OS_WIN #include #endif @@ -42,34 +43,51 @@ std::string MainWindow::getWeekdayName(int year, int month, int day) { } MainWindow::MainWindow(QWidget *parent) : - QMainWindow(parent), ui(new Ui::MainWindow), isDragging(true), calendarWindow(nullptr) + QMainWindow(parent), ui(new Ui::MainWindow), calendarWindow(nullptr), isDragging(false), dragStarted(false) { ui->setupUi(this); + this->installEventFilter(this); ui->dateButton->installEventFilter(this); - QString globalStyleSheet = R"( + // Initialize timer for distinguishing between click and drag + dragDelayTimer = new QTimer(this); + dragDelayTimer->setSingleShot(true); + connect(dragDelayTimer, &QTimer::timeout, this, [this]() { + if (isDragging) { + dragStarted = true; + } + }); + setMouseTracking(true); + + QString tooltipstyle = R"( QToolTip { background-color: white; color: black; border: 1px solid gray; border-radius: 5px; } )"; + setStyleSheet(tooltipstyle); - setStyleSheet(globalStyleSheet); - - + int fontId = QFontDatabase::addApplicationFont(":/resources/Laila-Medium.ttf"); + QString fontFamily = QFontDatabase::applicationFontFamilies(fontId).at(0); + QFont appFont(fontFamily); + QFont dateButtonFont(fontFamily, 14); // To Do: set text size from setting menu */ + ui->dateButton->setFont(dateButtonFont); updateTimer = new QTimer(this); connect(updateTimer, &QTimer::timeout, this, [=]() { updateDateButton(); adjustTextColorBasedOnBackground(); + }); updateTimer->start(1000); - setWindowFlags(Qt::Tool | Qt::Window | Qt::FramelessWindowHint | Qt::BypassWindowManagerHint | Qt::WindowDoesNotAcceptFocus); + setWindowFlags(Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::BypassWindowManagerHint | Qt::WindowDoesNotAcceptFocus); setMouseTracking(true); setAttribute(Qt::WA_TranslucentBackground); setWindowPosition(); setupDefaultDate(); + this->setWindowFlag(Qt::Tool); + // Platform-specific code to ensure the window stays on top #ifdef Q_OS_X11 @@ -145,7 +163,7 @@ int MainWindow::cnvToNepali(int mm, int dd, int yy) { Panchang panchang(julianDate); QString tithiName = QString::fromStdString(tithi[(int)panchang.tithi_index]); QString paksha = QString::fromStdString(panchang.paksha); - QString tithipaksha = QString("%1 %2").arg(paksha).arg(tithiName); + QString tithipaksha = QString("%1 %2").arg(paksha, tithiName); // Construct the Nepali date format string QString nepaliFormat = QString::number(nepaliYear) + " " + @@ -167,45 +185,70 @@ int MainWindow::cnvToNepali(int mm, int dd, int yy) { // Set the Nepali formatted date to the button text and tooltip ui->dateButton->setText(nepaliFormat); ui->dateButton->setToolTipDuration(3000); - QFont tooltipFont("Noto Sans Devanagari", 12); // Replace "Noto Sans Devnagari" with the name of your desired font + QFont tooltipFont("Laila", 12); // Replace "Noto Sans Devnagari" with the name of your desired font QToolTip::setFont(tooltipFont); - ui->dateButton->setToolTip(nepalitooltip); + ui->dateButton->setToolTip(nepalitooltip); adjustTextColorBasedOnBackground(); - - return 0; } // The event filter to handle tooltip display bool MainWindow::eventFilter(QObject *watched, QEvent *event) { + // Handle dragging for the entire window + if (event->type() == QEvent::MouseButtonPress) { + QMouseEvent *mouseEvent = static_cast(event); + if (mouseEvent->button() == Qt::LeftButton) { + isDragging = true; + dragStartPosition = mouseEvent->globalPosition().toPoint() - pos(); + dragDelayTimer->start(200); + event->accept(); + } + } else if (event->type() == QEvent::MouseMove) { + if (isDragging && dragDelayTimer->isActive()) { + QPoint movePosition = static_cast(event)->globalPosition().toPoint(); + if ((movePosition - (pos() + dragStartPosition)).manhattanLength() > 5) { + dragDelayTimer->stop(); + } + } + + if (isDragging) { + move(static_cast(event)->globalPosition().toPoint() - dragStartPosition); + event->accept(); + } else { + // Show tooltip only when not dragging + QToolTip::showText(static_cast(event)->globalPosition().toPoint(), ui->dateButton->toolTip(), ui->dateButton); + } + } else if (event->type() == QEvent::MouseButtonRelease) { + QMouseEvent *mouseEvent = static_cast(event); + if (mouseEvent->button() == Qt::LeftButton) { + dragDelayTimer->stop(); + isDragging = false; + event->accept(); + } + } + + // Handle specific events for the dateButton if (watched == ui->dateButton) { - if (event->type() == QEvent::MouseMove) { - if (!isDragging) { - QPoint position = ui->dateButton->mapToGlobal(QPoint(0, 0)); - position.setY(position.y() - ui->dateButton->height() - 10); - QToolTip::showText(position, ui->dateButton->toolTip(), ui->dateButton); + if (event->type() == QEvent::MouseButtonPress) { + QMouseEvent *mouseEvent = static_cast(event); + if (mouseEvent->button() == Qt::LeftButton) { + // Check if it is a click, not a drag + if (!isDragging) { + openCalendarWindow(); + } } - return false; // Pass the event to the base class } else if (event->type() == QEvent::Leave) { QToolTip::hideText(); - return false; // Pass the event to the base class } } - return QMainWindow::eventFilter(watched, event); + return QMainWindow::eventFilter(watched, event); // Pass unhandled events to the base class } - - - // Helper function to calculate the luminance of a color double luminance(QColor color) { - // Extracts the red, green, and blue components of the color as floating-point values. double r = color.redF(); double g = color.greenF(); double b = color.blueF(); - - // Linearizes the RGB components to account for the perceptual nonlinearity of human vision. - // This is done using a piecewise linear function that approximates the gamma curve of a typical display. r = (r <= 0.03928) ? r / 12.92 : std::pow((r + 0.055) / 1.055, 2.4); g = (g <= 0.03928) ? g / 12.92 : std::pow((g + 0.055) / 1.055, 2.4); b = (b <= 0.03928) ? b / 12.92 : std::pow((b + 0.055) / 1.055, 2.4); @@ -216,33 +259,20 @@ double luminance(QColor color) { // Helper function to calculate the contrast ratio between two luminance values double contrastRatio(double lum1, double lum2) { - // Finds the brighter and darker luminance values. double brighter = std::max(lum1, lum2); double darker = std::min(lum1, lum2); - - // Calculates the contrast ratio between the two luminance values, adding a small constant to avoid division by zero. return (brighter + 0.05) / (darker + 0.05); } // Main function to adjust the text color based on the background color void MainWindow::adjustTextColorBasedOnBackground() { - // Capture the screen behind the window. QPoint globalPos = ui->dateButton->mapToGlobal(QPoint(0, 0)); - - // Capture the screen behind the button. QScreen *screen = QGuiApplication::primaryScreen(); - - // Grab only area behind the button with button's dimensions - QPixmap pixmap = screen->grabWindow(0, globalPos.x(), globalPos.y(), ui->dateButton->width(), ui->dateButton->height()); + QPixmap pixmap = screen->grabWindow(0, globalPos.x(), globalPos.y(), + ui->dateButton->width(), ui->dateButton->height()); QImage image = pixmap.toImage(); - - // Scale down the image to reduce processing time.(this is optional). QImage scaledImage = image.scaled(10, 10, Qt::IgnoreAspectRatio, Qt::SmoothTransformation); - - // Calculate the average color of the background behind the date button. QColor averageColor = getAverageColor(scaledImage); - - // Calculate the luminance of the background color. double bgLuminance = luminance(averageColor); // Get the luminance of black and white colors. @@ -260,7 +290,7 @@ void MainWindow::adjustTextColorBasedOnBackground() { static QColor previousColor = bestTextColor; // Implement a smooth transition mechanism to avoid rapid color changes. - const double contrastThreshold = 2; // Adjust this threshold to fine-tune the transition + const double contrastThreshold = (bgLuminance < 0.5) ? 1.5 : 2.0; // Adjust this threshold to fine-tune the transition if (contrastRatio(luminance(previousColor), bgLuminance) < contrastThreshold) { previousColor = bestTextColor; } @@ -282,10 +312,8 @@ QColor MainWindow::getAverageColor(const QImage &image) { // Iterate through each pixel in the image. for (int y = 0; y < image.height(); ++y) { for (int x = 0; x < image.width(); ++x) { - // Gets the color of the current pixel. + // Get the color of the current pixel. QColor color(image.pixel(x, y)); - - // Adds the red, green, and blue components of the current pixel to the accumulators. red += color.red(); green += color.green(); blue += color.blue(); @@ -296,7 +324,6 @@ QColor MainWindow::getAverageColor(const QImage &image) { return QColor(red / pixelCount, green / pixelCount, blue / pixelCount); } - void MainWindow::setupDefaultDate() { // Convert the default Gregorian date to Nepali and update UI @@ -408,40 +435,6 @@ void MainWindow::contextMenuEvent(QContextMenuEvent *event) { menu.exec(event->globalPos()); } -void MainWindow::mousePressEvent(QMouseEvent *event) { - if (event->button() == Qt::LeftButton) { - dragStartPosition = event->globalPosition().toPoint() - frameGeometry().topLeft(); - isDragging = true; - event->accept(); - } else { - isDragging = false; - event->ignore(); - } - QMainWindow::mousePressEvent(event); -} - -void MainWindow::mouseMoveEvent(QMouseEvent *event) { - // qDebug() << "Mouse Move Event detected."; - if (isDragging) { - move(event->globalPosition().toPoint() - dragStartPosition); - event->accept(); - } - QMainWindow::mouseMoveEvent(event); - adjustTextColorBasedOnBackground(); -} - - -void MainWindow::mouseReleaseEvent(QMouseEvent *event) { - if (event->button() == Qt::LeftButton) { - isDragging = false; - event->accept(); - } - QMainWindow::mouseReleaseEvent(event); - adjustTextColorBasedOnBackground(); -} - - - void MainWindow::openCalendarWindow() { if (!calendarWindow || !calendarWindow->isVisible()) { calendarWindow = new CalendarWindow(this); @@ -475,6 +468,8 @@ void MainWindow::updateDateButton() { lastUpdatedDate = today; cnvToNepali(today.month(), today.day(), today.year()); adjustTextColorBasedOnBackground(); + this->show(); + this->raise(); } } diff --git a/mainwindow.h b/mainwindow.h index 01e1108..5e2a61b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -46,9 +46,6 @@ class MainWindow : public QMainWindow { ~MainWindow(); protected: - void mousePressEvent(QMouseEvent *event) override; - void mouseMoveEvent(QMouseEvent *event) override; - void mouseReleaseEvent(QMouseEvent *event) override; void contextMenuEvent(QContextMenuEvent *event) override; void exitAll(); bool eventFilter(QObject *watched, QEvent *event) override; @@ -73,9 +70,12 @@ private slots: Ui::MainWindow *ui; QTimer *updateTimer; + CalendarWindow *calendarWindow; bool isDragging; + bool dragStarted; QPoint dragStartPosition; - CalendarWindow *calendarWindow; + QTimer *dragDelayTimer; + }; #endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui index 4554a62..3e996c2 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -3,22 +3,16 @@ MainWindow - Qt::WindowModal + Qt::ApplicationModal 0 0 - 278 - 47 + 280 + 59 - - - Noto Sans Devanagari - 11 - - SizeAllCursor @@ -40,6 +34,12 @@ + + + + + -1 + false @@ -57,26 +57,27 @@ border-radius: 10px; true - QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::ForceTabbedDocks|QMainWindow::VerticalTabs + QMainWindow::AllowNestedDocks|QMainWindow::AllowTabbedDocks|QMainWindow::AnimatedDocks|QMainWindow::ForceTabbedDocks - - - Noto Sans Devanagari - - true - 40 - 0 - 241 + 20 + 10 + 251 41 + + + 0 + 0 + + @@ -233,8 +234,8 @@ border-radius: 10px; - Noto Sans Devanagari - 14 + Laila + 16 @@ -243,8 +244,11 @@ border-radius: 10px; true + + true + - Qt::WheelFocus + Qt::StrongFocus true @@ -258,9 +262,22 @@ border-radius: 10px; PushButton + + + :/resources/flag.png:/resources/flag.png + + + + 17 + 17 + + false + + false + false @@ -268,6 +285,8 @@ border-radius: 10px; - + + + diff --git a/resources.qrc b/resources.qrc index 2e05c39..8fddde0 100755 --- a/resources.qrc +++ b/resources.qrc @@ -8,5 +8,7 @@ resources/purnima.png resources/style.qss resources/VERSION.txt + resources/Laila-Medium.ttf + resources/flag.png diff --git a/resources/Laila-Medium.ttf b/resources/Laila-Medium.ttf new file mode 100644 index 0000000..d5a75aa Binary files /dev/null and b/resources/Laila-Medium.ttf differ diff --git a/resources/VERSION.txt b/resources/VERSION.txt index 38f77a6..e9307ca 100644 --- a/resources/VERSION.txt +++ b/resources/VERSION.txt @@ -1 +1 @@ -2.0.1 +2.0.2 diff --git a/resources/flag.png b/resources/flag.png new file mode 100644 index 0000000..91c04ba Binary files /dev/null and b/resources/flag.png differ diff --git a/resources/style.qss b/resources/style.qss index 8a1c6c0..0c14ff6 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -1,83 +1,74 @@ QComboBox { - background-color: rgb(240, 240, 240); - color: rgb(89, 189, 234); - border: 1px solid rgba(143, 211, 249, 127); - height: 26px; - font-size: 18px; - } - - QComboBox::down-arrow { - image: url(:/resources/dropdown.png); - height: 7px; - width: 7px; - } + background-color: rgb(240, 240, 240); + color: rgb(89, 189, 234); + border: 1px solid rgba(143, 211, 249, 127); + height: 26px; + font-size: 18px; +} - QComboBox::drop-down { - border: none; - padding-right: 4px; - color: black; - } +QComboBox::down-arrow { + image: url(:/resources/dropdown.png); + height: 7px; + width: 7px; +} - QComboBox QAbstractItemView { - outline: 0px; - color: black; - background: transparent; - selection-background-color: rgb(26, 138, 219); - border: 1px solid rgba(143, 211, 249, 127); - } +QComboBox::drop-down { + border: none; + padding-right: 4px; + color: black; +} - QComboBox::item { - height: 26px; - font-size: 16px; - color: black; - background-color: white; - } +QComboBox QAbstractItemView { + outline: 0px; + color: black; + background: transparent; + selection-background-color: rgb(26, 138, 219); + border: 1px solid rgba(143, 211, 249, 127); +} - QComboBox::item:selected { - background-color: rgb(26, 138, 219); - } +QComboBox::item { + height: 26px; + font-size: 16px; + color: black; + background-color: white; +} - QComboBox::item:hover { - background-color: #007bff; - color: white; - } +QComboBox::item:selected { + background-color: rgb(26, 138, 219); +} - QComboBox QAbstractItemView QScrollBar:vertical { - border: none; - background: #f0f0f0; - width: 15px; - margin: 0px 0px 0px 0px; - } +QComboBox::item:hover { + background-color: #007bff; + color: white; +} - QComboBox QAbstractItemView QScrollBar::handle:vertical { - background-color: #007bff; - min-height: 20px; - border-radius: 4px; - } +QComboBox QAbstractItemView QScrollBar:vertical { + border: none; + background: #f0f0f0; + width: 15px; + margin: 0px; +} - QComboBox QAbstractItemView QScrollBar::add-line:vertical, - QComboBox QAbstractItemView QScrollBar::sub-line:vertical { - border: none; - background: none; - } +QComboBox QAbstractItemView QScrollBar::handle:vertical { + background-color: #007bff; + min-height: 20px; + border-radius: 4px; +} - QToolTip { - background-color: white; - color: black; - border: 1px solid gray; - border-radius: 5px; - } -about.h2 { - font-size: 18px; - font-weight: bold; - margin-bottom: 10px; +QComboBox QAbstractItemView QScrollBar::sub-line:vertical { + border: none; + background: none; } -about.p { + +QToolTip { + background-color: white; color: black; + border: 1px solid gray; + border-radius: 5px; } -about a { - color: blue; - text-decoration: underline; + +QMessageBox { + background-color: #f0f0f0; } QMenu {