DolphinQt: Fix the WiiPane hinting a larger than required size.

This commit is contained in:
Jordan Woyak committed 2025-05-26 20:58:48 -05:00
1 parent 5bc661aeca
commit 1e4dfc0956
2 files changed
+18 -5

No files matched your search

+14
View File
@@ -19,4 +19,18 @@ QWidget* CreateIconWarning(QWidget* parent, QStyle::StandardPixmap standard_pixm
// Similar to QWidget::adjustSize except maximum size is 9/10 of screen rather than 2/3.
void AdjustSizeWithinScreen(QWidget* widget);
// A QWidget that returns the minimumSizeHint as the primary sizeHint.
// Useful for QListWidget which hints a fairly large height even when entirely empty.
// Usage: QtUtils::MinimumSizeHintWidget<QListWidget>
template <typename Widget>
class MinimumSizeHintWidget : public Widget
{
public:
using Widget::Widget;
// Note: Some widget (e.g. QPushButton) minimumSizeHint implementations themselves use sizeHint,
// which would cause this to stack overflow.
QSize sizeHint() const override { return Widget::minimumSizeHint(); }
};
} // namespace QtUtils