Skip to content

Commit

Permalink
fix: [ui]The search box loading icon is too large
Browse files Browse the repository at this point in the history
The search box loading icon is too large

Log: The search box loading icon is too large
Bug: https://pms.uniontech.com/bug-view-253889.html
  • Loading branch information
liyigang1 authored and deepin-bot[bot] committed Oct 19, 2024
1 parent 8212c17 commit 4fde504
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ inline constexpr int kIconHeight { 14 };
inline constexpr int kItemHeight { 30 };
inline constexpr int kItemMargin { 8 };
inline constexpr int kCompleterMaxHeight { 260 };
inline constexpr int kSpinnerSize { 24 };
inline constexpr int kCompactSpinnerSize { 16 };

namespace CustomKey {
inline constexpr char kUrl[] { "CrumbData_Key_Url" };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,11 @@ void AddressBarPrivate::onCompletionModelCountChanged()
bool AddressBarPrivate::eventFilterResize(AddressBar *addressbar, QResizeEvent *event)
{
Q_UNUSED(addressbar)
spinner.setFixedSize(q->height() - 8, q->height() - 8);
int spinnerSize = kSpinnerSize;
#ifdef DTKWIDGET_CLASS_DSizeMode
spinnerSize = DSizeModeHelper::element(kCompactSpinnerSize, kSpinnerSize);
#endif
spinner.setFixedSize(spinnerSize, spinnerSize);
spinner.setGeometry(event->size().width() - spinner.size().width() - 45,
(event->size().height() - spinner.size().height()) / 2,
spinner.size().width(), spinner.size().height());
Expand Down

0 comments on commit 4fde504

Please sign in to comment.