refactor(ui): add WinUI stylesheet for Windows

- Introduced WinToolWidget for custom window management on Windows.
- Implemented backdrop type settings for Windows in SettingsManager.
- Enhanced SettingsWidget to allow selection of backdrop type.
- Improved status balloon and toolbox widget styles for Windows.
- Refined tab widget animations and styles for better visual feedback.
- Fixed issues with loading and error widgets in ZLoadingWidget.
- Updated welcome widget to support custom hyperlink colors.
- General code cleanup and style adjustments across multiple files.
This commit is contained in:
uncor3
2026-02-22 11:59:57 +03:00
parent bc3998cefb
commit 43d804991e
121 changed files with 3745 additions and 479 deletions
+28 -3
View File
@@ -37,6 +37,10 @@
#include <QMessageBox>
#include <QStyle>
#ifdef WIN32
#include <QGraphicsOpacityEffect>
#endif
struct iDescriptorToolWidget {
iDescriptorTool tool;
QString description;
@@ -335,14 +339,35 @@ void ToolboxWidget::updateToolboxStates()
bool enabled = !requiresDevice || hasDevice;
toolbox->setEnabled(enabled);
// Opacity does not work because of the stylesheet on Windows
#ifndef WIN32
if (enabled) {
toolbox->setStyleSheet("#toolboxFrame { "
"border-radius: 5px; padding: 5px; }");
toolbox->setStyleSheet("QWidget#toolboxFrame { "
"padding: 5px; }");
} else {
toolbox->setStyleSheet("#toolboxFrame { border-radius: 5px; "
toolbox->setStyleSheet("QWidget#toolboxFrame { "
"padding: 5px;"
"opacity: 0.45; }");
}
#else
// base style
// toolbox->setStyleSheet("QWidget#toolboxFrame{ padding: 5px; border: "
// "none; outline: none; }");
if (enabled) {
// normal look
toolbox->setStyleSheet("QWidget#toolboxFrame { padding: 5px; "
"border: none; outline: none; }");
toolbox->setCursor(Qt::PointingHandCursor);
} else {
// disabled look: dull bg + border + muted text, no hand cursor
toolbox->setStyleSheet("padding: 5px;"
"border-radius: 8px;"
"background-color: rgba(255,255,255,1);"
"color: #666;");
toolbox->setCursor(Qt::ArrowCursor);
}
#endif
}
}