fix: only show scrollbars when needed
Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
parent
aaef448959
commit
c8d8dda79a
@ -47,7 +47,6 @@ IconPickerDialog::IconPickerDialog(QWidget *parent)
|
|||||||
contentsWidget->setUniformItemSizes(true);
|
contentsWidget->setUniformItemSizes(true);
|
||||||
contentsWidget->setTextElideMode(Qt::ElideRight);
|
contentsWidget->setTextElideMode(Qt::ElideRight);
|
||||||
contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||||
contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
|
||||||
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
contentsWidget->setItemDelegate(new ListViewDelegate());
|
contentsWidget->setItemDelegate(new ListViewDelegate());
|
||||||
|
|
||||||
|
@ -29,7 +29,6 @@ ImportResourcePackDialog::ImportResourcePackDialog(QWidget* parent) : QDialog(pa
|
|||||||
// NOTE: We can't have uniform sizes because the text may wrap if it's too long. If we set this, it will cut off the wrapped text.
|
// NOTE: We can't have uniform sizes because the text may wrap if it's too long. If we set this, it will cut off the wrapped text.
|
||||||
contentsWidget->setUniformItemSizes(false);
|
contentsWidget->setUniformItemSizes(false);
|
||||||
contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
contentsWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||||
contentsWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
|
|
||||||
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
contentsWidget->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||||
contentsWidget->setItemDelegate(new ListViewDelegate());
|
contentsWidget->setItemDelegate(new ListViewDelegate());
|
||||||
|
|
||||||
|
@ -25,9 +25,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextEdit" name="noteEditor">
|
<widget class="QTextEdit" name="noteEditor">
|
||||||
<property name="verticalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
|
||||||
</property>
|
|
||||||
<property name="tabChangesFocus">
|
<property name="tabChangesFocus">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -48,9 +48,6 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="verticalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
|
||||||
</property>
|
|
||||||
<property name="readOnly">
|
<property name="readOnly">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
|
@ -28,9 +28,6 @@
|
|||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
<item>
|
<item>
|
||||||
<widget class="ModListView" name="packageView">
|
<widget class="ModListView" name="packageView">
|
||||||
<property name="verticalScrollBarPolicy">
|
|
||||||
<enum>Qt::ScrollBarAlwaysOn</enum>
|
|
||||||
</property>
|
|
||||||
<property name="horizontalScrollBarPolicy">
|
<property name="horizontalScrollBarPolicy">
|
||||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -31,7 +31,6 @@ ModListView::ModListView ( QWidget* parent )
|
|||||||
setSelectionMode ( QAbstractItemView::ExtendedSelection );
|
setSelectionMode ( QAbstractItemView::ExtendedSelection );
|
||||||
setHeaderHidden ( false );
|
setHeaderHidden ( false );
|
||||||
setSelectionBehavior(QAbstractItemView::SelectRows);
|
setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||||
setVerticalScrollBarPolicy ( Qt::ScrollBarAlwaysOn );
|
|
||||||
setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
|
setHorizontalScrollBarPolicy ( Qt::ScrollBarAsNeeded );
|
||||||
setDropIndicatorShown(true);
|
setDropIndicatorShown(true);
|
||||||
setDragEnabled(true);
|
setDragEnabled(true);
|
||||||
|
Loading…
Reference in New Issue
Block a user