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

new photoviewer adapted for documents

This commit is contained in:
John Preston
2015-04-19 13:29:19 +03:00
parent 9b3767e77c
commit 370c47d95b
25 changed files with 564 additions and 270 deletions

View File

@@ -106,8 +106,10 @@ void AbstractBox::setMaxHeight(int32 maxHeight) {
void AbstractBox::resizeMaxHeight(int32 newWidth, int32 maxHeight) {
if (width() != newWidth || _maxHeight != maxHeight) {
QRect g(geometry());
_maxHeight = maxHeight;
resize(newWidth, countHeight());
if (parentWidget()) parentWidget()->update(geometry().united(g).marginsAdded(QMargins(st::boxShadow.pxWidth(), st::boxShadow.pxHeight(), st::boxShadow.pxWidth(), st::boxShadow.pxHeight())));
}
}