mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Ios scroll by gesture
This commit is contained in:
parent
2de168b3fe
commit
665d6ebb78
@ -97,6 +97,11 @@ MainWindow::MainWindow(QWidget * parent)
|
||||
#endif
|
||||
ui->tabListWidget->setCurrentIndex(i);
|
||||
});
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
QScroller::grabGesture(ui->tabSelectList, QScroller::LeftMouseButtonGesture);
|
||||
ui->tabSelectList->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
#endif
|
||||
|
||||
if(settings["launcher"]["updateOnStartup"].Bool())
|
||||
UpdateDialog::showUpdateDialog(false);
|
||||
|
@ -46,7 +46,7 @@
|
||||
</size>
|
||||
</property>
|
||||
<property name="verticalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAsNeeded</enum>
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
</property>
|
||||
<property name="horizontalScrollBarPolicy">
|
||||
<enum>Qt::ScrollBarAlwaysOff</enum>
|
||||
@ -78,6 +78,9 @@
|
||||
<property name="flow">
|
||||
<enum>QListView::TopToBottom</enum>
|
||||
</property>
|
||||
<property name="isWrapping" stdset="0">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="resizeMode">
|
||||
<enum>QListView::Adjust</enum>
|
||||
</property>
|
||||
@ -94,7 +97,7 @@
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="wordWrap">
|
||||
<bool>true</bool>
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
|
@ -102,6 +102,17 @@ CModListView::CModListView(QWidget * parent)
|
||||
{
|
||||
manager->resetRepositories();
|
||||
}
|
||||
|
||||
#ifdef Q_OS_IOS
|
||||
for(auto * scrollWidget : {
|
||||
(QAbstractItemView*)ui->allModsView,
|
||||
(QAbstractItemView*)ui->screenshotsList})
|
||||
{
|
||||
QScroller::grabGesture(scrollWidget, QScroller::LeftMouseButtonGesture);
|
||||
scrollWidget->setVerticalScrollMode(QAbstractItemView::ScrollPerPixel);
|
||||
scrollWidget->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void CModListView::loadRepositories()
|
||||
|
Loading…
x
Reference in New Issue
Block a user