Skip to content

Commit a47c3ef

Browse files
committed
Fix add button
1 parent 77b7822 commit a47c3ef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

editor/views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import os
2+
from PyQt5.QtCore import QSize
23
from PyQt5.QtGui import QIcon, QPixmap
34
from PyQt5.QtWidgets import *
45

@@ -30,12 +31,11 @@ def __init__(self, parent):
3031

3132
self.hbox_layout = QHBoxLayout()
3233
self.hbox_layout.setStretch(0, 1)
33-
icon = QLabel(self)
34-
icon.setPixmap(QPixmap(os.path.join("icons", "inspector", "logo.png")).scaled(16, 16))
35-
self.hbox_layout.addWidget(icon, 1)
3634
self.hbox_layout.addWidget(QLabel("Untitled Scene"))
37-
self.add_button = QPushButton(self)
38-
self.add_button.setIcon(QIcon(os.path.join("icons", "inspector", "add.png")))
35+
self.add_button = QToolButton(self)
36+
self.add_button.setIcon(QIcon(os.path.join(os.path.dirname(
37+
os.path.abspath(__file__)), "icons", "inspector", "add.png")))
38+
self.add_button.setStyleSheet("padding: 3px;")
3939
self.hbox_layout.addWidget(self.add_button)
4040
self.vbox_layout.addLayout(self.hbox_layout)
4141

0 commit comments

Comments
 (0)