mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Quick hack to enable touch scrolling in settings and room list
This commit is contained in:
parent
ef5edbb3ea
commit
70f4a89d10
2 changed files with 6 additions and 0 deletions
|
@ -19,6 +19,7 @@
|
|||
|
||||
#include <QObject>
|
||||
#include <QPainter>
|
||||
#include <QScroller>
|
||||
#include <QTimer>
|
||||
|
||||
#include "Logging.h"
|
||||
|
@ -41,6 +42,8 @@ RoomList::RoomList(QWidget *parent)
|
|||
scrollArea_->setWidgetResizable(true);
|
||||
scrollArea_->setAlignment(Qt::AlignLeading | Qt::AlignTop | Qt::AlignVCenter);
|
||||
|
||||
QScroller::grabGesture(scrollArea_, QScroller::TouchGesture);
|
||||
|
||||
// The scrollbar on macOS will hide itself when not active so it won't interfere
|
||||
// with the content.
|
||||
#if not defined(Q_OS_MAC)
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include <QPushButton>
|
||||
#include <QResizeEvent>
|
||||
#include <QScrollArea>
|
||||
#include <QScroller>
|
||||
#include <QSettings>
|
||||
#include <QStandardPaths>
|
||||
#include <QString>
|
||||
|
@ -398,6 +399,8 @@ UserSettingsPage::UserSettingsPage(QSharedPointer<UserSettings> settings, QWidge
|
|||
scrollArea_->setWidgetResizable(true);
|
||||
scrollArea_->setAlignment(Qt::AlignTop | Qt::AlignVCenter);
|
||||
|
||||
QScroller::grabGesture(scrollArea_, QScroller::TouchGesture);
|
||||
|
||||
auto scrollAreaContents_ = new QWidget(this);
|
||||
scrollAreaContents_->setObjectName("UserSettingScrollWidget");
|
||||
scrollAreaContents_->setLayout(mainLayout_);
|
||||
|
|
Loading…
Reference in a new issue