2016-10-12 19:34:25 +00:00
|
|
|
#pragma once
|
|
|
|
|
2016-10-26 10:06:00 +00:00
|
|
|
#include "ui/effects/widget_slide_wrap.h"
|
2016-10-12 19:34:25 +00:00
|
|
|
#include "media/player/media_player_widget.h"
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class PlainShadow;
|
|
|
|
} // namespace Ui
|
|
|
|
|
|
|
|
namespace Window {
|
|
|
|
|
|
|
|
class PlayerWrapWidget : public Ui::WidgetSlideWrap<Media::Player::Widget> {
|
|
|
|
using Parent = Ui::WidgetSlideWrap<Media::Player::Widget>;
|
|
|
|
|
|
|
|
public:
|
2017-02-26 11:32:13 +00:00
|
|
|
PlayerWrapWidget(QWidget *parent, base::lambda<void()> updateCallback);
|
2016-10-12 19:34:25 +00:00
|
|
|
|
|
|
|
void updateAdaptiveLayout() {
|
|
|
|
updateShadowGeometry();
|
|
|
|
}
|
|
|
|
void showShadow() {
|
|
|
|
entity()->showShadow();
|
|
|
|
}
|
|
|
|
void hideShadow() {
|
|
|
|
entity()->hideShadow();
|
|
|
|
}
|
|
|
|
int contentHeight() const {
|
2016-12-05 11:01:08 +00:00
|
|
|
return qMax(height() - st::lineWidth, 0);
|
2016-10-12 19:34:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *e) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void updateShadowGeometry();
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace Window
|