Quick hack to enable touch scrolling in settings and room list

debug-paginating-typo
Nicolas Werner 5 years ago
parent ef5edbb3ea
commit 70f4a89d10
  1. 3
      src/RoomList.cpp
  2. 3
      src/UserSettingsPage.cpp

@ -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…
Cancel
Save