antipole2 / JavaScript_pi

JavaScript plugin for OpenCPN
GNU General Public License v3.0
2 stars 4 forks source link

Tools > Console tab not showing the Float option etc, on higher resolution Windows displays unless window extended downwards #103

Open antipole2 opened 2 months ago

antipole2 commented 2 months ago

torrmundi reports:

The Tools Consoles tab does have that Float... button, but it's hidden until I drag the dialog bottom downwards, exposing the two checkboxes. My screen is 1920x1200 (highest available) and my Scale is 125%.

I had to do an extraordinary amount of work to handle higher resolution displays. It seems I have not covered this bit. Maybe I added the Float option after I had fixed the screen resolution issue.

MacOS handles screen resolution internally and no action is needed. I had to write a simulator to develop the fixes for Windows, which have to be applied to each window layout.

This is a job for next winter, when I am not afloat.

antipole2 commented 2 months ago

@torrmundi Please let me have a screenshot of

  1. the tool Consoles tab with the Float… button not showing. Just as it is when you first open the tab
  2. The window extended down enough to show the two options not previously visible

thanks

torrmundi commented 1 month ago

Ok, finally revisiting this old issue. Here's the screen captures. Tool dialog - expanded Tool dialog - initial

torrmundi commented 1 month ago

I'm going to risk "teaching a dog to bark" here. But this is a good discussion of scaling in Javascript for various browsers. https://stackoverflow.com/questions/2242086/how-to-detect-the-screen-resolution-with-javascript

antipole2 commented 1 month ago

I'm going to risk "teaching a dog to bark" here. But this is a good discussion of scaling in Javascript for various browsers. https://stackoverflow.com/questions/2242086/how-to-detect-the-screen-resolution-with-javascript

Always happy to learn some new tricks. However, the plugin's environment is very different from a brower's. There is no window structure on which those solutions depend. The plugin does know the resolution, but I have not made it available to scripts. You can inspect it via the tools->dump. The third line is JavaScript tools window DPI scaling factor 1.000000 for me on a Mac.