Website Youtube GitHub

mGear Framework Forum

Ui issue with anim picker on 4k monitor and interface scaling

love what you have done, really have enjoyed playing with mgear, i recently got a new monitor and noticed an issue with anim picker not displaying correctly

had a little look in the code, found this line

box.setFixedHeight(80)

changed that to below and that fixed the problem

box.setFixedHeight(int(80 * pm.mayaDpiSetting(q=True, realScaleValue=True)))

1 Like

thanks @JimBo_Drew for the fix! Do you feel like sending a PR on github? if not, no worries. I will add this fix :wink:

Thanks! :smiley:

I will try lol, i have never used git before it’s always been perforce at work.
i did a search though the code for ‘.setFixed’ and it shows up in a few places
the only one where it seems to give an actual graphical issue is in animbits/chanel master where you get clipped slider widgets

1 Like

@JimBo_Drew Yes I know there are other places with scaling issues. But not too many people is using scaling, so I overlooked for a while :stuck_out_tongue: I will try to fix it for the next release. please let me know if you find anything else :slight_smile: THANKS!

And don’t worry about the PR. I can do it if it should be 1 min to change the line :wink:

@JimBo_Drew Thank you for the code snippet, this will be a great addition to all of our UI’s.

Thank you!

Please note, pm.mayaDpiSetting is not available on mac. What I’ve been doing is getting a reference to Maya’s MainWindow and then using devicePixelRatio() to get the scaling:

def mayaMainWindow():
try:
    mainWindowPtr = omui.MQtUtil.mainWindow()
    return wrapInstance(long(mainWindowPtr), QtWidgets.QWidget)
except Exception, e:
    print(str(e))
    return None

MAYA_APP_REF = mayaMainWindow()
DPI = MAYA_APP_REF.devicePixelRatio()
2 Likes

@JimBo_Drew @JxE
This issue may have been fixed with this recent commit. Please let us know

1 Like

Hi @Rafael I grabbed your latest commits. Thanks!

The buttons at the top do seem to be fixed, including on a 5K monitor. Was that the only issue fixed here, for now?

I’m still seeing the entire picker scaled, and the mouse cursor is offset when interacting in the window. Are those separate issues?

anim_picker

1 Like

Oh I don’t see any “Save” button as discussed in the other thread. So maybe it isn’t working? I’m not familiar with what it is supposed to look like. I’ll have to finish watching any picker videos first.

I just noticed you can zoom out with the picker. But it requires a mouse or trackpad. I use a Wacom tablet.) When zooming out, the mouse cursor vs the selection is still offset. Resetting the view goes back to being about 4x too big, (which might correspond to a Mac retina resolution.)

1 Like

thanks for the feedback @chrislesage! and Woah! 5k screen!

Hey @chrislesage, yes! In the referenced commits It is a test only for properly scaling UI items, like buttons, layouts, etc. The graphicsviewwidget (which drives the picker node interface) is a different beast. And sadly I don’t have a high enough display on any machine I have access too. haha.

Do you think you will have time to take a look at it for us? If not, maybe we can do a remote user thing and I can try from there?

That is how my current setup works, I am remoting into 2 windows machines, 1 linux and a mac mini.

Thank you for the feedback, I dont want to leave any users behind, if we can help it.

1 Like

Yep! I’ll be looking into this too and see what I can fix or improve. Like I mentioned, I’m hoping to get the picker up and running for a project I’m on now.

1 Like

Let me know if you have any luck @chrislesage we’re still seeing the mouse offset bug on the latest build @Rafael