Browse Source

Add space between widgets in left side panel. Closes #7224.

adaptive-webui-19844
Chocobo1 7 years ago
parent
commit
04552f7921
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 7
      src/gui/categoryfilterwidget.cpp
  2. 7
      src/gui/tagfilterwidget.cpp
  3. 12
      src/gui/transferlistfilterswidget.cpp

7
src/gui/categoryfilterwidget.cpp

@ -168,7 +168,12 @@ void CategoryFilterWidget::callUpdateGeometry()
QSize CategoryFilterWidget::sizeHint() const QSize CategoryFilterWidget::sizeHint() const
{ {
return viewportSizeHint(); return {
// Width should be exactly the width of the content
sizeHintForColumn(0),
// Height should be exactly the height of the content
static_cast<int>(sizeHintForRow(0) * (model()->rowCount() + 0.5)),
};
} }
QSize CategoryFilterWidget::minimumSizeHint() const QSize CategoryFilterWidget::minimumSizeHint() const

7
src/gui/tagfilterwidget.cpp

@ -156,7 +156,12 @@ void TagFilterWidget::callUpdateGeometry()
QSize TagFilterWidget::sizeHint() const QSize TagFilterWidget::sizeHint() const
{ {
return viewportSizeHint(); return {
// Width should be exactly the width of the content
sizeHintForColumn(0),
// Height should be exactly the height of the content
static_cast<int>(sizeHintForRow(0) * (model()->rowCount() + 0.5)),
};
} }
QSize TagFilterWidget::minimumSizeHint() const QSize TagFilterWidget::minimumSizeHint() const

12
src/gui/transferlistfilterswidget.cpp

@ -89,12 +89,12 @@ FiltersBase::FiltersBase(QWidget *parent, TransferListWidget *transferList)
QSize FiltersBase::sizeHint() const QSize FiltersBase::sizeHint() const
{ {
QSize size; return {
// Height should be exactly the height of the content // Width should be exactly the width of the content
size.setHeight(((sizeHintForRow(0) + 2 * spacing()) * (count() + 0.5))); sizeHintForColumn(0),
// Width should be exactly the width of the content // Height should be exactly the height of the content
size.setWidth(sizeHintForColumn(0)); static_cast<int>((sizeHintForRow(0) + 2 * spacing()) * (count() + 0.5)),
return size; };
} }
QSize FiltersBase::minimumSizeHint() const QSize FiltersBase::minimumSizeHint() const

Loading…
Cancel
Save