-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drag panel movement doesn't take ui scale into consideration #9
Comments
Hi @eldeesmith, thank you for the feedback. Yes, that is in my to-do list to get fixed, however it is not trivial because scale is applied everywhere in the code and I will have to compensate for it in many places. I haven't given it a bigger priority because dragging the panel around seems not to be an action the user will keep doing all the time, and even if he/she does that, it is just a matter of releasing the mouse and picking the panel again to complete the drag if it starts lagging back too much. But it is one issue I really want to get fixed, just don't know when I am going to have the time for doing that. |
it is common, on retina especially it shows up tiny. I think this is causing my tooltip issues as well. |
These are two different issues, @SuddenDevelopment - The issue with the drag feature is due to calculations in code that currently I am not taking in account the scale offset. It is something I really need time to work on and get it sorted out. On the other hand what you are experiencing with "no scaling" in your panel I believe is because there are three hidden properties which control this behavior and they were expected to be set on the Preferences page of the add-on. They act as switches to turn scaling and sliding features on/off. My bad that I never thought to have them exported to developer. I don't know when I will be able to enhance that because I am totally without time to work on anything Blender related, but perhaps you can mess with it and find a work around, like overriding these functions. You may want to take a look also on the Prefs.py to see how I bound those props to code. See below, these are in the BL_UI_Widget.py and the one which may interest you more is the top RC_UI_BIND() that binds the panel scale to Blender's UI Resolution scale and it changes on the fly:
Images below show the Demo panel tiny (scale=0.5) or huge (scale=2), following the Resolution Scale set on Blender's Interface Preferences window. |
I actually started digging through the code to fix this bug so I could submit a PR, but after spending a day with it I had to punch out. there's too much demo code embedded into 'core' code, and everything is run by monolithic classes that try to do too many things. Once I started pulling the thread the rug started to unravel. This particular issue is a side effect of how the project has been designed architecturally... in my opinion it needs a major refactor to be more modular, such that the transformation of objects is a self contained class where all logic is shared across across all objects who use it as a component. It's a pervasive issue on this project unfortunately, perhaps somebody is willing to invest the time needed to refactor, but personally I think it would make more sense to start from scratch. Truly not trying to disparage the project, just giving some context to anyone who stumbles across this issue and wants to tackle it. Obviously some perfectly viable interfaces can be made with this project, as demonstrated by the various screenshots of interfaces that have already been made, and this is an easily fixable bug if you're willing to ignore the other timebombs waiting to explode. |
At very large scales, the panel will accelerate away from the mouse cursor. At smaller scales the panel will lag behind.
The text was updated successfully, but these errors were encountered: