mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-09 20:04:15 +02:00
Fix images issues on HDPI resolution
This commit is contained in:
@@ -2,7 +2,7 @@ import os
|
||||
from threading import Lock
|
||||
from typing import List
|
||||
|
||||
from PyQt5.QtCore import Qt, QUrl
|
||||
from PyQt5.QtCore import Qt, QUrl, QSize
|
||||
from PyQt5.QtGui import QPixmap, QIcon, QCursor
|
||||
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest, QNetworkReply
|
||||
from PyQt5.QtWidgets import QTableWidget, QTableView, QMenu, QAction, QTableWidgetItem, QToolButton, QWidget, \
|
||||
@@ -77,7 +77,7 @@ class AppsTable(QTableWidget):
|
||||
self.setHorizontalHeaderLabels(['' for _ in range(self.columnCount())])
|
||||
self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.icon_logo = QIcon(resource.get_path('img/logo.svg'))
|
||||
self.pixmap_verified = QPixmap(resource.get_path('img/verified.svg'))
|
||||
self.pixmap_verified = QIcon(resource.get_path('img/verified.svg')).pixmap(QSize(10, 10))
|
||||
|
||||
self.network_man = QNetworkAccessManager()
|
||||
self.network_man.finished.connect(self._load_icon_and_cache)
|
||||
@@ -426,7 +426,7 @@ class AppsTable(QTableWidget):
|
||||
def run():
|
||||
self.window.run_app(pkg)
|
||||
|
||||
item.addWidget(IconButton(icon_path=resource.get_path('img/app_play.png'), action=run, background='#088A08', tooltip=self.i18n['action.run.tooltip']))
|
||||
item.addWidget(IconButton(icon_path=resource.get_path('img/app_play.svg'), action=run, background='#088A08', tooltip=self.i18n['action.run.tooltip']))
|
||||
|
||||
if pkg.model.has_info():
|
||||
|
||||
|
||||
@@ -118,7 +118,8 @@ class ManageWindow(QWidget):
|
||||
self.toolbar_search.addWidget(self.input_search)
|
||||
|
||||
label_pos_search = QLabel()
|
||||
label_pos_search.setPixmap(QPixmap(resource.get_path('img/search.svg')))
|
||||
# label_pos_search.setPixmap(QPixmap(resource.get_path('img/search.svg')))
|
||||
label_pos_search.setPixmap(QIcon(resource.get_path('img/search.svg')).pixmap(QSize(10,10)))
|
||||
label_pos_search.setStyleSheet("""
|
||||
background: white; padding-right: 10px;
|
||||
border-top-right-radius: 5px;
|
||||
@@ -157,7 +158,7 @@ class ManageWindow(QWidget):
|
||||
self.combo_filter_type.lineEdit().setReadOnly(True)
|
||||
self.combo_filter_type.lineEdit().setAlignment(Qt.AlignCenter)
|
||||
self.combo_filter_type.activated.connect(self._handle_type_filter)
|
||||
self.combo_filter_type.addItem(load_icon(resource.get_path('img/logo.svg'), 14), self.i18n['type'].capitalize(), self.any_type_filter)
|
||||
self.combo_filter_type.addItem(load_icon(resource.get_path('img/logo.svg'), 48), self.i18n['type'].capitalize(), self.any_type_filter)
|
||||
self.ref_combo_filter_type = self.toolbar.addWidget(self.combo_filter_type)
|
||||
|
||||
self.any_category_filter = 'any'
|
||||
@@ -777,7 +778,7 @@ class ManageWindow(QWidget):
|
||||
icon = self.cache_type_filter_icons.get(app_type)
|
||||
|
||||
if not icon:
|
||||
icon = load_icon(icon_path, 14)
|
||||
icon = load_icon(icon_path, 18)
|
||||
self.cache_type_filter_icons[app_type] = icon
|
||||
|
||||
self.combo_filter_type.addItem(icon, app_type.capitalize(), app_type)
|
||||
|
||||
Reference in New Issue
Block a user