Skip to content

Commit

Permalink
Workaround for enormous contents size of item-views
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujan committed Feb 10, 2023
1 parent 990763d commit f64a347
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Kvantum/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
V1.0.9
---------
* Fixed a regression that caused crashes in QML apps and LibreOffice when the widget animation was disabled.
* Workaround for bad codes that give an enormous contents size to item-views.

V1.0.8
---------
Expand Down
6 changes: 4 additions & 2 deletions Kvantum/style/Kvantum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4674,7 +4674,8 @@ void Style::drawPrimitive(QStyle::PrimitiveElement element,
&& opacityTimer_ && opacityTimer_->isActive()
&& (!status.startsWith(QLatin1String("normal"))
|| animationStartState_.startsWith(QLatin1String("focused"))));
bool animate(opacityTimer_ && cb && cb->isEnabled()
bool animate(opacityTimer_
&& cb && cb->isEnabled()
&& (mouseAnimation
|| (animatedWidgetOut_ == widget
&& opacityTimerOut_->isActive()
Expand Down Expand Up @@ -14668,8 +14669,9 @@ QSize Style::sizeFromContents(QStyle::ContentsType type,
const size_spec sspec = getSizeSpec("ItemView");
s = s.expandedTo(QSize(0, // minW doesn't have meaning here
sspec.minH + (sspec.incrementH ? s.height() : 0)));
return s;
}
return s.expandedTo(contentsSize);
return contentsSize;
}

case CT_TabWidget : {
Expand Down

0 comments on commit f64a347

Please sign in to comment.