Plugin doesn't respect UI Zoom Factor onInit
-
@ccbl Setting it in on init won't work because the button callbacks are triggered after on init so it will overwrite it.
Just as a test, what happens if you disable saveInPreset on all the buttons, except the one you want?
-
@d-healey saving the gui size in a preset doesn't make much sense though, so disabling that shouldn't be a problem
-
@Morphoice said in Plugin doesn't respect UI Zoom Factor onInit:
saving the gui size in a preset doesn't make much sense though, so disabling that shouldn't be a problem
I'm just suggesting this as a test to figure out the source of the issue. But you don't want it to always open at 50% so we need to find a better solution after.
-
@d-healey but the zoom level is always restored to the last state right? So why bother with all that? You just need to read what is the current zoom to reflect this to the right button, at least this is how I see it...
-
@ustk said in Plugin doesn't respect UI Zoom Factor onInit:
but the zoom level is always restored to the last state right?
Only if you use the built in custom settings floating tile which saves it to the generalSettings.xml file.
-
@d-healey Hmm... should be the same thing no? I thought it was always saved in the xml no matter where the call is coming from (when the plugin/standalone is closed)
-
@ustk Yeah just tested and seems you are correct.
-
@ccbl said in Plugin doesn't respect UI Zoom Factor onInit:
@oskarsh how would that look in context?
inline function onFiftyControl(component, value) { Settings.setZoomLevel(0.5); }; Content.getComponent("Fifty").setControlCallback(onFiftyControl)
Do you define the value as 1.0?
I really don't know coding very well.
so like this:
inline function onFiftyControl(component, value) { if(value) Settings.setZoomLevel(0.5); }; Content.getComponent("Fifty").setControlCallback(onFiftyControl)
-
@Lindon Genius!
-
@d-healey ha ha ha ha.....
-
@Lindon wow sleek and elegant solution!
-
@Lindon said in Plugin doesn't respect UI Zoom Factor onInit:
@ccbl said in Plugin doesn't respect UI Zoom Factor onInit:
@oskarsh how would that look in context?
inline function onFiftyControl(component, value) { Settings.setZoomLevel(0.5); }; Content.getComponent("Fifty").setControlCallback(onFiftyControl)
Do you define the value as 1.0?
I really don't know coding very well.
so like this:
inline function onFiftyControl(component, value) { if(value) Settings.setZoomLevel(0.5); }; Content.getComponent("Fifty").setControlCallback(onFiftyControl)
After flushing my %appdata% config this worked! Thanks!