diff --git a/bauh/view/qt/window.py b/bauh/view/qt/window.py index 9f450789..b1a13915 100755 --- a/bauh/view/qt/window.py +++ b/bauh/view/qt/window.py @@ -4,9 +4,9 @@ from pathlib import Path from typing import List, Type, Set from PyQt5.QtCore import QEvent, Qt, QSize, pyqtSignal -from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QCursor +from PyQt5.QtGui import QIcon, QWindowStateChangeEvent from PyQt5.QtWidgets import QWidget, QVBoxLayout, QCheckBox, QHeaderView, QToolBar, \ - QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QPushButton, QComboBox, QMenu, QAction, QApplication, QListView + QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QPushButton, QComboBox, QApplication, QListView from bauh.api.abstract.cache import MemoryCache from bauh.api.abstract.context import ApplicationContext @@ -314,12 +314,19 @@ class ManageWindow(QWidget): self.toolbar_bottom.addWidget(new_spacer()) bt_settings = IconButton(QIcon(resource.get_path('img/app_settings.svg')), - action=self._show_settings_menu, + action=self._show_settings, background='#12ABAB', i18n=self.i18n, tooltip=self.i18n['manage_window.bt_settings.tooltip']) self.ref_bt_settings = self.toolbar_bottom.addWidget(bt_settings) + bt_about = IconButton(QIcon(resource.get_path('img/question.svg')), + action=self._show_about, + background='#2E68D3', + i18n=self.i18n, + tooltip=self.i18n['manage_window.settings.about']) + self.ref_bt_about = self.toolbar_bottom.addWidget(bt_about) + self.layout.addWidget(self.toolbar_bottom) qt_utils.centralize(self) @@ -903,6 +910,7 @@ class ManageWindow(QWidget): self.ref_combo_filter_type.setVisible(False) self.ref_combo_categories.setVisible(False) self.ref_bt_settings.setVisible(False) + self.ref_bt_about.setVisible(False) self.thread_animate_progress.stop = False self.thread_animate_progress.start() self.ref_progress_bar.setVisible(True) @@ -943,6 +951,7 @@ class ManageWindow(QWidget): self._change_label_substatus('') self.ref_bt_settings.setVisible(True) + self.ref_bt_about.setVisible(True) self.ref_bt_refresh.setVisible(True) self.checkbox_only_apps.setEnabled(True) @@ -1149,27 +1158,10 @@ class ManageWindow(QWidget): else: self.checkbox_console.setChecked(True) - def show_settings_window(self): + def _show_settings(self): self.settings_window = SettingsWindow(self.manager, self.i18n, self.screen_size, bool(self.tray_icon), self) self.settings_window.setMinimumWidth(int(self.screen_size.width() / 4)) self.settings_window.resize(self.size()) self.settings_window.adjustSize() qt_utils.centralize(self.settings_window) self.settings_window.show() - - def _show_settings_menu(self): - menu_row = QMenu() - - action_settings = QAction(self.i18n['settings'].capitalize()) - action_settings.triggered.connect(self.show_settings_window) - action_settings.setIcon(QIcon(resource.get_path('img/tools.svg'))) - menu_row.addAction(action_settings) - - action_about = QAction(self.i18n['manage_window.settings.about']) - action_about.setIcon(QIcon(resource.get_path('img/about.svg'))) - action_about.triggered.connect(self._show_about) - menu_row.addAction(action_about) - - menu_row.adjustSize() - menu_row.popup(QCursor.pos()) - menu_row.exec_() diff --git a/bauh/view/resources/img/question.svg b/bauh/view/resources/img/question.svg new file mode 100644 index 00000000..d6194738 --- /dev/null +++ b/bauh/view/resources/img/question.svg @@ -0,0 +1,67 @@ + + + + + + image/svg+xml + + + + + + + + + + + + diff --git a/bauh/view/resources/locale/ca b/bauh/view/resources/locale/ca index 620e8d1c..cadd5e6b 100644 --- a/bauh/view/resources/locale/ca +++ b/bauh/view/resources/locale/ca @@ -122,7 +122,7 @@ change=modifica exit=surt manage_window.settings.gems=Tipus d’aplicacions style=estil -manage_window.bt_settings.tooltip=Feu clic aquí per a obrir accions addicionals +manage_window.bt_settings.tooltip=Feu clic aquí per mostrar la configuració downloading=S’està baixant console.install_logs.path=Trobareu registres d’instal·lació a {} author=autor diff --git a/bauh/view/resources/locale/de b/bauh/view/resources/locale/de index a61d3283..8c453a3c 100644 --- a/bauh/view/resources/locale/de +++ b/bauh/view/resources/locale/de @@ -122,7 +122,7 @@ change=Verändern exit=Beenden manage_window.settings.gems=Anwendungsarten style=Stil -manage_window.bt_settings.tooltip=Für mehr Optionen hier klicken +manage_window.bt_settings.tooltip=Klicken Sie hier, um die Einstellungen anzuzeigen downloading=Herunterladen console.install_logs.path=Logs der Installationen können unter {} gefunden werden author=Autor diff --git a/bauh/view/resources/locale/en b/bauh/view/resources/locale/en index 08a0648c..49f882a7 100644 --- a/bauh/view/resources/locale/en +++ b/bauh/view/resources/locale/en @@ -122,7 +122,7 @@ change=change exit=exit manage_window.settings.gems=Application types style=style -manage_window.bt_settings.tooltip=Click here to open extra actions +manage_window.bt_settings.tooltip=Click here to display the settings downloading=Downloading console.install_logs.path=Installation logs can be found at {} author=author diff --git a/bauh/view/resources/locale/es b/bauh/view/resources/locale/es index b20a6eff..425dd68e 100644 --- a/bauh/view/resources/locale/es +++ b/bauh/view/resources/locale/es @@ -122,7 +122,7 @@ change=cambiar exit=salir manage_window.settings.gems=Tipos de aplicaciones style=estilo -manage_window.bt_settings.tooltip=Pulse aquí para abrir acciones adicionales +manage_window.bt_settings.tooltip=Pulse aquí para exhibir las configuraciones downloading=Descargando console.install_logs.path=Los registros de instalación pueden encontrarse en {} author=autor diff --git a/bauh/view/resources/locale/it b/bauh/view/resources/locale/it index 27d78236..c15dc3af 100644 --- a/bauh/view/resources/locale/it +++ b/bauh/view/resources/locale/it @@ -122,7 +122,7 @@ change=Cambia exit=esci manage_window.settings.gems=Tipi di applicazione style=stile -manage_window.bt_settings.tooltip=Fai clic qui per aprire ulteriori azioni +manage_window.bt_settings.tooltip=Fai clic qui per visualizzare le impostazioni downloading=Scaricamento console.install_logs.path=I registri di installazione sono disponibili all'indirizzo {} author=autore diff --git a/bauh/view/resources/locale/pt b/bauh/view/resources/locale/pt index 6ec1834e..aebd3517 100644 --- a/bauh/view/resources/locale/pt +++ b/bauh/view/resources/locale/pt @@ -122,7 +122,7 @@ change=alterar exit=sair manage_window.settings.gems=Tipos de aplicativos style=estilo -manage_window.bt_settings.tooltip=Clique aqui para abrir ações adicionais +manage_window.bt_settings.tooltip=Clique aqui para exibir as configurações downloading=Baixando console.install_logs.path=Os registros de instalação podem ser encontrados em {} author=autor