diff --git a/Telegram/SourceFiles/dialogs/dialogs.style b/Telegram/SourceFiles/dialogs/dialogs.style index 3ee37b6f9..63c85b638 100644 --- a/Telegram/SourceFiles/dialogs/dialogs.style +++ b/Telegram/SourceFiles/dialogs/dialogs.style @@ -649,7 +649,7 @@ dialogsSearchTabs: SettingsSlider(defaultSettingsSlider) { barRadius: 2px; barFg: transparent; barSnapToLabel: true; - strictSkip: 34px; + strictSkip: 18px; labelTop: 7px; labelStyle: semiboldTextStyle; labelFg: windowSubTextFg; @@ -659,7 +659,7 @@ dialogsSearchTabs: SettingsSlider(defaultSettingsSlider) { rippleBgActive: lightButtonBgOver; ripple: defaultRippleAnimation; } - +dialogsSearchTabsPadding: 8px; dialogsStoriesList: DialogsStoriesList { small: dialogsStories; diff --git a/Telegram/SourceFiles/dialogs/ui/chat_search_tabs.cpp b/Telegram/SourceFiles/dialogs/ui/chat_search_tabs.cpp index f03503387..504321fab 100644 --- a/Telegram/SourceFiles/dialogs/ui/chat_search_tabs.cpp +++ b/Telegram/SourceFiles/dialogs/ui/chat_search_tabs.cpp @@ -110,7 +110,7 @@ ChatSearchTabs::ChatSearchTabs(QWidget *parent, ChatSearchTab active) }) { _list.push_back({ tab, TabLabel(tab) }); } - _tabs->move(0, 0); + _tabs->move(st::dialogsSearchTabsPadding, 0); _tabs->sectionActivated( ) | rpl::start_with_next([=](int index) { for (const auto &tab : _list) { @@ -166,9 +166,9 @@ void ChatSearchTabs::refreshTabs(ChatSearchTab active) { int ChatSearchTabs::resizeGetHeight(int newWidth) { _tabs->resizeToWidth(newWidth); _shadow->setGeometry( - _tabs->x(), + 0, _tabs->y() + _tabs->height() - st::lineWidth, - _tabs->width(), + newWidth, st::lineWidth); return _tabs->height(); } diff --git a/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp b/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp index 37be201fa..868b3b74c 100644 --- a/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp +++ b/Telegram/SourceFiles/dialogs/ui/dialogs_suggestions.cpp @@ -903,9 +903,13 @@ void Suggestions::setupTabs() { const auto shadow = Ui::CreateChild(this); shadow->lower(); - _tabs->sizeValue() | rpl::start_with_next([=](QSize size) { + _tabs->move(st::dialogsSearchTabsPadding, 0); + rpl::combine( + widthValue(), + _tabs->heightValue() + ) | rpl::start_with_next([=](int width, int height) { const auto line = st::lineWidth; - shadow->setGeometry(0, size.height() - line, size.width(), line); + shadow->setGeometry(0, height - line, width, line); }, shadow->lifetime()); shadow->showOn(_tabs->shownValue());