mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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/effects/ripple_animation.h"
|
||||||
#include "ui/widgets/side_bar_button.h"
|
#include "ui/widgets/side_bar_button.h"
|
||||||
|
#include "styles/style_dialogs.h"
|
||||||
#include "styles/style_widgets.h"
|
#include "styles/style_widgets.h"
|
||||||
|
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
|
@ -58,7 +59,8 @@ int ChatsFiltersTabs::centerOfSection(int section) const {
|
||||||
|
|
||||||
void ChatsFiltersTabs::fitWidthToSections() {
|
void ChatsFiltersTabs::fitWidthToSections() {
|
||||||
const auto widths = countSectionsWidths(0);
|
const auto widths = countSectionsWidths(0);
|
||||||
resizeToWidth(ranges::accumulate(widths, .0));
|
const auto sliderPadding = st::dialogsSearchTabsPadding;
|
||||||
|
resizeToWidth(ranges::accumulate(widths, .0) + sliderPadding * 2);
|
||||||
_lockedFromX = calculateLockedFromX();
|
_lockedFromX = calculateLockedFromX();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -163,6 +165,8 @@ void ChatsFiltersTabs::paintEvent(QPaintEvent *e) {
|
||||||
const auto range = getCurrentActiveRange();
|
const auto range = getCurrentActiveRange();
|
||||||
const auto activeIndex = activeSection();
|
const auto activeIndex = activeSection();
|
||||||
|
|
||||||
|
p.translate(st::dialogsSearchTabsPadding, 0);
|
||||||
|
|
||||||
auto index = 0;
|
auto index = 0;
|
||||||
auto raisedIndex = -1;
|
auto raisedIndex = -1;
|
||||||
auto activeHorizontalShift = 0;
|
auto activeHorizontalShift = 0;
|
||||||
|
|
|
@ -186,16 +186,12 @@ not_null<Ui::RpWidget*> AddChatFiltersTabsStrip(
|
||||||
}
|
}
|
||||||
const auto container = wrap->entity();
|
const auto container = wrap->entity();
|
||||||
const auto scroll = Ui::CreateChild<Ui::ScrollArea>(container, scrollSt);
|
const auto scroll = Ui::CreateChild<Ui::ScrollArea>(container, scrollSt);
|
||||||
const auto sliderPadding = st::dialogsSearchTabsPadding;
|
|
||||||
const auto slider = scroll->setOwnedWidget(
|
const auto slider = scroll->setOwnedWidget(
|
||||||
object_ptr<Ui::PaddingWrap<Ui::ChatsFiltersTabs>>(
|
object_ptr<Ui::ChatsFiltersTabs>(
|
||||||
parent,
|
parent,
|
||||||
object_ptr<Ui::ChatsFiltersTabs>(
|
trackActiveFilterAndUnreadAndReorder
|
||||||
parent,
|
? st::dialogsSearchTabs
|
||||||
trackActiveFilterAndUnreadAndReorder
|
: st::chatsFiltersTabs));
|
||||||
? st::dialogsSearchTabs
|
|
||||||
: st::chatsFiltersTabs),
|
|
||||||
QMargins(sliderPadding, 0, sliderPadding, 0)))->entity();
|
|
||||||
const auto state = wrap->lifetime().make_state<State>();
|
const auto state = wrap->lifetime().make_state<State>();
|
||||||
if (trackActiveFilterAndUnreadAndReorder) {
|
if (trackActiveFilterAndUnreadAndReorder) {
|
||||||
using Reorder = Ui::ChatsFiltersTabsReorder;
|
using Reorder = Ui::ChatsFiltersTabsReorder;
|
||||||
|
|
Loading…
Add table
Reference in a new issue