mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Try to workaround MSVC compiler bug.
This commit is contained in:
parent
303684fef5
commit
8afc245422
1 changed files with 6 additions and 4 deletions
|
@ -93,13 +93,15 @@ bool Panel::preventAutoHide() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Panel::updateControlsGeometry() {
|
void Panel::updateControlsGeometry() {
|
||||||
auto scrollTop = contentTop();
|
const auto scrollTop = contentTop();
|
||||||
auto width = contentWidth();
|
const auto width = contentWidth();
|
||||||
auto scrollHeight = qMax(height() - scrollTop - contentBottom() - scrollMarginBottom(), 0);
|
const auto scrollHeight = qMax(
|
||||||
|
height() - scrollTop - contentBottom() - scrollMarginBottom(),
|
||||||
|
0);
|
||||||
if (scrollHeight > 0) {
|
if (scrollHeight > 0) {
|
||||||
_scroll->setGeometryToRight(contentRight(), scrollTop, width, scrollHeight);
|
_scroll->setGeometryToRight(contentRight(), scrollTop, width, scrollHeight);
|
||||||
}
|
}
|
||||||
if (auto widget = static_cast<TWidget*>(_scroll->widget())) {
|
if (const auto widget = static_cast<TWidget*>(_scroll->widget())) {
|
||||||
widget->resizeToWidth(width);
|
widget->resizeToWidth(width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue