Gui: Use our own ToolBar class in all places
This commit is contained in:
@@ -117,7 +117,7 @@ def setStatusIcons(show=True):
|
||||
if statuswidget:
|
||||
statuswidget.show()
|
||||
else:
|
||||
statuswidget = QtGui.QToolBar()
|
||||
statuswidget = FreeCADGui.UiLoader().createWidget("Gui::ToolBar")
|
||||
statuswidget.setObjectName("BIMStatusWidget")
|
||||
s = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/General").GetInt("ToolbarIconSize", 24)
|
||||
statuswidget.setIconSize(QtCore.QSize(s,s))
|
||||
|
||||
@@ -106,7 +106,7 @@ class BIM_IfcExplorer:
|
||||
self.dialog.setObjectName("IfcExplorer")
|
||||
self.dialog.setWindowTitle(translate("BIM", "Ifc Explorer"))
|
||||
self.dialog.resize(720, 540)
|
||||
toolbar = QtGui.QToolBar()
|
||||
toolbar = FreeCADGui.UiLoader().createWidget("Gui::ToolBar")
|
||||
|
||||
layout = QtGui.QVBoxLayout(self.dialog)
|
||||
layout.addWidget(toolbar)
|
||||
|
||||
@@ -81,7 +81,7 @@ class BIM_Views:
|
||||
size = FreeCAD.ParamGet(
|
||||
"User parameter:BaseApp/Preferences/General"
|
||||
).GetInt("ToolbarIconSize", 24)
|
||||
toolbar = QtGui.QToolBar()
|
||||
toolbar = FreeCADGui.UiLoader().createWidget("Gui::ToolBar")
|
||||
toolbar.setIconSize(QtCore.QSize(size, size))
|
||||
dialog.horizontalLayout.addWidget(toolbar)
|
||||
for button in [
|
||||
|
||||
@@ -205,7 +205,7 @@ class DraftToolBar:
|
||||
|
||||
# add only a dummy widget, since widgets are created on demand
|
||||
self.baseWidget = DraftBaseWidget()
|
||||
self.tray = QtWidgets.QToolBar(None)
|
||||
self.tray = FreeCADGui.UiLoader().createWidget("Gui::ToolBar")
|
||||
self.tray.setObjectName("Draft tray")
|
||||
self.tray.setWindowTitle("Draft tray")
|
||||
self.toptray = self.tray
|
||||
|
||||
Reference in New Issue
Block a user