Try this one on for size.
from PySide import QtGui
QtGui.qApp.setStyleSheet("""
QWidget {
background: steelblue
}
""")
That should give you a good estimate on the level of control you have through stylesheets and the overall Maya interface.
Don’t worry, you can restore it to it’s former glory like this.
from PySide import QtGui
QtGui.qApp.setStyleSheet("")
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4fdb53f8-7889-41fa-a0e4-cec794907287%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
from PySide import QtGuiQtGui.qApp.setStyleSheet("""
QMenuBar { background: rgb( 200, 40, 0 );
color: rgb( 255, 255, 255 );}""")
I have set this using style sheets for certain elements that most Uis would have. Even made a system that lets users have control over the colors.I set the style sheet on the maya mainwindowhave not checked the toolbars in 2017 yetmainwindow is a wrappedinstance - I set the background color of a few items in the maya gui back for personal choice of how overwhelming the colors get because maya utilizes toolBars for some big sections of the main ui
mainwindow.setStyleSheet('QToolBar, QStatusBar, QMenuBar{background-color:rgb(%d, %d, %d);}\nQMainWindow#%s,#toolBar1,#toolBar2,#toolBar3,#toolBar4,#toolBar5,#toolBar6,#toolBar7{background-color:rgb(70,70,70);}'%(splits[0], splits[1], splits[2], mainwindow.objectName()))
On Monday, September 26, 2016, Chad_Fox <chadl...@gmail.com> wrote:
I'm familair with how we can edit Maya's UI color with the window, layout, button commands, but was wonding this morning if there's a way to just change UI border/ window frame colors or title bar colors in python?--The end goal is that I would like to use a slightly different color for each instance of Maya I open up.Have any of you tried this before or know where to read up on how?Thanks!
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
The script I posted earlier works, but it is also changing the background and text color of attribute text boxes. When an attr is keyed, locked or connected while this stylesheet change is active, the backgrounds are dark grey and text black.
Thoughts on why that might be?
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4e398c05-076e-4113-86d2-f6495d576d43%40googlegroups.com.
Thanks
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/4e398c05-076e-4113-86d2-f6495d576d43%40googlegroups.com.
----
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsub...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOBC4XmeMC1iyNqxoYcgCp%2Bvc5GRkujeqkOdxy16RvLMWQ%40mail.gmail.com.
from PySide import QtGui, QtCore
base_palette = QtGui.QPalette()MENU_COLOR = QtGui.QColor(50, 170,20)base_palette.setBrush(QtGui.QPalette.Background, QtGui.QBrush(MENU_COLOR))QtGui.QApplication.setPalette(base_palette, 'QMenuBar')