mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fix player controls with animations disabled.
This commit is contained in:
parent
453ce1bff9
commit
07dfe88d62
3 changed files with 6 additions and 5 deletions
|
@ -291,7 +291,7 @@ mediaPlayerFileLayout: OverviewFileLayout(overviewFileLayout) {
|
|||
mediaPlayerFloatSize: 128px;
|
||||
mediaPlayerFloatMargin: 12px;
|
||||
|
||||
mediaPlayerMenuPosition: point(-2px, 0px);
|
||||
mediaPlayerMenuPosition: point(-2px, -2px);
|
||||
mediaPlayerOrderMenu: Menu(defaultMenu) {
|
||||
itemIconPosition: point(13px, 8px);
|
||||
itemPadding: margins(49px, 9px, 17px, 11px);
|
||||
|
|
|
@ -528,17 +528,18 @@ Widget::Widget(
|
|||
|
||||
hidePlaylistOn(_playPause);
|
||||
hidePlaylistOn(_close);
|
||||
hidePlaylistOn(_rightControls);
|
||||
|
||||
setType(AudioMsgId::Type::Song);
|
||||
}
|
||||
|
||||
void Widget::hidePlaylistOn(const object_ptr<Ui::IconButton> &button) {
|
||||
button->events(
|
||||
void Widget::hidePlaylistOn(not_null<Ui::RpWidget*> widget) {
|
||||
widget->events(
|
||||
) | rpl::filter([=](not_null<QEvent*> e) {
|
||||
return (e->type() == QEvent::Enter);
|
||||
}) | rpl::start_with_next([=] {
|
||||
updateOverLabelsState(false);
|
||||
}, button->lifetime());
|
||||
}, widget->lifetime());
|
||||
}
|
||||
|
||||
void Widget::setupRightControls() {
|
||||
|
|
|
@ -84,7 +84,7 @@ private:
|
|||
[[nodiscard]] int getTimeRight() const;
|
||||
void updateOverLabelsState(QPoint pos);
|
||||
void updateOverLabelsState(bool over);
|
||||
void hidePlaylistOn(const object_ptr<Ui::IconButton> &button);
|
||||
void hidePlaylistOn(not_null<Ui::RpWidget*> widget);
|
||||
|
||||
void updatePlayPrevNextPositions();
|
||||
void updateLabelsGeometry();
|
||||
|
|
Loading…
Add table
Reference in a new issue