mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-21 19:35:49 +08:00
Refactor and enhance UI components
- Updated `CableInfoWidget` to include a TODO comment regarding manufacturer verification. - Refactored `CustomTab` and `CustomTabWidget` to remove notification label functionality, simplifying the class structure. - Improved `DeviceInfoWidget` by adding a destructor to manage graphics view memory and initializing graphics scene properly. - Introduced `DiskUsageBar` and `DiskUsageWidget` classes to manage disk usage visualization, including hover popover functionality for detailed information. - Enhanced `MediaPreviewDialog` to include more descriptive window titles and adjusted status label styling based on platform. - Added platform-specific functionality in `macos.h` and `macos.mm` for popover management. - Cleaned up `ToolboxWidget` by adjusting label styles and removing fixed sizes for better responsiveness.
This commit is contained in:
@@ -39,7 +39,7 @@ MediaPreviewDialog::MediaPreviewDialog(iDescriptorDevice *device,
|
||||
m_fitToWindowBtn(nullptr), m_zoomFactor(1.0), m_isRepeatEnabled(true),
|
||||
m_isDraggingTimeline(false), m_videoDuration(0)
|
||||
{
|
||||
setWindowTitle(QFileInfo(filePath).fileName());
|
||||
setWindowTitle(QFileInfo(filePath).fileName() + " - iDescriptor");
|
||||
|
||||
// Make dialog fullscreen
|
||||
setWindowState(Qt::WindowMaximized);
|
||||
@@ -88,9 +88,13 @@ void MediaPreviewDialog::setupUI()
|
||||
}
|
||||
|
||||
// Status bar
|
||||
// more margin because of border radius on macOS
|
||||
m_statusLabel = new QLabel(this);
|
||||
m_statusLabel->setStyleSheet(
|
||||
"QLabel { background: #f0f0f0; padding: 5px; font-size: 12px; }");
|
||||
#ifdef Q_OS_MAC
|
||||
m_statusLabel->setStyleSheet("QLabel { margin-left: 15px; }");
|
||||
#else
|
||||
m_statusLabel->setStyleSheet("QLabel { margin-left: 5px; }");
|
||||
#endif
|
||||
m_mainLayout->addWidget(m_statusLabel);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user