mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-13 15:03:36 +00:00
Fixed selection bar rounding and fade in profile media tabs.
This commit is contained in:
@@ -2134,17 +2134,30 @@ void TopBar::setTabSelectedItems(SelectedItems &&items) {
|
||||
void TopBar::createTabSelectionBar() {
|
||||
_tabSelectionBar.create(
|
||||
this,
|
||||
object_ptr<Ui::RpWidget>(this),
|
||||
st::infoTopBarScale);
|
||||
object_ptr<Ui::RpWidget>(this));
|
||||
const auto bar = _tabSelectionBar.data();
|
||||
bar->setDuration(st::infoTopBarDuration);
|
||||
bar->toggle(false, anim::type::instant);
|
||||
|
||||
const auto inner = bar->entity();
|
||||
inner->paintRequest(
|
||||
) | rpl::on_next([=](QRect clip) {
|
||||
) | rpl::on_next([=] {
|
||||
auto p = QPainter(inner);
|
||||
p.fillRect(clip, _st.bg);
|
||||
auto hq = PainterHighQualityEnabler(p);
|
||||
const auto radius = _roundEdges ? st::boxRadius : 0;
|
||||
p.setPen(Qt::NoPen);
|
||||
p.setBrush(_st.bg);
|
||||
p.drawRoundedRect(
|
||||
inner->rect() + QMargins(0, 0, 0, radius),
|
||||
radius,
|
||||
radius);
|
||||
const auto line = st::lineWidth;
|
||||
p.fillRect(
|
||||
0,
|
||||
inner->height() - line,
|
||||
inner->width(),
|
||||
line,
|
||||
st::shadowFg);
|
||||
}, inner->lifetime());
|
||||
|
||||
const auto forwardAction = [=](SelectionAction action) {
|
||||
@@ -2267,7 +2280,7 @@ void TopBar::updateTabSelectionGeometry() {
|
||||
_tabSelectionBar->move(0, 0);
|
||||
|
||||
_tabSelectionCancel->moveToLeft(0, 0);
|
||||
auto right = 0;
|
||||
auto right = _st.mediaActionsSkip;
|
||||
if (!_tabSelectionDelete->isHidden()) {
|
||||
_tabSelectionDelete->moveToRight(right, 0, inner->width());
|
||||
right += _tabSelectionDelete->width();
|
||||
|
||||
Reference in New Issue
Block a user