DanPorter / Dans_Diffraction

Reads crystallographic cif files and simulates diffraction
Apache License 2.0
45 stars 13 forks source link

enabling scaling of Tk frame #12

Closed asteppke closed 1 year ago

asteppke commented 1 year ago

Dear Dan

Now trying out the diffractometer GUI the size of the matplotlib figures is rather small on a high DPI monitor (on Windows). I don't know if the scaling works better on other systems. The DPI option in the menu unfortunately does not really help here because it changes the DPI of the figure but not its physical size. Resizing the whole window is possible but does not enlarge the figures.

image

I found a small option in tk to ensure that the panel scales when the window is enlarged.

This allows to use for example 90 DPI easily: image

Here is a small patch that enables this functionality. Is that an OK solution?

DanPorter commented 1 year ago

Hi asteppe, thanks very much for checking out the new diffractometer gui! I had noticed this issue with scaling but wasn't sure how to fix it, so thanks for this.

Sorry for taking so long to get around to looking at you're pull request - a mixture of holiday and working on other projects.

asteppke commented 1 year ago

Thank you Dan for the review and merge. No worries, I think we should all take a bit more holidays in these times. Looking forward to use your package on some real data soon.