mirror of
https://github.com/iDescriptor/iDescriptor.git
synced 2026-06-22 03:45:51 +08:00
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:
@@ -0,0 +1,36 @@
|
||||
#include "zlineedit.h"
|
||||
|
||||
ZLineEdit::ZLineEdit(QWidget *parent) : QLineEdit(parent) { setupStyles(); }
|
||||
|
||||
ZLineEdit::ZLineEdit(const QString &text, QWidget *parent)
|
||||
: QLineEdit(text, parent)
|
||||
{
|
||||
setupStyles();
|
||||
}
|
||||
|
||||
void ZLineEdit::setupStyles()
|
||||
{
|
||||
updateStyles();
|
||||
|
||||
// Connect to palette changes for dynamic theme updates
|
||||
connect(qApp, &QApplication::paletteChanged, this,
|
||||
&ZLineEdit::updateStyles);
|
||||
}
|
||||
|
||||
void ZLineEdit::updateStyles()
|
||||
{
|
||||
setStyleSheet("QLineEdit { "
|
||||
" border: 2px solid " +
|
||||
qApp->palette().color(QPalette::Midlight).name() +
|
||||
"; "
|
||||
" border-radius: 6px; "
|
||||
" padding: 8px 12px; "
|
||||
" font-size: 14px; "
|
||||
"} "
|
||||
"QLineEdit:focus { "
|
||||
" border: 2px solid " +
|
||||
qApp->palette().color(QPalette::Highlight).name() +
|
||||
"; "
|
||||
" outline: none; "
|
||||
"}");
|
||||
}
|
||||
Reference in New Issue
Block a user