diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2023-11-08 10:28:37 +0100 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2023-11-09 07:15:03 +0000 |
commit | bdaae9ddef68cea854042f4bb7c02ca068c8c140 (patch) | |
tree | a5865b633da86729b2823da63598b0a5de59e075 /ui/qt/accordion_frame.cpp | |
parent | b2f5ac5123feda21c7082c39f599f9180b99392f (diff) |
Qt: Add QLineEdit border in AccordionFrame
Add a border and a border-radius to make the QLineEdit used in
AccordionFrame look better on macOS. This is a similar style as
used in DisplayFilterCombo.
Update AddressEditorFrame, ColumnEditorFrame, FilterExpressionFrame
PreferenceEditorFrame, SearchFrame and GoToPacket.
Store the style_sheet in DisplayFilterEdit to be used in
alignActionButtons().
Diffstat (limited to 'ui/qt/accordion_frame.cpp')
-rw-r--r-- | ui/qt/accordion_frame.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ui/qt/accordion_frame.cpp b/ui/qt/accordion_frame.cpp index e62209861d..29fa7b69b0 100644 --- a/ui/qt/accordion_frame.cpp +++ b/ui/qt/accordion_frame.cpp @@ -13,6 +13,7 @@ #include "accordion_frame.h" #include "ui/util.h" +#include <ui/qt/utils/color_utils.h> #include <QLayout> #include <QPropertyAnimation> @@ -93,3 +94,17 @@ void AccordionFrame::animationFinished() setMaximumHeight(frame_height_); } } + +QString AccordionFrame::lineEditStyleSheet() +{ + return QString( + "QLineEdit {" +#ifdef Q_OS_MAC + " border: 1px solid palette(%1);" + " border-radius: 3px;" +#else + " border: 1px solid palette(shadow);" +#endif + "}" + ).arg(ColorUtils::themeIsDark() ? QString("light") : QString("dark")); +}
\ No newline at end of file |