MadsJakobsen
2/28/2018 - 9:00 PM

MayaCustomFontQss

from maya import cmds
from maya import mel
from maya import OpenMayaUI as omui 

from PySide2.QtCore import * 
from PySide2.QtGui import * 
from PySide2.QtWidgets import *
from PySide2 import __version__
from shiboken2 import wrapInstance 

omui.MQtUtil.mainWindow()    
ptr = omui.MQtUtil.mainWindow()    
widget = wrapInstance(long(ptr), QWidget)


def changeMayaMenuColors(fontStyle='italic', fontWeight='bold', fontColor='cyan', font='Arial', fontSize=13):
    widget.setStyleSheet(
        'font-style:%s;'%fontStyle +
        'font-weight:%s;'%fontWeight +
        'color:%s;'%fontColor +
        'font:%s pt "%s";' %(fontSize, font)
        )
        
changeMayaMenuColors()