mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
youtube and instagram preview display added (instead of messages with only one such link)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user