提交 67556faf 编写于 作者: 之一Yo's avatar 之一Yo

fixes #167

上级 c8fb1eb1
......@@ -3,7 +3,7 @@ from PyQt5.QtCore import (QEvent, QEasingCurve, Qt, pyqtSignal, QPropertyAnimati
QTimer, QPoint, QObject)
from PyQt5.QtGui import QPainter, QColor, QMouseEvent
from PyQt5.QtWidgets import (QWidget, QToolButton, QAbstractScrollArea, QGraphicsOpacityEffect,
QHBoxLayout, QVBoxLayout, QApplication, QAbstractItemView)
QHBoxLayout, QVBoxLayout, QApplication, QAbstractItemView, QListView)
from ...common.icon import FluentIcon
from ...common.style_sheet import isDarkTheme
......@@ -488,6 +488,9 @@ class SmoothScrollDelegate(QObject):
if isinstance(parent, QAbstractItemView):
parent.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel)
parent.setHorizontalScrollMode(QAbstractItemView.ScrollPerPixel)
if isinstance(parent, QListView):
parent.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
parent.horizontalScrollBar().setStyleSheet("QScrollBar:horizontal{height: 0px}")
parent.viewport().installEventFilter(self)
parent.setVerticalScrollBarPolicy = self.setVerticalScrollBarPolicy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册