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

new layout items structure started

This commit is contained in:
John Preston
2015-12-20 17:05:07 +03:00
parent 7d8c45ec92
commit cc004d435b
18 changed files with 1056 additions and 389 deletions

View File

@@ -24,13 +24,8 @@ void historyInit();
class HistoryItem;
static const uint32 FullItemSel = 0xFFFFFFFF;
typedef QMap<int32, HistoryItem*> SelectedItemSet;
extern TextParseOptions _textNameOptions, _textDlgOptions;
extern TextParseOptions _historyTextOptions, _historyBotOptions, _historyTextNoMonoOptions, _historyBotNoMonoOptions;
#include "structs.h"
enum NewMessageType {
@@ -765,25 +760,25 @@ public:
class HistoryElem {
public:
HistoryElem() : _height(0), _maxw(0) {
HistoryElem() : _maxw(0), _minh(0), _height(0) {
}
int32 height() const {
return _height;
}
int32 maxWidth() const {
return _maxw;
}
int32 minHeight() const {
return _minh;
}
int32 height() const {
return _height;
}
virtual ~HistoryElem() {
}
protected:
mutable int32 _height, _maxw, _minh;
mutable int32 _maxw, _minh, _height;
HistoryElem &operator=(const HistoryElem &);
};
@@ -1316,6 +1311,7 @@ QString formatSizeText(qint64 size);
QString formatDownloadText(qint64 ready, qint64 total);
QString formatDurationText(qint64 duration);
QString formatDurationAndSizeText(qint64 duration, qint64 size);
QString formatGifAndSizeText(qint64 size);
QString formatPlayedText(qint64 played, qint64 duration);
class HistoryFileMedia : public HistoryMedia {
@@ -2393,6 +2389,3 @@ protected:
QString text;
bool freezed;
};
const TextParseOptions &itemTextOptions(History *h, PeerData *f);
const TextParseOptions &itemTextNoMonoOptions(History *h, PeerData *f);