Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Apr 5, 2024
1 parent 4314e5a commit b888747
Showing 1 changed file with 6 additions and 15 deletions.
21 changes: 6 additions & 15 deletions napari_plugin_manager/qt_plugin_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)
from napari.utils.translations import trans
from qtpy.QtCore import QEvent, QPoint, QSize, Qt, QTimer, Slot
from qtpy.QtGui import QFont, QMovie
from qtpy.QtGui import QMovie
from qtpy.QtWidgets import (
QCheckBox,
QDialog,
Expand All @@ -33,7 +33,6 @@
QListWidget,
QListWidgetItem,
QPushButton,
QSizePolicy,
QSplitter,
QTextEdit,
QVBoxLayout,
Expand Down Expand Up @@ -128,7 +127,9 @@ def _handle_npe2_plugin(self, npe_version):
text = trans._('npe1 (adapted)') if npe_version == 'shim' else 'npe2'
# npe2_icon = QLabel(self)
icon = QColoredSVGIcon.from_resources('logo_silhouette')
self.set_status(icon.colored(color='#33F0FF', opacity=opacity).pixmap(20, 20), text)
self.set_status(
icon.colored(color='#33F0FF', opacity=opacity).pixmap(20, 20), text
)
# self.row1.insertWidget(2, QLabel(text))
# self.row1.insertWidget(2, npe2_icon)

Expand Down Expand Up @@ -318,7 +319,6 @@ def setup_ui(self, enabled=True):
)
self.install_info_button.setObjectName("install_info_button")


# self.row2 = QGridLayout()
# self.error_indicator = QPushButton()
# self.error_indicator.setObjectName("warning_icon")
Expand Down Expand Up @@ -360,7 +360,6 @@ def setup_ui(self, enabled=True):
# self.update_btn, 0, 6, 1, 1, alignment=Qt.AlignmentFlag.AlignTop
# )


# # To make the icon appear on the right
# self.install_info_button.setLayoutDirection(Qt.RightToLeft)

Expand All @@ -374,7 +373,6 @@ def setup_ui(self, enabled=True):
# self.install_info_button.layout().setSpacing(2)
# self.install_info_button.setSizePolicy(sizePolicy)


# self.row2.addWidget(
# self.install_info_button,
# 0,
Expand All @@ -384,14 +382,11 @@ def setup_ui(self, enabled=True):
# alignment=Qt.AlignmentFlag.AlignTop,
# )



# self.cancel_btn.setSizePolicy(sizePolicy)
# self.row2.addWidget(
# self.cancel_btn, 0, 8, 1, 1, alignment=Qt.AlignmentFlag.AlignTop
# )


# sizePolicy1 = QSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred)
# self.action_button.setFixedWidth(70)
# self.action_button.setSizePolicy(sizePolicy1)
Expand All @@ -401,7 +396,6 @@ def setup_ui(self, enabled=True):

# self.v_lay.addLayout(self.row2)


# self.info_widget.setLayoutDirection(Qt.LeftToRight)
# self.info_widget.setObjectName("info_widget")
# info_layout = QGridLayout()
Expand All @@ -417,7 +411,6 @@ def setup_ui(self, enabled=True):
# self.install_info_button.layout().setContentsMargins(0, 0, 0, 0)
# self.info_widget.setLayout(info_layout)


# --- Layout
# ------------------------------------------------
layout = QHBoxLayout()
Expand Down Expand Up @@ -447,8 +440,7 @@ def setup_ui(self, enabled=True):
layout_bottom.addWidget(self.action_button)
layout_bottom.addWidget(self.update_btn)
layout_bottom.addWidget(self.cancel_btn)



info_layout = QGridLayout()
info_layout.setContentsMargins(0, 0, 0, 0)
info_layout.setVerticalSpacing(0)
Expand All @@ -459,7 +451,7 @@ def setup_ui(self, enabled=True):
self.info_choice_wdg.setLayout(info_layout)
self.info_choice_wdg.setLayoutDirection(Qt.LeftToRight)
self.info_choice_wdg.setObjectName("install_choice_widget")
# Remove any extra margins
# Remove any extra margins
self.install_info_button.content().layout().setContentsMargins(
0, 0, 0, 0
)
Expand Down Expand Up @@ -580,7 +572,6 @@ def setup_ui(self, enabled=True):
# self.update_btn, 0, 6, 1, 1, alignment=Qt.AlignmentFlag.AlignTop
# )


# # To make the icon appear on the right
# self.install_info_button.setLayoutDirection(Qt.RightToLeft)

Expand Down

0 comments on commit b888747

Please sign in to comment.