mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 08:14:16 +02:00
[ui] about and settings actions split
This commit is contained in:
@@ -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_()
|
||||
|
||||
67
bauh/view/resources/img/question.svg
Normal file
67
bauh/view/resources/img/question.svg
Normal file
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Capa_1"
|
||||
enable-background="new 0 0 512 512"
|
||||
height="512"
|
||||
viewBox="0 0 512 512"
|
||||
width="512"
|
||||
version="1.1"
|
||||
sodipodi:docname="question.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14">
|
||||
<metadata
|
||||
id="metadata877">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs875" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1360"
|
||||
inkscape:window-height="703"
|
||||
id="namedview873"
|
||||
showgrid="false"
|
||||
showborder="false"
|
||||
inkscape:zoom="0.17712196"
|
||||
inkscape:cx="-1248.9069"
|
||||
inkscape:cy="793.31938"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="0"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1" />
|
||||
<g
|
||||
id="g870"
|
||||
style="fill:#ffffff">
|
||||
<circle
|
||||
cx="256"
|
||||
cy="452"
|
||||
r="60"
|
||||
id="circle866"
|
||||
style="fill:#ffffff" />
|
||||
<path
|
||||
d="m256 0c-86.019 0-156 69.981-156 156v15h120v-15c0-19.851 16.149-36 36-36s36 16.149 36 36c0 10.578-4.643 20.59-12.74 27.471l-83.26 70.787v107.742h120v-52.258l40.976-34.837c34.968-29.714 55.024-73.052 55.024-118.905 0-86.019-69.981-156-156-156z"
|
||||
id="path868"
|
||||
style="fill:#ffffff" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user