Skip to content

Commit

Permalink
Use flat IconButtons instead of QPushButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
BryceBeagle committed Aug 30, 2021
1 parent 8bcbd3b commit d2a44be
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QPushButton, QWidget, QHBoxLayout, QLabel

from brainframe_qt.ui.resources.ui_elements.buttons import IconButton
from brainframe_qt.ui.resources.ui_elements.widgets import AspectRatioSVGWidget


Expand Down Expand Up @@ -52,20 +53,24 @@ def _init_name_label(self) -> QLabel:

return label

def _init_edit_button(self) -> QPushButton:
edit_button = QPushButton(self.parent())
def _init_edit_button(self) -> IconButton:
edit_button = IconButton(self.parent())

edit_button.setIcon(QIcon(":/icons/edit"))
edit_button.setToolTip("Edit")

edit_button.setFlat(True)

return edit_button

def _init_trash_button(self) -> QPushButton:
trash_button = QPushButton(self.parent())
def _init_trash_button(self) -> IconButton:
trash_button = IconButton(self.parent())

trash_button.setIcon(QIcon(":/icons/trash"))
trash_button.setToolTip("Delete")

trash_button.setFlat(True)

return trash_button

def _init_layout(self) -> None:
Expand Down

0 comments on commit d2a44be

Please sign in to comment.