mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Moved position info from ItemBases to AbstractLayoutItem.
This commit is contained in:
@@ -120,7 +120,7 @@ void Gif::initDimensions() {
|
||||
}
|
||||
|
||||
void Gif::setPosition(int32 position) {
|
||||
ItemBase::setPosition(position);
|
||||
AbstractLayoutItem::setPosition(position);
|
||||
if (_position < 0) {
|
||||
_gif.reset();
|
||||
}
|
||||
@@ -1358,7 +1358,7 @@ void Game::initDimensions() {
|
||||
}
|
||||
|
||||
void Game::setPosition(int32 position) {
|
||||
ItemBase::setPosition(position);
|
||||
AbstractLayoutItem::setPosition(position);
|
||||
if (_position < 0) {
|
||||
_gif.reset();
|
||||
}
|
||||
|
@@ -28,14 +28,6 @@ NeverFreedPointer<DocumentItems> documentItemsMap;
|
||||
|
||||
} // namespace
|
||||
|
||||
void ItemBase::setPosition(int32 position) {
|
||||
_position = position;
|
||||
}
|
||||
|
||||
int32 ItemBase::position() const {
|
||||
return _position;
|
||||
}
|
||||
|
||||
Result *ItemBase::getResult() const {
|
||||
return _result;
|
||||
}
|
||||
|
@@ -77,9 +77,6 @@ public:
|
||||
|
||||
virtual void paint(Painter &p, const QRect &clip, const PaintContext *context) const = 0;
|
||||
|
||||
virtual void setPosition(int32 position);
|
||||
int32 position() const;
|
||||
|
||||
virtual bool isFullLine() const {
|
||||
return true;
|
||||
}
|
||||
@@ -144,8 +141,6 @@ protected:
|
||||
ClickHandlerPtr _send = ClickHandlerPtr{ new SendClickHandler() };
|
||||
ClickHandlerPtr _open = ClickHandlerPtr{ new OpenFileClickHandler() };
|
||||
|
||||
int _position = 0; // < 0 means removed from layout
|
||||
|
||||
private:
|
||||
not_null<Context*> _context;
|
||||
mutable std::shared_ptr<Data::CloudImageView> _thumbnail;
|
||||
|
Reference in New Issue
Block a user