mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 02:24:16 +02:00
changing toolbar button styles
This commit is contained in:
129
bauh/resources/img/new_refresh.svg
Executable file
129
bauh/resources/img/new_refresh.svg
Executable file
@@ -0,0 +1,129 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Generator: Adobe Illustrator 16.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
|
||||
<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"
|
||||
version="1.1"
|
||||
id="Capa_1"
|
||||
x="0px"
|
||||
y="0px"
|
||||
width="24.052713"
|
||||
height="24.049257"
|
||||
viewBox="0 0 24.052713 24.049257"
|
||||
xml:space="preserve"
|
||||
sodipodi:docname="new_refresh.svg"
|
||||
inkscape:version="0.92.4 5da689c313, 2019-01-14"><metadata
|
||||
id="metadata45"><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="defs43" /><sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="739"
|
||||
id="namedview41"
|
||||
showgrid="false"
|
||||
showborder="false"
|
||||
inkscape:zoom="5.4800303"
|
||||
inkscape:cx="36.401176"
|
||||
inkscape:cy="3.135095"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="432"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="Capa_1"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0" />
|
||||
<g
|
||||
id="g8"
|
||||
transform="matrix(0.05273507,0,0,0.04925805,-0.82068209,0.02462902)"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#808080">
|
||||
<g
|
||||
id="g6"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#808080">
|
||||
<path
|
||||
d="m 55.323,203.641 c 15.664,0 29.813,-9.405 35.872,-23.854 25.017,-59.604 83.842,-101.61 152.42,-101.61 37.797,0 72.449,12.955 100.23,34.442 l -21.775,3.371 c -7.438,1.153 -13.224,7.054 -14.232,14.512 -1.01,7.454 3.008,14.686 9.867,17.768 l 119.746,53.872 c 5.249,2.357 11.33,1.904 16.168,-1.205 4.83,-3.114 7.764,-8.458 7.796,-14.208 l 0.621,-131.943 c 0.042,-7.506 -4.851,-14.144 -12.024,-16.332 -7.185,-2.188 -14.947,0.589 -19.104,6.837 L 414.403,70.096 C 370.398,26.778 310.1,0 243.615,0 142.806,0 56.133,61.562 19.167,149.06 c -5.134,12.128 -3.84,26.015 3.429,36.987 7.269,10.976 19.556,17.594 32.727,17.594 z"
|
||||
id="path2"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#808080" />
|
||||
<path
|
||||
d="m 464.635,301.184 c -7.27,-10.977 -19.558,-17.594 -32.728,-17.594 -15.664,0 -29.813,9.405 -35.872,23.854 -25.018,59.604 -83.843,101.61 -152.42,101.61 -37.798,0 -72.45,-12.955 -100.232,-34.442 l 21.776,-3.369 c 7.437,-1.153 13.223,-7.055 14.233,-14.514 1.009,-7.453 -3.008,-14.686 -9.867,-17.768 L 49.779,285.089 c -5.25,-2.356 -11.33,-1.905 -16.169,1.205 -4.829,3.114 -7.764,8.458 -7.795,14.207 l -0.622,131.943 c -0.042,7.506 4.85,14.144 12.024,16.332 7.185,2.188 14.948,-0.59 19.104,-6.839 l 16.505,-24.805 c 44.004,43.32 104.303,70.098 170.788,70.098 100.811,0 187.481,-61.561 224.446,-149.059 5.137,-12.128 3.843,-26.014 -3.425,-36.987 z"
|
||||
id="path4"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#ffffff;fill-opacity:1;stroke:#808080" />
|
||||
</g>
|
||||
</g>
|
||||
<g
|
||||
id="g10"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g12"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g14"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g16"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g18"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g20"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g22"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g24"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g26"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g28"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g30"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g32"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g34"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g36"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
<g
|
||||
id="g38"
|
||||
transform="translate(-16.035798,-463.20537)">
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.3 KiB |
@@ -26,7 +26,9 @@ manage_window.status.searching=Searching
|
||||
manage_window.status.installing=Installing
|
||||
manage_window.status.refreshing_app=Refreshing
|
||||
manage_window.status.running_app=Running {}
|
||||
manage_window.bt.refresh.text=Refresh
|
||||
manage_window.bt.refresh.tooltip=Reload the data about installed applications
|
||||
manage_window.bt.upgrade.text=Upgrade
|
||||
manage_window.bt.upgrade.tooltip=Upgrade all checked applications
|
||||
manage_window.checkbox.show_details=Show details
|
||||
popup.root.title=Requires root privileges
|
||||
|
||||
@@ -28,7 +28,9 @@ manage_window.status.searching=Buscando
|
||||
manage_window.status.installing=Instalando
|
||||
manage_window.status.refreshing_app=Actualizando
|
||||
manage_window.status.running_app=Ejecutando {}
|
||||
manage_window.bt.refresh.text=Recargar
|
||||
manage_window.bt.refresh.tooltip=Recarga los datos sobre los aplicativos instalados
|
||||
manage_window.bt.upgrade.text=Actualizar
|
||||
manage_window.bt.upgrade.tooltip=Actualiza todos los aplicativos marcados
|
||||
manage_window.checkbox.show_details=Mostrar detalles
|
||||
popup.root.title=Requiere privilegios de root
|
||||
|
||||
@@ -28,7 +28,9 @@ manage_window.status.searching=Buscando
|
||||
manage_window.status.installing=Instalando
|
||||
manage_window.status.refreshing_app=Atualizando
|
||||
manage_window.status.running_app=Iniciando {}
|
||||
manage_window.bt.refresh.text=Recarregar
|
||||
manage_window.bt.refresh.tooltip=Recarrega os dados sobre os aplicativos instalados
|
||||
manage_window.bt.upgrade.text=Atualizar
|
||||
manage_window.bt.upgrade.tooltip=Atualiza todos os aplicativos marcados
|
||||
manage_window.checkbox.show_details=Mostrar detalhes
|
||||
popup.root.title=Requer privilégios de root
|
||||
|
||||
@@ -59,7 +59,7 @@ class UpdateToggleButton(QWidget):
|
||||
self.bt.clicked.connect(self.change_state)
|
||||
|
||||
self.bt.setIcon(QIcon(resource.get_path('img/app_update.svg')))
|
||||
self.bt.setStyleSheet('QToolButton { background: #4EC306 } ' +
|
||||
self.bt.setStyleSheet('QToolButton { background: #20A435 } ' +
|
||||
'QToolButton:checked { background: gray }')
|
||||
layout.addWidget(self.bt)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ from typing import List, Set
|
||||
from PyQt5.QtCore import QEvent, Qt, QSize, pyqtSignal
|
||||
from PyQt5.QtGui import QIcon, QWindowStateChangeEvent, QPixmap
|
||||
from PyQt5.QtWidgets import QWidget, QVBoxLayout, QApplication, QCheckBox, QHeaderView, QToolButton, QToolBar, \
|
||||
QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QHBoxLayout
|
||||
QLabel, QPlainTextEdit, QLineEdit, QProgressBar, QHBoxLayout, QPushButton
|
||||
from bauh_api.abstract.controller import ApplicationManager
|
||||
from bauh_api.abstract.model import Application
|
||||
from bauh_api.abstract.view import MessageType
|
||||
@@ -89,6 +89,7 @@ class ManageWindow(QWidget):
|
||||
self.layout.addWidget(self.toolbar_top)
|
||||
|
||||
toolbar = QToolBar()
|
||||
toolbar.setStyleSheet('QToolBar {spacing: 3px;}')
|
||||
|
||||
self.checkbox_updates = QCheckBox()
|
||||
self.checkbox_updates.setText(self.locale_keys['updates'].capitalize())
|
||||
@@ -107,16 +108,19 @@ class ManageWindow(QWidget):
|
||||
|
||||
toolbar.addWidget(new_spacer())
|
||||
|
||||
self.bt_refresh = QToolButton()
|
||||
self.bt_refresh = QPushButton()
|
||||
self.bt_refresh.setToolTip(locale_keys['manage_window.bt.refresh.tooltip'])
|
||||
self.bt_refresh.setIcon(QIcon(resource.get_path('img/refresh.svg')))
|
||||
self.bt_refresh.setIcon(QIcon(resource.get_path('img/new_refresh.svg')))
|
||||
self.bt_refresh.setText(self.locale_keys['manage_window.bt.refresh.text'])
|
||||
self.bt_refresh.setStyleSheet('QPushButton { background: #2368AD; color: white; font-weight: bold;} QPushButton:disabled { background: gray }')
|
||||
self.bt_refresh.clicked.connect(lambda: self.refresh_apps(keep_console=False))
|
||||
toolbar.addWidget(self.bt_refresh)
|
||||
|
||||
self.bt_upgrade = QToolButton()
|
||||
self.bt_upgrade = QPushButton()
|
||||
self.bt_upgrade.setToolTip(locale_keys['manage_window.bt.upgrade.tooltip'])
|
||||
self.bt_upgrade.setIcon(QIcon(resource.get_path('img/update_green.svg')))
|
||||
self.bt_upgrade.setEnabled(False)
|
||||
self.bt_upgrade.setIcon(QIcon(resource.get_path('img/app_update.svg')))
|
||||
self.bt_upgrade.setText(locale_keys['manage_window.bt.upgrade.text'])
|
||||
self.bt_upgrade.setStyleSheet('QPushButton { background: #20A435; color: white; font-weight: bold;} QPushButton:disabled { background: gray }') # 19CC24 19B622
|
||||
self.bt_upgrade.clicked.connect(self.update_selected)
|
||||
self.ref_bt_upgrade = toolbar.addWidget(self.bt_upgrade)
|
||||
|
||||
@@ -437,7 +441,7 @@ class ManageWindow(QWidget):
|
||||
self.resize_and_center(accept_lower_width=visible_apps > 0)
|
||||
|
||||
def change_update_state(self, change_filters: bool = True):
|
||||
enable_bt_update = False
|
||||
show_bt_upgrade = False
|
||||
app_updates, library_updates, not_installed = 0, 0, 0
|
||||
|
||||
for app_v in self.apps:
|
||||
@@ -452,10 +456,10 @@ class ManageWindow(QWidget):
|
||||
|
||||
for app_v in self.apps:
|
||||
if not_installed == 0 and app_v.visible and app_v.update_checked:
|
||||
enable_bt_update = True
|
||||
show_bt_upgrade = True
|
||||
break
|
||||
|
||||
self.bt_upgrade.setEnabled(enable_bt_update)
|
||||
self.ref_bt_upgrade.setVisible(show_bt_upgrade)
|
||||
|
||||
total_updates = app_updates + library_updates
|
||||
|
||||
@@ -535,6 +539,8 @@ class ManageWindow(QWidget):
|
||||
if available_types:
|
||||
for app_type in sorted(list(available_types)):
|
||||
checkbox_app_type = QCheckBox()
|
||||
# TODO
|
||||
# checkbox_app_type.setStyleSheet('QCheckBox::indicator:checked { border: 2px solid gray; background: white; } QCheckBox::indicator:unchecked { border: 1px solid; background: none; }')
|
||||
checkbox_app_type.setChecked(True)
|
||||
checkbox_app_type.setText(app_type.capitalize())
|
||||
|
||||
@@ -597,7 +603,7 @@ class ManageWindow(QWidget):
|
||||
if self._can_notify_user():
|
||||
util.notify_user(self.locale_keys['notification.update_selected.failed'])
|
||||
|
||||
self.bt_upgrade.setEnabled(True)
|
||||
self.ref_bt_upgrade.setVisible(True)
|
||||
self.checkbox_console.setChecked(True)
|
||||
|
||||
def _update_action_output(self, output: str):
|
||||
@@ -611,7 +617,7 @@ class ManageWindow(QWidget):
|
||||
self.ref_progress_bar.setVisible(True)
|
||||
|
||||
self.label_status.setText(action_label + "...")
|
||||
self.bt_upgrade.setEnabled(False)
|
||||
self.ref_bt_upgrade.setVisible(False)
|
||||
self.bt_refresh.setEnabled(False)
|
||||
self.checkbox_only_apps.setEnabled(False)
|
||||
self.table_apps.setEnabled(False)
|
||||
|
||||
Reference in New Issue
Block a user