Remove tooltip for non-checkable items
This commit is contained in:
@@ -275,9 +275,8 @@ class nwLabels:
|
|||||||
"note": QT_TRANSLATE_NOOP("Constant", "Project Note"),
|
"note": QT_TRANSLATE_NOOP("Constant", "Project Note"),
|
||||||
}
|
}
|
||||||
ACTIVE_NAME = {
|
ACTIVE_NAME = {
|
||||||
"checked": QT_TRANSLATE_NOOP("Constant", "Active"),
|
"checked": QT_TRANSLATE_NOOP("Constant", "Active"),
|
||||||
"unchecked": QT_TRANSLATE_NOOP("Constant", "Inactive"),
|
"unchecked": QT_TRANSLATE_NOOP("Constant", "Inactive"),
|
||||||
"noncheckable": QT_TRANSLATE_NOOP("Constant", "Not Available"),
|
|
||||||
}
|
}
|
||||||
KEY_NAME = {
|
KEY_NAME = {
|
||||||
nwKeyWords.TAG_KEY: QT_TRANSLATE_NOOP("Constant", "Tag"),
|
nwKeyWords.TAG_KEY: QT_TRANSLATE_NOOP("Constant", "Tag"),
|
||||||
|
|||||||
@@ -335,8 +335,14 @@ class NWItem:
|
|||||||
"""Return the relevant active status label and icon for
|
"""Return the relevant active status label and icon for
|
||||||
the current item based on its type.
|
the current item based on its type.
|
||||||
"""
|
"""
|
||||||
key = ("checked" if self._active else "unchecked") if self.isFileType() else "noncheckable"
|
if self.isFileType():
|
||||||
return trConst(nwLabels.ACTIVE_NAME[key]), SHARED.theme.getIcon(key)
|
key = "checked" if self._active else "unchecked"
|
||||||
|
text = trConst(nwLabels.ACTIVE_NAME[key])
|
||||||
|
icon = SHARED.theme.getIcon(key)
|
||||||
|
else:
|
||||||
|
text = ""
|
||||||
|
icon = SHARED.theme.getIcon("noncheckable")
|
||||||
|
return text, icon
|
||||||
|
|
||||||
##
|
##
|
||||||
# Checker Methods
|
# Checker Methods
|
||||||
|
|||||||
@@ -528,10 +528,6 @@ class GuiProjectTree(QTreeView):
|
|||||||
self.setDragEnabled(True)
|
self.setDragEnabled(True)
|
||||||
self.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
|
self.setDragDropMode(QAbstractItemView.DragDropMode.InternalMove)
|
||||||
|
|
||||||
# Disable built-in auto scroll as it isn't working in some Qt
|
|
||||||
# releases (see #1561) and instead use our own implementation
|
|
||||||
# self.setAutoScroll(False)
|
|
||||||
|
|
||||||
# Set selection options
|
# Set selection options
|
||||||
self.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
|
self.setSelectionMode(QAbstractItemView.SelectionMode.ExtendedSelection)
|
||||||
self.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
self.setSelectionBehavior(QAbstractItemView.SelectionBehavior.SelectRows)
|
||||||
@@ -546,13 +542,6 @@ class GuiProjectTree(QTreeView):
|
|||||||
self.collapsed.connect(self._onNodeCollapsed)
|
self.collapsed.connect(self._onNodeCollapsed)
|
||||||
self.expanded.connect(self._onNodeExpanded)
|
self.expanded.connect(self._onNodeExpanded)
|
||||||
|
|
||||||
# Auto Scroll
|
|
||||||
# self._scrollMargin = SHARED.theme.baseIconHeight
|
|
||||||
# self._scrollDirection = 0
|
|
||||||
# self._scrollTimer = QTimer(self)
|
|
||||||
# self._scrollTimer.timeout.connect(self._doAutoScroll)
|
|
||||||
# self._scrollTimer.setInterval(250)
|
|
||||||
|
|
||||||
# Set custom settings
|
# Set custom settings
|
||||||
self.initSettings()
|
self.initSettings()
|
||||||
|
|
||||||
@@ -1160,21 +1149,6 @@ class GuiProjectTree(QTreeView):
|
|||||||
# self._actHandle = tHandle or None
|
# self._actHandle = tHandle or None
|
||||||
return
|
return
|
||||||
|
|
||||||
##
|
|
||||||
# Private Slots
|
|
||||||
##
|
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def _doAutoScroll(self) -> None:
|
|
||||||
"""Scroll one item up or down based on direction value."""
|
|
||||||
# if self._scrollDirection == -1:
|
|
||||||
# self.scrollToItem(self.itemAbove(self.itemAt(1, 1)))
|
|
||||||
# elif self._scrollDirection == 1:
|
|
||||||
# self.scrollToItem(self.itemBelow(self.itemAt(1, self.height() - 1)))
|
|
||||||
# self._scrollDirection = 0
|
|
||||||
# self._scrollTimer.stop()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
class _UpdatableMenu(QMenu):
|
class _UpdatableMenu(QMenu):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user