Fix player controls with animations disabled.
This commit is contained in:
parent
453ce1bff9
commit
07dfe88d62
|
@ -291,7 +291,7 @@ mediaPlayerFileLayout: OverviewFileLayout(overviewFileLayout) {
|
||||||
mediaPlayerFloatSize: 128px;
|
mediaPlayerFloatSize: 128px;
|
||||||
mediaPlayerFloatMargin: 12px;
|
mediaPlayerFloatMargin: 12px;
|
||||||
|
|
||||||
mediaPlayerMenuPosition: point(-2px, 0px);
|
mediaPlayerMenuPosition: point(-2px, -2px);
|
||||||
mediaPlayerOrderMenu: Menu(defaultMenu) {
|
mediaPlayerOrderMenu: Menu(defaultMenu) {
|
||||||
itemIconPosition: point(13px, 8px);
|
itemIconPosition: point(13px, 8px);
|
||||||
itemPadding: margins(49px, 9px, 17px, 11px);
|
itemPadding: margins(49px, 9px, 17px, 11px);
|
||||||
|
|
|
@ -528,17 +528,18 @@ Widget::Widget(
|
||||||
|
|
||||||
hidePlaylistOn(_playPause);
|
hidePlaylistOn(_playPause);
|
||||||
hidePlaylistOn(_close);
|
hidePlaylistOn(_close);
|
||||||
|
hidePlaylistOn(_rightControls);
|
||||||
|
|
||||||
setType(AudioMsgId::Type::Song);
|
setType(AudioMsgId::Type::Song);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::hidePlaylistOn(const object_ptr<Ui::IconButton> &button) {
|
void Widget::hidePlaylistOn(not_null<Ui::RpWidget*> widget) {
|
||||||
button->events(
|
widget->events(
|
||||||
) | rpl::filter([=](not_null<QEvent*> e) {
|
) | rpl::filter([=](not_null<QEvent*> e) {
|
||||||
return (e->type() == QEvent::Enter);
|
return (e->type() == QEvent::Enter);
|
||||||
}) | rpl::start_with_next([=] {
|
}) | rpl::start_with_next([=] {
|
||||||
updateOverLabelsState(false);
|
updateOverLabelsState(false);
|
||||||
}, button->lifetime());
|
}, widget->lifetime());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Widget::setupRightControls() {
|
void Widget::setupRightControls() {
|
||||||
|
|
|
@ -84,7 +84,7 @@ private:
|
||||||
[[nodiscard]] int getTimeRight() const;
|
[[nodiscard]] int getTimeRight() const;
|
||||||
void updateOverLabelsState(QPoint pos);
|
void updateOverLabelsState(QPoint pos);
|
||||||
void updateOverLabelsState(bool over);
|
void updateOverLabelsState(bool over);
|
||||||
void hidePlaylistOn(const object_ptr<Ui::IconButton> &button);
|
void hidePlaylistOn(not_null<Ui::RpWidget*> widget);
|
||||||
|
|
||||||
void updatePlayPrevNextPositions();
|
void updatePlayPrevNextPositions();
|
||||||
void updateLabelsGeometry();
|
void updateLabelsGeometry();
|
||||||
|
|
Loading…
Reference in New Issue