mirror of
https://github.com/vale981/tdesktop
synced 2025-03-09 20:46:58 -04:00
41 lines
791 B
C
41 lines
791 B
C
![]() |
#pragma once
|
||
|
|
||
|
#include "ui/widgets/widget_slide_wrap.h"
|
||
|
#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:
|
||
|
using UpdateCallback = Parent::UpdateCallback;
|
||
|
PlayerWrapWidget(QWidget *parent, UpdateCallback &&updateCallback);
|
||
|
|
||
|
void updateAdaptiveLayout() {
|
||
|
updateShadowGeometry();
|
||
|
}
|
||
|
void showShadow() {
|
||
|
entity()->showShadow();
|
||
|
}
|
||
|
void hideShadow() {
|
||
|
entity()->hideShadow();
|
||
|
}
|
||
|
int contentHeight() const {
|
||
|
return height() - st::lineWidth;
|
||
|
}
|
||
|
|
||
|
protected:
|
||
|
void resizeEvent(QResizeEvent *e) override;
|
||
|
|
||
|
private:
|
||
|
void updateShadowGeometry();
|
||
|
|
||
|
};
|
||
|
|
||
|
} // namespace Window
|