Skip to content
Snippets Groups Projects
Commit 2039e75e authored by Christoph Schmidt's avatar Christoph Schmidt
Browse files

Updated pushbutton. Added option to change the image path

parent 3aaa209b
Branches
Tags 0.0.2
No related merge requests found
...@@ -19,7 +19,7 @@ class PlayPushButton(QPushButton): ...@@ -19,7 +19,7 @@ class PlayPushButton(QPushButton):
self.setText(text) self.setText(text)
def _style_play(self): def _style_play(self, img_path='/icons/icons/cil-media-play.png'):
return """ return """
QPushButton { QPushButton {
background-color: rgb(36, 209, 21); background-color: rgb(36, 209, 21);
...@@ -30,7 +30,7 @@ class PlayPushButton(QPushButton): ...@@ -30,7 +30,7 @@ class PlayPushButton(QPushButton):
border-left: 22px solid transparent; border-left: 22px solid transparent;
text-align: left; text-align: left;
padding-left: 44px; padding-left: 44px;
background-image: url(:/icons/images/icons/cil-media-play.png); background-image: url(:""" + img_path + """);
} }
QPushButton:hover { QPushButton:hover {
...@@ -49,7 +49,7 @@ class PlayPushButton(QPushButton): ...@@ -49,7 +49,7 @@ class PlayPushButton(QPushButton):
""" """
def _style_pause(self): def _style_pause(selfm, img_path = "/icons/icons/cil-media-pause.png"):
return """ return """
QPushButton { QPushButton {
background-color: rgb(255, 200,11); background-color: rgb(255, 200,11);
...@@ -60,7 +60,7 @@ class PlayPushButton(QPushButton): ...@@ -60,7 +60,7 @@ class PlayPushButton(QPushButton):
border-left: 22px solid transparent; border-left: 22px solid transparent;
text-align: left; text-align: left;
padding-left: 44px; padding-left: 44px;
background-image: url(:/icons/images/icons/cil-media-pause.png) background-image: url(:""" + img_path + """)
} }
QPushButton:hover { QPushButton:hover {
...@@ -78,7 +78,7 @@ class PlayPushButton(QPushButton): ...@@ -78,7 +78,7 @@ class PlayPushButton(QPushButton):
} }
""" """
def _style_stop(self): def _style_stop(self, img_path = "/icons/icons/cil-media-stop.png"):
return """ return """
QPushButton { QPushButton {
background-color: rgb(242, 41, 41); background-color: rgb(242, 41, 41);
...@@ -89,7 +89,7 @@ class PlayPushButton(QPushButton): ...@@ -89,7 +89,7 @@ class PlayPushButton(QPushButton):
border-left: 22px solid transparent; border-left: 22px solid transparent;
text-align: left; text-align: left;
padding-left: 44px; padding-left: 44px;
background-image: url(:/icons/images/icons/cil-media-stop.png) background-image: url(:""" + img_path + """)
} }
QPushButton:hover { QPushButton:hover {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment