Page 1 of 1
4k Screen Zoom factor
Posted: Mon Jan 03, 2022 10:33 pm
by mnfisher
When using a high res screen I find the default 75% zoom to be a little small for my old eyes. Particularly when looking at old files it's a bit of a drag changing the zoom level for each macro.. Until v10 comes along with a settable default zoom level.....
So - a tiny Python script that takes 1 or optionally 2 arguments
View.py fname changes the zoom level on fname.fcfx to 100% and saves the file to fnamez.fcfx
view.py fname zoom (say 125) does the same with zoom set to zoom (use a number of your choice)
You'll need python3 installed with BeautifulSoup (pip install bs4)
Code: Select all
#!python3
from bs4 import BeautifulSoup as soup
from sys import argv
def main(argv):
argc = len(argv)
ifname = argv[1] +".fcfx"
ofname = argv[1] +"z.fcfx"
zf = '100'
if argc == 3:
zf = argv[2]
with open(ifname,'r') as data:
bs = soup(data, "xml")
view = bs.findAll("view")
for el in view:
el['zoom'] = zf
with open(ofname, "w") as outp:
outp.write(bs.prettify())
main(argv)
Saved as view.py
Martin
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 9:52 am
by Steve-Matrix
Thanks, Martin.
Do you mean default zoom for flowcharts or for the panel(s)? Default zoom for flowcharts can already be controlled with a registry setting: the "FcZoom" entry under "HKEY_CURRENT_USER\Software\MatrixTSL\FlowcodeV9\Options". Changing this should help you when creating new projects.
However, this option controls only newly-shown views. Saved projects contain the size of the views as they were displayed before they were previously saved and override this default setting when opened. If you close a flowchart view of a saved project and then reopen it, it will also open at this default "FcZoom" setting.
This is a dilemma. Should the flowcharts always open up at a "default" setting, or should they open at the size at which they were previously viewed? I can see circumstances where having them open at individual settings would be beneficial when you are working alone on a project. But when sharing projects between different users, this might be less appealing.
There are other settings in Flowcode that have similar issues - i.e. they could be saved in the project file or via a global setting on an individual user's PC. And it is difficult to know which setting should take precedence in situations where the setting in in both places.
This "FcZoom" setting is hidden as a registry setting and not available in the "options" pages of Flowcode partly because of this dilemma.
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 10:26 am
by mnfisher
Thanks Steve,
It sets the zoom setting for all the macros - I guess this is mainly a problem with swapping to or from hi-res screens. The default size of 75% was too small for me on a 4k monitor (and I didn't know about the FcZoom setting) - I think I'd like a 'default zoom' setting and a 'apply to all' button - then I could have macros at different zoom factors if needed (though actually I can't think of many occasions when I would) - alternatively a 'global zoom' setting might be easier?
I'll tweak the FcZoom setting to 100% - which will help with new code.. In an ideal world - would it be possible to have a slightly larger font (adjustable:-) ) on macros (this doesn't seem to use windows scaling) - as text at ~125% with the flowchart icons at 100% would be ideal for me...
Martin
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 10:36 am
by Steve-Matrix
There is a setting for font size in the "flowchart" tab of global options.
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 10:42 am
by mnfisher
Ooh - that's better !
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 10:43 am
by Steve-Matrix
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 11:14 am
by mnfisher
Just found a 'strange' bug - on an unmodified flowchart (no 'tweaking') - I set the font to 50 (from 40) - then zooming to 100% gave a 'huge' flowchart (~400%) and I need to go to 50% - 25% is roughly the same as 75% normally..
It's replicable on one flowchart but I haven't managed to replicate it from scratch (note that I've not altered FcZoom yet either). Saving and reloading fixed it... If I manage to reproduce it I'll post a copy of the chart..
Re: 4k Screen Zoom factor
Posted: Tue Jan 04, 2022 11:31 am
by Steve-Matrix
I've seen this bug before, but I've not been able to reproduce it so it has been left unfixed. If you do find a way of replicating it, please give me the details.
Although I seem to remember just closing and re-opening the flowchart macro seems to fix the issue.