Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
kateliev committed Mar 24, 2024
2 parents a3675de + 8ed825f commit 4777013
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 44 deletions.
54 changes: 27 additions & 27 deletions Lib/typerig/proxy/fl/gui/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from typerig.proxy.fl.gui.styles import css_tr_button

# - Init ----------------------------------
__version__ = '0.1.5'
__version__ = '0.1.6'

# - Keep compatibility for basestring checks
try:
Expand Down Expand Up @@ -414,20 +414,20 @@ def table_check_all(self, layer_type=None, do_swap=False):
modifiers = QtGui.QApplication.keyboardModifiers() # Listen to Shift - reverses the ratio

for row in range(self.tab_masters.rowCount):
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)

def table_populate(self, mode, font=None, glyph=None):
if mode !=0:
Expand Down Expand Up @@ -555,20 +555,20 @@ def table_check_all(self, layer_type=None, do_swap=False):
modifiers = QtGui.QApplication.keyboardModifiers() # Listen to Shift - reverses the ratio

for row in range(self.tab_masters.rowCount):
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if layer_type is None or self.tab_masters.item(row,1).text() == layer_type:
if modifiers == QtCore.Qt.AltModifier or do_swap: # Toggle state
if self.tab_masters.item(row, 0).checkState() == QtCore.Qt.Checked:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Unchecked)
else:
self.tab_masters.item(row, 0).setCheckState(QtCore.Qt.Checked)

elif modifiers == QtCore.Qt.ShiftModifier: # Uncheck all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Unchecked)

else: # Check all
if not self.tab_masters.isRowHidden(row):
self.tab_masters.item(row,0).setCheckState(QtCore.Qt.Checked)

def table_populate(self, mode, font=None, glyph=None):
if mode !=0:
Expand Down
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 4777013

Please sign in to comment.