Skip to content

Commit

Permalink
TypeRig [Toolbars]:
Browse files Browse the repository at this point in the history
- Revert some code for MAC compatibility;
  • Loading branch information
kateliev committed Feb 13, 2024
1 parent ddb192f commit 74dadff
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions Scripts/TypeRig GUI/typerig-toolbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import Toolbar

# - Init --------------------------
tool_version = '1.61'
tool_version = '1.62'
tool_name = 'TypeRig Controller'
ignore_toolbar = '__'

Expand Down Expand Up @@ -139,15 +139,9 @@ def layers_refresh(self):
# - Init
toolbar_control = TRToolbarController()

# -- Platform specific fix for MacOs by Adam Twardoch (2022). Pt.1
# -- Fixes Mac's lack of visible QMainWindow, thus adding toolbars to invisible item renders them ivisible too :)
# -- Note: the fix is temporary, we should find a better solution that suits all platforms...

# -- Fix Mac's lack of visible QMainWindow, thus adding toolbars to invisible item renders them ivisible too
if fl_runtime_platform == 'Darwin':
app.main.show()
app.main.setGeometry(0,0,0,0)
toolbar_control.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
toolbar_control.move(50,50)

app.main.addToolBar(toolbar_control)

Expand All @@ -160,14 +154,5 @@ def layers_refresh(self):
new_toolbar = eval('Toolbar.{}.TRExternalToolBar()'.format(toolbar_name))
app.main.addToolBar(new_toolbar)

# -- The above fix Pt.2
if fl_runtime_platform == 'Darwin':
new_toolbar.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint) #ADAM-MAC
new_toolbar.move(50, 100 + 50 * i) #ADAM_MAC

# -- The above fix Pt.3
if fl_runtime_platform == 'Darwin':
app.main.hide()



0 comments on commit 74dadff

Please sign in to comment.