mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 01:14:15 +02:00
[view] improvement: displaying tips for some custom actions (on mouse hover)
This commit is contained in:
@@ -176,9 +176,11 @@ class PackagesTable(QTableWidget):
|
||||
i18n=self.i18n).ask():
|
||||
self.window.begin_execute_custom_action(pkg, action)
|
||||
|
||||
tip = self.i18n[action.i18n_description_key] if action.i18n_description_key else None
|
||||
return QCustomMenuAction(parent=parent,
|
||||
label=self.i18n[action.i18n_label_key],
|
||||
icon=QIcon(action.icon_path) if action.icon_path else None,
|
||||
tooltip=tip,
|
||||
action=custom_action)
|
||||
|
||||
def refresh(self, pkg: PackageView):
|
||||
|
||||
@@ -1508,9 +1508,11 @@ class ManageWindow(QWidget):
|
||||
else:
|
||||
icon = None
|
||||
|
||||
tip = self.i18n[action.i18n_description_key] if action.i18n_description_key else None
|
||||
return QCustomMenuAction(parent=parent,
|
||||
label=self.i18n[action.i18n_label_key],
|
||||
action=lambda: self.begin_execute_custom_action(None, action),
|
||||
tooltip=tip,
|
||||
icon=icon)
|
||||
|
||||
def show_custom_actions(self):
|
||||
|
||||
Reference in New Issue
Block a user