mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Make chats list tabs closer to each other.
This commit is contained in:
@@ -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;
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -903,9 +903,13 @@ void Suggestions::setupTabs() {
|
||||
const auto shadow = Ui::CreateChild<Ui::PlainShadow>(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());
|
||||
|
Reference in New Issue
Block a user