How do I make maya 2015 font bigger by stylesheet ?

191 views
Skip to first unread message

oglop

unread,
Oct 27, 2016, 5:06:35 PM10/27/16
to Python Programming for Autodesk Maya
It seems I can use this to make most ui font bigger, but not for outliner.

from PyQt4 import QtGui
app = QtGui.QApplication.instance()

styleSheet = '''

* {
font: 16px;
}
'''

app.setStyleSheet(styleSheet)

I tried to get qt object of outlinerPanel1Window and called setFont() on it, but it doesn't work.

Justin Israel

unread,
Oct 27, 2016, 6:26:00 PM10/27/16
to python_in...@googlegroups.com
Stylesheets may not be the most reliable way. Have you tried just playing with the Application font?

font = QtGui.qApp.font()
font.setPixelSize(16)
QtGui.qApp.setFont(font)

Justin


--
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_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/88365859-a6e6-479c-84d1-987d56db78bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

oglop

unread,
Oct 27, 2016, 8:41:32 PM10/27/16
to Python Programming for Autodesk Maya
yes I have tried that, it does not affect outliner font either. And it does not change font size on the top edge of viewport while CSS method works for that.

Justin Israel

unread,
Oct 27, 2016, 9:20:30 PM10/27/16
to Python Programming for Autodesk Maya
Ah sorry. I misread and was actually looking at the ChannelBox and not the Outliner, like you asked. 
I don't know how effect the Outliner off hand. it is free to ignore QFont and stylesheet settings, and draw however it wants in its own implementation. 

Justin


On Fri, Oct 28, 2016 at 1:41 PM oglop <ogl...@gmail.com> wrote:
yes I have tried that, it does not affect outliner font either. And it does not change font size on the top edge of viewport while CSS method works for that.

--
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_m...@googlegroups.com.

Fredrik Averpil

unread,
Oct 28, 2016, 1:56:14 AM10/28/16
to Python Programming for Autodesk Maya
We're manipulating the MayaStrings file for Maya 2015: https://www.youtube.com/watch?v=1lidN_bJSS0


oglop

unread,
Oct 28, 2016, 12:50:22 PM10/28/16
to Python Programming for Autodesk Maya
That works but in production environment, I have no power to edit that file, plus our maya is on a network share. It affects everyone.

maybe I can use mount -bind to replace that file, but I have no root privileges. or maybe I can use https://github.com/proot-me/PRoot , but I can not compile it in office. and it may affect our maya launcher.

Reply all
Reply to author
Forward
0 new messages