mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 04:04:15 +02:00
about with the supported package types icons
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
from PyQt5.QtCore import Qt
|
from glob import glob
|
||||||
from PyQt5.QtGui import QPixmap
|
|
||||||
from PyQt5.QtWidgets import QVBoxLayout, QDialog, QLabel
|
|
||||||
|
|
||||||
from bauh import __version__, __app_name__
|
from PyQt5.QtCore import Qt
|
||||||
|
from PyQt5.QtGui import QPixmap, QIcon
|
||||||
|
from PyQt5.QtWidgets import QVBoxLayout, QDialog, QLabel, QWidget, QHBoxLayout
|
||||||
|
|
||||||
|
from bauh import __version__, __app_name__, ROOT_DIR
|
||||||
from bauh.view.util import resource
|
from bauh.view.util import resource
|
||||||
|
|
||||||
PROJECT_URL = 'https://github.com/vinifmor/' + __app_name__
|
PROJECT_URL = 'https://github.com/vinifmor/' + __app_name__
|
||||||
@@ -29,6 +31,21 @@ class AboutDialog(QDialog):
|
|||||||
|
|
||||||
layout.addWidget(QLabel(''))
|
layout.addWidget(QLabel(''))
|
||||||
|
|
||||||
|
available_gems = [f for f in glob('{}/gems/*'.format(ROOT_DIR)) if not f.endswith('.py')]
|
||||||
|
available_gems.sort()
|
||||||
|
|
||||||
|
gems_widget = QWidget()
|
||||||
|
gems_widget.setLayout(QHBoxLayout())
|
||||||
|
|
||||||
|
for gem_path in available_gems:
|
||||||
|
icon = QLabel()
|
||||||
|
pxmap = QPixmap(gem_path + '/resources/img/{}.png'.format(gem_path.split('/')[-1]))
|
||||||
|
icon.setPixmap(pxmap.scaled(24, 24, Qt.KeepAspectRatio, Qt.SmoothTransformation))
|
||||||
|
gems_widget.layout().addWidget(icon)
|
||||||
|
|
||||||
|
layout.addWidget(gems_widget)
|
||||||
|
layout.addWidget(QLabel(''))
|
||||||
|
|
||||||
line_desc = QLabel(self)
|
line_desc = QLabel(self)
|
||||||
line_desc.setStyleSheet('font-size: 12px; font-weight: bold;')
|
line_desc.setStyleSheet('font-size: 12px; font-weight: bold;')
|
||||||
line_desc.setText(locale_keys['about.info.desc'])
|
line_desc.setText(locale_keys['about.info.desc'])
|
||||||
|
|||||||
Reference in New Issue
Block a user