mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-14 13:17:08 +02:00
Replaced outer padding for chats filters strip with inner padding.
This commit is contained in:
parent
ddaf11ed6a
commit
d2109dd2cb
2 changed files with 9 additions and 9 deletions
|
@ -9,6 +9,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
|
||||
#include "ui/effects/ripple_animation.h"
|
||||
#include "ui/widgets/side_bar_button.h"
|
||||
#include "styles/style_dialogs.h"
|
||||
#include "styles/style_widgets.h"
|
||||
|
||||
#include <QScrollBar>
|
||||
|
@ -58,7 +59,8 @@ int ChatsFiltersTabs::centerOfSection(int section) const {
|
|||
|
||||
void ChatsFiltersTabs::fitWidthToSections() {
|
||||
const auto widths = countSectionsWidths(0);
|
||||
resizeToWidth(ranges::accumulate(widths, .0));
|
||||
const auto sliderPadding = st::dialogsSearchTabsPadding;
|
||||
resizeToWidth(ranges::accumulate(widths, .0) + sliderPadding * 2);
|
||||
_lockedFromX = calculateLockedFromX();
|
||||
|
||||
{
|
||||
|
@ -163,6 +165,8 @@ void ChatsFiltersTabs::paintEvent(QPaintEvent *e) {
|
|||
const auto range = getCurrentActiveRange();
|
||||
const auto activeIndex = activeSection();
|
||||
|
||||
p.translate(st::dialogsSearchTabsPadding, 0);
|
||||
|
||||
auto index = 0;
|
||||
auto raisedIndex = -1;
|
||||
auto activeHorizontalShift = 0;
|
||||
|
|
|
@ -186,16 +186,12 @@ not_null<Ui::RpWidget*> AddChatFiltersTabsStrip(
|
|||
}
|
||||
const auto container = wrap->entity();
|
||||
const auto scroll = Ui::CreateChild<Ui::ScrollArea>(container, scrollSt);
|
||||
const auto sliderPadding = st::dialogsSearchTabsPadding;
|
||||
const auto slider = scroll->setOwnedWidget(
|
||||
object_ptr<Ui::PaddingWrap<Ui::ChatsFiltersTabs>>(
|
||||
object_ptr<Ui::ChatsFiltersTabs>(
|
||||
parent,
|
||||
object_ptr<Ui::ChatsFiltersTabs>(
|
||||
parent,
|
||||
trackActiveFilterAndUnreadAndReorder
|
||||
? st::dialogsSearchTabs
|
||||
: st::chatsFiltersTabs),
|
||||
QMargins(sliderPadding, 0, sliderPadding, 0)))->entity();
|
||||
trackActiveFilterAndUnreadAndReorder
|
||||
? st::dialogsSearchTabs
|
||||
: st::chatsFiltersTabs));
|
||||
const auto state = wrap->lifetime().make_state<State>();
|
||||
if (trackActiveFilterAndUnreadAndReorder) {
|
||||
using Reorder = Ui::ChatsFiltersTabsReorder;
|
||||
|
|
Loading…
Add table
Reference in a new issue