@@ -32,6 +32,9 @@ def pieMenuStart():
3232 import FreeCADGui as Gui
3333 from PySide import QtCore
3434 from PySide import QtGui
35+ import PieMenuLocator as locator
36+
37+ path = locator .path ()
3538
3639 styleButton = ("""
3740 QToolButton {
@@ -60,13 +63,13 @@ def pieMenuStart():
6063
6164 styleMenuClose = ("""
6265 QToolButton {
63- background-color: rgba(60,60,60,235);
66+ background-color: rgba(60,60,60,255);
67+ color: silver;
6468 border: 1px solid #1e1e1e;
6569 }
6670
6771 QToolButton::menu-indicator {
68- subcontrol-origin: padding;
69- subcontrol-position: center center;
72+ image: none;
7073 }
7174
7275 """ )
@@ -83,7 +86,8 @@ def pieMenuStart():
8386
8487 styleQuickMenu = ("padding: 5px" )
8588
86- iconClose = QtGui .QApplication .style ().standardIcon (QtGui .QStyle .SP_DialogCloseButton )
89+ iconClose = path + "/Resources/icons/PieMenuClose.svg"
90+ iconMenu = path + "/Resources/icons/PieMenuQuickMenu.svg"
8791
8892
8993 def radiusSize (buttonSize ):
@@ -110,7 +114,7 @@ def closeButton(buttonSize=32):
110114 button .setProperty ("ButtonY" , 0 )
111115 button .setGeometry (0 , 0 , buttonSize , buttonSize )
112116 button .setIconSize (QtCore .QSize (icon , icon ))
113- button .setIcon (iconClose )
117+ button .setIcon (QtGui . QIcon ( iconClose ) )
114118 button .setStyleSheet (styleMenuClose + radius )
115119 button .setAttribute (QtCore .Qt .WA_TranslucentBackground )
116120
@@ -125,6 +129,7 @@ def onButton():
125129
126130 def quickMenu (buttonSize = 20 ):
127131
132+ icon = iconSize (buttonSize )
128133 radius = radiusSize (buttonSize )
129134
130135 menu = QtGui .QMenu (mw )
@@ -136,6 +141,8 @@ def quickMenu(buttonSize=20):
136141 button .setProperty ("ButtonY" , 32 )
137142 button .setGeometry (0 , 0 , buttonSize , buttonSize )
138143 button .setStyleSheet (styleMenuClose + radius )
144+ button .setIconSize (QtCore .QSize (icon , icon ))
145+ button .setIcon (QtGui .QIcon (iconMenu ))
139146 button .setAttribute (QtCore .Qt .WA_TranslucentBackground )
140147 button .setPopupMode (QtGui .QToolButton
141148 .ToolButtonPopupMode .InstantPopup )
0 commit comments