2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

youtube and instagram preview display added (instead of messages with only one such link)

This commit is contained in:
John Preston
2014-11-12 23:18:00 +03:00
parent e0ef1d434d
commit a75f57beb8
25 changed files with 874 additions and 126 deletions

View File

@@ -104,6 +104,17 @@ DeclareSetting(DBIScale, ScreenScale);
DeclareSetting(DBIScale, ConfigScale);
DeclareSetting(bool, CompressPastedImage);
template <typename T>
T convertScale(T v) {
switch (cScale()) {
case dbisOneAndQuarter: return qRound(float64(v) * 1.25 - 0.01);
case dbisOneAndHalf: return qRound(float64(v) * 1.5 - 0.01);
case dbisTwo: return v * 2;
}
return v;
}
inline DBIScale cEvalScale(DBIScale scale) {
return (scale == dbisAuto) ? cScreenScale() : scale;
}