2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 07:35:12 +00:00

Allow using any interface scale between 100%-300%.

This commit is contained in:
John Preston
2018-10-15 14:44:48 +03:00
parent 149639a53d
commit 19a9a990b6
30 changed files with 207 additions and 242 deletions

View File

@@ -838,7 +838,7 @@ Document::Document(
if (withThumb()) {
_data->thumb->load(parent->fullId());
int32 tw = convertScale(_data->thumb->width()), th = convertScale(_data->thumb->height());
int32 tw = ConvertScale(_data->thumb->width()), th = ConvertScale(_data->thumb->height());
if (tw > th) {
_thumbw = (tw * _st.fileThumbSize) / th;
} else {
@@ -1275,15 +1275,15 @@ Link::Link(
_page->photo->thumb->load(parent->fullId(), false, false);
}
tw = convertScale(_page->photo->thumb->width());
th = convertScale(_page->photo->thumb->height());
tw = ConvertScale(_page->photo->thumb->width());
th = ConvertScale(_page->photo->thumb->height());
} else if (_page && _page->document) {
if (!_page->document->thumb->loaded()) {
_page->document->thumb->load(parent->fullId(), false, false);
}
tw = convertScale(_page->document->thumb->width());
th = convertScale(_page->document->thumb->height());
tw = ConvertScale(_page->document->thumb->width());
th = ConvertScale(_page->document->thumb->height());
}
if (tw > st::linksPhotoSize) {
if (th > tw) {