mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinQt: Fix the WiiPane hinting a larger than required size.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user