mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-08 01:34:15 +02:00
[ui] fix -> some application icons without a full path are not being rendered on the 'Upgrade summary'
This commit is contained in:
@@ -87,6 +87,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||||||
- crashing when nothing can be upgraded
|
- crashing when nothing can be upgraded
|
||||||
- random C++ wrapper errors with some forms due to missing references
|
- random C++ wrapper errors with some forms due to missing references
|
||||||
- application icons that cannot be rendered are being displayed as an empty space (now the type icon is displayed instead)
|
- application icons that cannot be rendered are being displayed as an empty space (now the type icon is displayed instead)
|
||||||
|
- some application icons without a full path are not being rendered on the 'Upgrade summary'
|
||||||
|
|
||||||
|
|
||||||
## [0.9.6] 2020-06-26
|
## [0.9.6] 2020-06-26
|
||||||
|
|||||||
@@ -268,7 +268,10 @@ class RadioButtonQt(QRadioButton):
|
|||||||
self.toggled.connect(self._set_checked)
|
self.toggled.connect(self._set_checked)
|
||||||
|
|
||||||
if model.icon_path:
|
if model.icon_path:
|
||||||
self.setIcon(QIcon(model.icon_path))
|
if model.icon_path.startswith('/'):
|
||||||
|
self.setIcon(QIcon(model.icon_path))
|
||||||
|
else:
|
||||||
|
self.setIcon(QIcon.fromTheme(model.icon_path))
|
||||||
|
|
||||||
if self.model.read_only:
|
if self.model.read_only:
|
||||||
self.setAttribute(Qt.WA_TransparentForMouseEvents)
|
self.setAttribute(Qt.WA_TransparentForMouseEvents)
|
||||||
@@ -291,7 +294,10 @@ class CheckboxQt(QCheckBox):
|
|||||||
self.setToolTip(model.tooltip)
|
self.setToolTip(model.tooltip)
|
||||||
|
|
||||||
if model.icon_path:
|
if model.icon_path:
|
||||||
self.setIcon(QIcon(model.icon_path))
|
if model.icon_path.startswith('/'):
|
||||||
|
self.setIcon(QIcon(model.icon_path))
|
||||||
|
else:
|
||||||
|
self.setIcon(QIcon.fromTheme(model.icon_path))
|
||||||
|
|
||||||
if model.read_only:
|
if model.read_only:
|
||||||
self.setAttribute(Qt.WA_TransparentForMouseEvents)
|
self.setAttribute(Qt.WA_TransparentForMouseEvents)
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ from typing import List, Type, Set, Tuple
|
|||||||
|
|
||||||
import requests
|
import requests
|
||||||
from PyQt5.QtCore import QThread, pyqtSignal
|
from PyQt5.QtCore import QThread, pyqtSignal
|
||||||
|
from PyQt5.QtGui import QIcon
|
||||||
|
|
||||||
from bauh import LOGS_PATH
|
from bauh import LOGS_PATH
|
||||||
from bauh.api.abstract.cache import MemoryCache
|
from bauh.api.abstract.cache import MemoryCache
|
||||||
@@ -196,7 +197,9 @@ class UpgradeSelected(AsyncAction):
|
|||||||
if req.pkg.installed:
|
if req.pkg.installed:
|
||||||
icon_path = req.pkg.get_disk_icon_path()
|
icon_path = req.pkg.get_disk_icon_path()
|
||||||
|
|
||||||
if not icon_path or not os.path.isfile(icon_path):
|
if not icon_path:
|
||||||
|
icon_path = req.pkg.get_type_icon_path()
|
||||||
|
elif not os.path.isfile(icon_path) and QIcon.fromTheme(icon_path).isNull():
|
||||||
icon_path = req.pkg.get_type_icon_path()
|
icon_path = req.pkg.get_type_icon_path()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user