tdesktop/Telegram/SourceFiles/window/player_wrap_widget.h

37 lines
663 B
C
Raw Normal View History

#pragma once
2017-09-13 16:57:44 +00:00
#include "ui/wrap/slide_wrap.h"
#include "media/player/media_player_widget.h"
namespace Ui {
class PlainShadow;
} // namespace Ui
namespace Window {
2017-09-13 16:57:44 +00:00
class PlayerWrapWidget : public Ui::SlideWrap<Media::Player::Widget> {
using Parent = Ui::SlideWrap<Media::Player::Widget>;
public:
2017-09-13 16:57:44 +00:00
PlayerWrapWidget(QWidget *parent);
void updateAdaptiveLayout() {
2017-09-13 16:57:44 +00:00
updateShadowGeometry(size());
}
void showShadow() {
entity()->showShadow();
}
void hideShadow() {
entity()->hideShadow();
}
int contentHeight() const {
return qMax(height() - st::lineWidth, 0);
}
private:
2017-09-14 19:27:41 +00:00
void updateShadowGeometry(const QSize &size);
};
} // namespace Window