mirror of
https://github.com/ciromattia/kcc
synced 2025-12-19 12:41:47 +00:00
OSX: Fix status window scrolling
This commit is contained in:
@@ -448,7 +448,7 @@
|
|||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:#000;min-height:0}QScrollBar::add-line:vertical{height:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:#000;min-width:0}QScrollBar::add-line:horizontal{width:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}</string>
|
<string notr="true">QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:#000;min-height:0}QScrollBar::add-line:vertical{height:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:#000;min-width:0}QScrollBar::add-line:horizontal{width:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="showDropIndicator" stdset="0">
|
<property name="showDropIndicator" stdset="0">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
# Form implementation generated from reading ui file 'KCC-OSX.ui'
|
# Form implementation generated from reading ui file 'KCC-OSX.ui'
|
||||||
#
|
#
|
||||||
# Created: Fri Oct 11 13:17:37 2013
|
# Created: Fri Oct 11 19:30:26 2013
|
||||||
# by: PyQt4 UI code generator 4.10.3
|
# by: PyQt4 UI code generator 4.10.3
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@@ -200,7 +200,7 @@ class Ui_KCC(object):
|
|||||||
font.setPointSize(11)
|
font.setPointSize(11)
|
||||||
self.JobList.setFont(font)
|
self.JobList.setFont(font)
|
||||||
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
|
self.JobList.setFocusPolicy(QtCore.Qt.NoFocus)
|
||||||
self.JobList.setStyleSheet(_fromUtf8("QListWidget#JobList {background:#ffffff;background-image:url(:/Other/icons/list_background.png);background-position:center center;background-repeat:no-repeat;}QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:#000;min-height:0}QScrollBar::add-line:vertical{height:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:#000;min-width:0}QScrollBar::add-line:horizontal{width:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}"))
|
self.JobList.setStyleSheet(_fromUtf8("QScrollBar:vertical{border:1px solid #999;background:#FFF;width:5px;margin:0}QScrollBar::handle:vertical{background:#000;min-height:0}QScrollBar::add-line:vertical{height:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:vertical{height:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}QScrollBar:horizontal{border:1px solid #999;background:#FFF;height:5px;margin:0}QScrollBar::handle:horizontal{background:#000;min-width:0}QScrollBar::add-line:horizontal{width:0;background:#000;subcontrol-position:bottom;subcontrol-origin:margin}QScrollBar::sub-line:horizontal{width:0;background:#000;subcontrol-position:top;subcontrol-origin:margin}"))
|
||||||
self.JobList.setProperty("showDropIndicator", False)
|
self.JobList.setProperty("showDropIndicator", False)
|
||||||
self.JobList.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
self.JobList.setSelectionMode(QtGui.QAbstractItemView.NoSelection)
|
||||||
self.JobList.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
self.JobList.setVerticalScrollMode(QtGui.QAbstractItemView.ScrollPerPixel)
|
||||||
|
|||||||
37
other/QT-4.8.5-QListWidget.patch
Normal file
37
other/QT-4.8.5-QListWidget.patch
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
--- qt-4.8.5/src/gui/kernel/qwidget_mac.mm 2011-12-15 10:38:21.000000000 -0800
|
||||||
|
+++ qt-4.8.5/src/gui/kernel/qwidget_mac.mm 2012-09-18 17:17:03.000000000 -0700
|
||||||
|
@@ -1,22 +1,41 @@
|
||||||
|
|
||||||
|
@@ -4684,15 +4703,14 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
// Scroll the whole widget if qscrollRect is not valid:
|
||||||
|
- QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : q->rect();
|
||||||
|
- validScrollRect &= clipRect();
|
||||||
|
+ QRect validScrollRect = qscrollRect.isValid() ? qscrollRect : QRect(0, 0, q->width(), q->height());
|
||||||
|
|
||||||
|
// If q is overlapped by other widgets, we cannot just blit pixels since
|
||||||
|
// this will move overlapping widgets as well. In case we just update:
|
||||||
|
const bool overlapped = isOverlapped(validScrollRect.translated(data.crect.topLeft()));
|
||||||
|
const bool accelerateScroll = accelEnv && isOpaque && !overlapped;
|
||||||
|
const bool isAlien = (q->internalWinId() == 0);
|
||||||
|
- const QPoint scrollDelta(dx, dy);
|
||||||
|
+
|
||||||
|
|
||||||
|
// If qscrollRect is valid, we are _not_ supposed to scroll q's children (as documented).
|
||||||
|
// But we do scroll children (and the whole of q) if qscrollRect is invalid. This case is
|
||||||
|
@@ -4714,7 +4732,6 @@
|
||||||
|
}else {
|
||||||
|
update_sys(qscrollRect);
|
||||||
|
}
|
||||||
|
- return;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef QT_MAC_USE_COCOA
|
||||||
|
@@ -4731,6 +4748,7 @@
|
||||||
|
// moved when the parent is scrolled. All directly or indirectly moved
|
||||||
|
// children will receive a move event before the function call returns.
|
||||||
|
QWidgetList movedChildren;
|
||||||
|
+ const QPoint scrollDelta(dx, dy);
|
||||||
|
if (scrollChildren) {
|
||||||
|
QObjectList children = q->children();
|
||||||
Reference in New Issue
Block a user