Skip to content
Snippets Groups Projects

Add test for properties dialog plus black style fixes

Merged Oscar Gustafsson requested to merge testguiproperties into master
8 files
+ 108
39
Compare changes
  • Side-by-side
  • Inline
Files
8
+ 4
4
@@ -38,7 +38,6 @@ class DragButton(QPushButton):
@@ -38,7 +38,6 @@ class DragButton(QPushButton):
self,
self,
name,
name,
operation,
operation,
operation_path_name,
is_show_name,
is_show_name,
window,
window,
parent=None,
parent=None,
@@ -48,7 +47,6 @@ class DragButton(QPushButton):
@@ -48,7 +47,6 @@ class DragButton(QPushButton):
self.is_show_name = is_show_name
self.is_show_name = is_show_name
self._window = window
self._window = window
self.operation = operation
self.operation = operation
self.operation_path_name = operation_path_name
self.clicked = 0
self.clicked = 0
self.pressed = False
self.pressed = False
self._m_press = False
self._m_press = False
@@ -75,7 +73,7 @@ class DragButton(QPushButton):
@@ -75,7 +73,7 @@ class DragButton(QPushButton):
flip.triggered.connect(self._flip)
flip.triggered.connect(self._flip)
menu.exec_(self.cursor().pos())
menu.exec_(self.cursor().pos())
def show_properties_window(self, event):
def show_properties_window(self, event=None):
self._properties_window = PropertiesWindow(self, self._window)
self._properties_window = PropertiesWindow(self, self._window)
self._properties_window.show()
self._properties_window.show()
@@ -155,7 +153,9 @@ class DragButton(QPushButton):
@@ -155,7 +153,9 @@ class DragButton(QPushButton):
path_to_image = os.path.join(
path_to_image = os.path.join(
os.path.dirname(__file__),
os.path.dirname(__file__),
"operation_icons",
"operation_icons",
f"{self.operation_path_name}{'_grey.png' if self.pressed else '.png'}",
(
 
f"{self.operation.type_name().lower()}{'_grey.png' if self.pressed else '.png'}"
 
),
)
)
self.setIcon(QIcon(path_to_image))
self.setIcon(QIcon(path_to_image))
self.setIconSize(QSize(MINBUTTONSIZE, MINBUTTONSIZE))
self.setIconSize(QSize(MINBUTTONSIZE, MINBUTTONSIZE))
Loading