From 6d86243d3f8be93ef4aa4164f6da2dcd865eb29c Mon Sep 17 00:00:00 2001 From: uncor3 Date: Sun, 9 Nov 2025 18:37:08 -0800 Subject: [PATCH] cleanup styles --- src/deviceinfowidget.cpp | 2 +- src/gallerywidget.cpp | 8 ++++---- src/keychaindialog.cpp | 9 ++++++--- src/photomodel.cpp | 2 +- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/deviceinfowidget.cpp b/src/deviceinfowidget.cpp index 243cb3e..7f02ea0 100644 --- a/src/deviceinfowidget.cpp +++ b/src/deviceinfowidget.cpp @@ -157,7 +157,7 @@ DeviceInfoWidget::DeviceInfoWidget(iDescriptorDevice *device, QWidget *parent) // Create icon label m_lightningIconLabel = new ZIconLabel( QIcon(":/resources/icons/MdiLightningBolt.png"), " Charging", this); - + m_lightningIconLabel->setFixedSize(QSize(20, 20)); m_batteryWidget = new BatteryWidget( qBound(1, device->deviceInfo.batteryInfo.currentBatteryLevel, 100), device->deviceInfo.batteryInfo.isCharging, this); diff --git a/src/gallerywidget.cpp b/src/gallerywidget.cpp index f134290..de862f5 100644 --- a/src/gallerywidget.cpp +++ b/src/gallerywidget.cpp @@ -108,7 +108,7 @@ void GalleryWidget::setupControlsLayout() m_sortComboBox->addItem("Oldest First", static_cast(PhotoModel::OldestFirst)); m_sortComboBox->setCurrentIndex(0); // Default to Newest First - m_sortComboBox->setMinimumWidth(150); // Ensure text fits + m_sortComboBox->setMinimumWidth(100); // Ensure text fits m_sortComboBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // Filter combo box @@ -121,7 +121,7 @@ void GalleryWidget::setupControlsLayout() m_filterComboBox->addItem("Videos Only", static_cast(PhotoModel::VideosOnly)); m_filterComboBox->setCurrentIndex(0); // Default to All - m_filterComboBox->setMinimumWidth(150); // Ensure text fits + m_filterComboBox->setMinimumWidth(100); // Ensure text fits m_filterComboBox->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // Export buttons @@ -158,10 +158,10 @@ void GalleryWidget::setupControlsLayout() m_controlsLayout->addWidget(m_exportSelectedButton); m_controlsLayout->addWidget(m_exportAllButton); - // Create a frame to contain the controls QWidget *controlsWidget = new QWidget(); controlsWidget->setLayout(m_controlsLayout); - controlsWidget->setStyleSheet("QWidget { " + controlsWidget->setObjectName("controlsWidget"); + controlsWidget->setStyleSheet("QWidget#controlsWidget { " " padding: 2px; " "}"); diff --git a/src/keychaindialog.cpp b/src/keychaindialog.cpp index 8e09cb0..9a58cd6 100644 --- a/src/keychaindialog.cpp +++ b/src/keychaindialog.cpp @@ -48,7 +48,6 @@ void KeychainDialog::setupUI() setWindowTitle("Keychain Access Required"); setModal(true); setMinimumSize(600, 450); - resize(700, 500); m_mainLayout = new QVBoxLayout(this); m_mainLayout->setContentsMargins(20, 20, 20, 20); @@ -56,9 +55,12 @@ void KeychainDialog::setupUI() // Title label m_titleLabel = new QLabel("Keychain Access Required"); + m_titleLabel->setObjectName("titleLabel"); m_titleLabel->setAlignment(Qt::AlignCenter); m_titleLabel->setStyleSheet( - "font-size: 18px; font-weight: bold; margin-bottom: 10px;"); + "QLabel#titleLabel { " + " font-size: 18px; font-weight: bold; margin-bottom: 10px;" + "}"); m_mainLayout->addWidget(m_titleLabel); // Description label @@ -74,12 +76,13 @@ void KeychainDialog::setupUI() // Video widget m_videoWidget = new QVideoWidget(); + m_videoWidget->setObjectName("videoWidget"); m_videoWidget->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); m_videoWidget->setAspectRatioMode( Qt::AspectRatioMode::KeepAspectRatioByExpanding); m_videoWidget->setStyleSheet( - "QVideoWidget { background-color: transparent; }"); + "QVideoWidget#videoWidget { background-color: transparent; }"); m_videoWidget->setMinimumHeight(250); m_mainLayout->addWidget(m_videoWidget, 1); diff --git a/src/photomodel.cpp b/src/photomodel.cpp index 36eb319..dfb12c7 100644 --- a/src/photomodel.cpp +++ b/src/photomodel.cpp @@ -47,7 +47,7 @@ QSemaphore PhotoModel::m_videoThumbnailSemaphore(4); PhotoModel::PhotoModel(iDescriptorDevice *device, FilterType filterType, QObject *parent) - : QAbstractListModel(parent), m_device(device), m_thumbnailSize(64, 64), + : QAbstractListModel(parent), m_device(device), m_thumbnailSize(120, 120), m_sortOrder(NewestFirst), m_filterType(filterType) { // 350 MB cache for thumbnails