forked from trav/lintunes
v0.91.3: no focus box round the clicked cell in lists; the row's highlight is enough
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
"""LinTunes — iTunes-style music library manager and player for Linux."""
|
||||
|
||||
__version__ = "0.91.2"
|
||||
__version__ = "0.91.3"
|
||||
|
||||
@@ -131,6 +131,15 @@ class ClickToJumpScrollStyle(QProxyStyle):
|
||||
return QRect(rect)
|
||||
return QRect() # SubLine / AddLine / First / Last: no arrows
|
||||
|
||||
def drawPrimitive(self, element, option, painter, widget=None):
|
||||
if element == QStyle.PrimitiveElement.PE_FrameFocusRect and (
|
||||
isinstance(widget, QAbstractItemView)
|
||||
or isinstance(widget and widget.parent(), QAbstractItemView)):
|
||||
# A list shows what's chosen by highlighting the whole row; a
|
||||
# box round the clicked cell on top of that says nothing more.
|
||||
return
|
||||
super().drawPrimitive(element, option, painter, widget)
|
||||
|
||||
def drawControl(self, element, option, painter, widget=None):
|
||||
if element == QStyle.ControlElement.CE_MenuBarEmptyArea:
|
||||
# Fusion rules a line under a main window's menu bar; the top
|
||||
|
||||
Reference in New Issue
Block a user