From 6671bb33a4d5d06e1340136c3d24b860bafc0e0e Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Fri, 27 Nov 2015 19:18:20 +0800 Subject: [PATCH] gui/log: improve vertical scrolling --- artiq/gui/log.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/artiq/gui/log.py b/artiq/gui/log.py index abec2280a..881367b0e 100644 --- a/artiq/gui/log.py +++ b/artiq/gui/log.py @@ -151,7 +151,7 @@ class _LogFilterProxyModel(QSortFilterProxyModel): self.invalidateFilter() -class LogDock(dockarea.Dock): +class _LogDock(dockarea.Dock): def __init__(self, manager, name, log_sub): dockarea.Dock.__init__(self, name, label="Log", size=(1000, 300)) @@ -181,6 +181,8 @@ class LogDock(dockarea.Dock): self.log.verticalHeader().hide() self.log.setHorizontalScrollMode( QtGui.QAbstractItemView.ScrollPerPixel) + self.log.setVerticalScrollMode( + QtGui.QAbstractItemView.ScrollPerPixel) self.log.setShowGrid(False) self.log.setTextElideMode(QtCore.Qt.ElideNone) grid.addWidget(self.log, 1, 0, colspan=4) @@ -278,7 +280,7 @@ class LogDockManager: n += 1 name = "log" + str(n) - dock = LogDock(self, name, self.log_sub) + dock = _LogDock(self, name, self.log_sub) self.docks[name] = dock if add_to_area: self.dock_area.addDock(dock) @@ -303,7 +305,7 @@ class LogDockManager: if self.docks: raise NotImplementedError for name, dock_state in state.items(): - dock = LogDock(self, name, self.log_sub) + dock = _LogDock(self, name, self.log_sub) dock.restore_state(dock_state) self.dock_area.addDock(dock) self.docks[name] = dock