2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Dialog styles moved from basic.style to dialogs.style.

Many minor design improvements in the new profiles.
New drafts design in the dialogs list: no icon, red badge.
Verified checkbox added to the new profile implementation.
Drafts saving to cloud is delayed for 1 second when switching chats.
Before quitting the app makes an attempt to save drafts (timeout 1.5s).
This commit is contained in:
John Preston
2016-06-07 22:59:39 +03:00
parent 6aca90c478
commit 1859b83e8d
56 changed files with 725 additions and 801 deletions

View File

@@ -29,6 +29,15 @@ public:
RoundButton(QWidget *parent, const QString &text, const style::BoxButton &st);
void setText(const QString &text);
int textWidth() const;
void setFullWidth(int newFullWidth);
enum class TextTransform {
NoTransform,
ToUpper,
};
void setTextTransform(TextTransform transform);
protected:
void paintEvent(QPaintEvent *e) override;
@@ -38,10 +47,12 @@ protected:
private:
void step_over(float64 ms, bool timer);
void updateText();
void resizeToText();
QString _text, _fullText;
int _textWidth;
int _fullWidthOverride = 0;
const style::BoxButton &_st;
@@ -49,6 +60,8 @@ private:
anim::cvalue a_textFg;
Animation _a_over;
TextTransform _transform = TextTransform::NoTransform;
};
} // namespace Ui