microscope-cockpit / cockpit

Cockpit is a microscope graphical user interface. It is a flexible and easy to extend platform aimed at life scientists using bespoke microscopes.
https://microscope-cockpit.org
GNU General Public License v3.0
35 stars 26 forks source link

Possibility to enlarge Image (camera) window in cockpit #606

Open VroniPfann opened 4 years ago

VroniPfann commented 4 years ago

When testing Cockpit on our light sheet system, I noticed that one cannot enlarge the Image (camera) window, which is quite unpractical for our application. I mentioned this already briefly to David, I just thought to also mention it here. Perhaps, you will find some time to have a look at this.

carandraug commented 4 years ago

We have recently change this so one now can resize the camera view window. However, the window content does not expand with the window which needs to be fixed

iandobbie commented 2 years ago

I have a mostly working implementation but it has to jump through a few hoops. Check out my branch https://github.com/iandobbie/cockpit/tree/camera-resize

Leverages the Ysize and effectively ignores Xsize. Header and histogram stay the same size, they should scale Once you resize the window you seem to need a wx context switch to be able to right click in window. A bit strange

I'm sure there are other issues too.

iandobbie commented 2 years ago

Done a bit more optimization so it get the correct size at the start etc. A few outstanding problems:

1) Once you resize the left and right click mouse actions don't work. Snap and new image and they recover

2) The forth active camera (I have 4 cameras, so maybe the last) loses its histogram until you resize, then it appears.

3) historgram and camera header should probably scale, but not essential.

4) only tested on macos so far.

iandobbie commented 2 years ago

Rapid update.

If you disable all cameras, the first one enabled gets the default size. If you add a second, or more they all resize to the correct canvas size. Until the final one which doesn't resize. Is there some off by one logic? Maybe two places for different errors on first and last active camera.