Skip to content
Snippets Groups Projects
Commit a47b6651 authored by iLLiCiTiT's avatar iLLiCiTiT
Browse files

OptionBox is not QWidget with QLabel but QLabel itself now

parent add240f6
No related branches found
No related tags found
No related merge requests found
...@@ -458,7 +458,7 @@ class OptionalActionWidget(QtWidgets.QWidget): ...@@ -458,7 +458,7 @@ class OptionalActionWidget(QtWidgets.QWidget):
self.icon.setPixmap(pixmap) self.icon.setPixmap(pixmap)
class OptionBox(QtWidgets.QWidget): class OptionBox(QtWidgets.QLabel):
"""Option box widget class for `OptionalActionWidget`""" """Option box widget class for `OptionalActionWidget`"""
clicked = QtCore.Signal() clicked = QtCore.Signal()
...@@ -466,19 +466,12 @@ class OptionBox(QtWidgets.QWidget): ...@@ -466,19 +466,12 @@ class OptionBox(QtWidgets.QWidget):
def __init__(self, parent): def __init__(self, parent):
super(OptionBox, self).__init__(parent) super(OptionBox, self).__init__(parent)
label = QtWidgets.QLabel() self.setAlignment(QtCore.Qt.AlignCenter)
layout = QtWidgets.QHBoxLayout(self)
layout.setContentsMargins(0, 0, 0, 0)
layout.addSpacing(8)
layout.addWidget(label)
icon = qtawesome.icon("fa.sticky-note-o", color="#c6c6c6") icon = qtawesome.icon("fa.sticky-note-o", color="#c6c6c6")
pixmap = icon.pixmap(18, 18) pixmap = icon.pixmap(18, 18)
label.setPixmap(pixmap) self.setPixmap(pixmap)
label.setMouseTracking(True)
self.setMouseTracking(True)
self.setStyleSheet("background: transparent;") self.setStyleSheet("background: transparent;")
def is_hovered(self, global_pos): def is_hovered(self, global_pos):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment