2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Media::Player::Widget added instead of PlayerWidget.

New media player bar widget added. Switching between floating
media player panel and media player widget. New volume controller.
This commit is contained in:
John Preston
2016-10-12 22:34:25 +03:00
parent 8f135d7e00
commit 9eb8a93719
98 changed files with 2305 additions and 1841 deletions

View File

@@ -21,6 +21,7 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#pragma once
#include "layerwidget.h"
#include "ui/widgets/shadow.h"
class BlueTitleShadow : public TWidget {
public:
@@ -93,9 +94,9 @@ private:
};
class ScrollableBoxShadow : public PlainShadow {
class ScrollableBoxShadow : public Ui::PlainShadow {
public:
ScrollableBoxShadow(QWidget *parent) : PlainShadow(parent, st::boxScrollShadowBg) {
ScrollableBoxShadow(QWidget *parent) : Ui::PlainShadow(parent, st::boxScrollShadowBg) {
}
};

View File

@@ -1359,25 +1359,25 @@ void StickersBox::setup() {
int bottomSkip = st::boxPadding.bottom();
if (_section == Section::Installed) {
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
_topShadow = new PlainShadow(this, st::contactsAboutShadow);
_topShadow.create(this, st::contactsAboutShadow);
_save = new BoxButton(this, lang(lng_settings_save), st::defaultBoxButton);
_save.create(this, lang(lng_settings_save), st::defaultBoxButton);
connect(_save, SIGNAL(clicked()), this, SLOT(onSave()));
_cancel = new BoxButton(this, lang(lng_cancel), st::cancelBoxButton);
_cancel.create(this, lang(lng_cancel), st::cancelBoxButton);
connect(_cancel, SIGNAL(clicked()), this, SLOT(onClose()));
_bottomShadow = new ScrollableBoxShadow(this);
_bottomShadow.create(this);
bottomSkip = st::boxButtonPadding.top() + _save->height() + st::boxButtonPadding.bottom();
} else if (_section == Section::ArchivedPart) {
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
_topShadow = new PlainShadow(this, st::contactsAboutShadow);
_topShadow.create(this, st::contactsAboutShadow);
_save = new BoxButton(this, lang(lng_box_ok), st::defaultBoxButton);
_save.create(this, lang(lng_box_ok), st::defaultBoxButton);
connect(_save, SIGNAL(clicked()), this, SLOT(onClose()));
} else if (_section == Section::Archived) {
_aboutHeight = st::stickersReorderPadding.top() + _about.countHeight(_aboutWidth) + st::stickersReorderPadding.bottom();
_topShadow = new PlainShadow(this, st::contactsAboutShadow);
_topShadow.create(this, st::contactsAboutShadow);
}
ItemListBox::init(_inner, bottomSkip, st::boxTitleHeight + _aboutHeight);
setMaxHeight(snap(countHeight(), int32(st::sessionsHeight), int32(st::boxMaxListHeight)));

View File

@@ -24,6 +24,9 @@ Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
#include "core/vector_of_moveable.h"
class ConfirmBox;
namespace Ui {
class PlainShadow;
} // namespace Ui
class StickerSetInner : public ScrolledWidget, public RPCSender, private base::Subscriber {
Q_OBJECT
@@ -188,7 +191,7 @@ private:
ChildWidget<BoxButton> _cancel = { nullptr };
OrderedSet<mtpRequestId> _disenableRequests;
mtpRequestId _reorderRequest = 0;
ChildWidget<PlainShadow> _topShadow = { nullptr };
ChildWidget<Ui::PlainShadow> _topShadow = { nullptr };
ChildWidget<ScrollableBoxShadow> _bottomShadow = { nullptr };
QTimer _scrollTimer;