Skip to content

Commit

Permalink
Merge pull request #4075 from Autodesk/bailp/EMSUSD-2012/theme-ui-scale
Browse files Browse the repository at this point in the history
EMSUSD-2012 implement theme scale in Maya Host
  • Loading branch information
seando-adsk authored Jan 15, 2025
2 parents 126e1ea + cb4d4a9 commit 7a6c6bf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/mayaUsd/resources/ae/usdschemabase/collectionMayaHost.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from maya.api.OpenMaya import MPxCommand, MFnPlugin, MGlobal, MSyntax, MArgDatabase
import mayaUsd.lib
import maya.mel as mel
import maya.cmds as cmds

from pxr import Usd
from typing import AnyStr, Sequence, Tuple
Expand Down Expand Up @@ -313,6 +314,12 @@ def __init__(self):
self._palette = None
self._icons = {}

@property
def uiScaleFactor(self) -> float:
if not hasattr(cmds, 'mayaDpiSetting'):
return 1
return float(cmds.mayaDpiSetting(query=True, realScaleValue=True))

def themeTab(self, tab):
super().themeTab(tab)
tab.setDocumentMode(False)
Expand Down

0 comments on commit 7a6c6bf

Please sign in to comment.