improve UI styles

- Added album path management in PhotoModel for better photo loading.
- Updated responsive QLabel to handle scaling more effectively.
- Introduced ClickableIconWidget for better icon interaction in the UI.
- Added new color definitions for blue and accent blue.
- Enhanced the AppTabWidget styles to adapt to dark mode.
- Replaced QLineEdit with ZLineEdit for consistent styling.
- Improved the SSH terminal widget with better error handling and process management.
- Refactored ToolboxWidget methods for device management.
- Adjusted margins and styles in various widgets for improved layout.
This commit is contained in:
uncor3
2025-10-09 21:24:45 -07:00
parent 777ea21a00
commit 8d4f4b11f9
33 changed files with 1067 additions and 430 deletions
+27 -24
View File
@@ -82,27 +82,29 @@ void DeviceSidebarItem::setupUI()
for (QPushButton *btn : navButtons) {
btn->setCheckable(true);
btn->setMaximumHeight(25);
btn->setStyleSheet("QPushButton { "
" background-color: #f8f9fa; "
" border: 1px solid #dee2e6; "
" padding: 4px 8px; "
" text-align: center; "
" border-radius: 3px; "
" font-size: 11px; "
" color: #212529; "
"} "
"QPushButton:checked { "
" background-color: #0d6efd; "
" color: white; "
" border: 1px solid #0a58ca; "
"} "
"QPushButton:hover:!checked { "
" background-color: #e9ecef; "
" border-color: #adb5bd; "
"} "
"QPushButton:checked:hover { "
" background-color: #0b5ed7; "
"}");
btn->setStyleSheet(
QString("QPushButton { "
" background-color: #f8f9fa; "
" border: 1px solid #dee2e6; "
" padding: 4px 8px; "
" text-align: center; "
" border-radius: 3px; "
" font-size: 11px; "
" color: #212529; "
"} "
"QPushButton:checked { "
" background-color: %1; "
" color: white; "
" border: 1px solid %1; "
"} "
"QPushButton:hover:!checked { "
" background-color: #e9ecef; "
" border-color: #adb5bd; "
"} "
"QPushButton:checked:hover { "
" background-color: %2; "
"}")
.arg(COLOR_ACCENT_BLUE.name(), COLOR_BLUE.name()));
connect(btn, &QPushButton::clicked, this,
&DeviceSidebarItem::onNavigationButtonClicked);
@@ -129,10 +131,11 @@ void DeviceSidebarItem::setSelected(bool selected)
return;
m_selected = selected;
// todo : bug the first device selected style is not applied
if (selected) {
setStyleSheet("DeviceSidebarItem { border: "
"2px solid #2196f3; border-radius: 5px; }");
setStyleSheet(QString("DeviceSidebarItem { border: "
"2px solid %1; border-radius: 5px; }")
.arg(COLOR_BLUE.name()));
} else {
setStyleSheet("DeviceSidebarItem { border: "
"1px solid #e0e0e0; border-radius: 5px; }");