Jump to content

Window positions


Bernardo Reis (1096507)

Recommended Posts

Bernardo Reis (1096507)

Is it possible to make the windows (either in Topsky and GRadar) to open in a position proportional to the screen resolution rather than an absolute position (pixel x,y)?

We have people with setups from small laptop screens to 2k screens and it creates inconsistencies, as we have it optimized for 1080p.

Link to comment
Share on other sites

Hakan Schulz (937154)

 @Bernardo Reis   EuroScope is unfortunately programmed with fixed sized windows.

However, it is possible to select a few standard options if you right click the with box in the upper right hand corner.
In the example shown I have selected to show EuroScope on the "Right third" part of my screen.

bild.png.bf38c861fcd924033f66a8c2b0cd4dc2.png

There are also both free and payware to make a lot of virtual screens, dividing your physical monitor to smaller parts
that the operating system thinks are different monitors. Just google on "Virtual Monitor Apps".  :)
 

Link to comment
Share on other sites

Christian Kovanen (1379372)
1 hour ago, Hakan Schulz said:

 @Bernardo Reis   EuroScope is unfortunately programmed with fixed sized windows.

However, it is possible to select a few standard options if you right click the with box in the upper right hand corner.
In the example shown I have selected to show EuroScope on the "Right third" part of my screen.

bild.png.bf38c861fcd924033f66a8c2b0cd4dc2.png

There are also both free and payware to make a lot of virtual screens, dividing your physical monitor to smaller parts
that the operating system thinks are different monitors. Just google on "Virtual Monitor Apps".  :)
 

That doesn't have much to do with the question. This is about TopSky and GR plugins being able to open their windows in positions in relation to the screen size rather than at some absolute location.

Link to comment
Share on other sites

Juha Holopainen

The answer to the question (plugin windows, not the program window) is going to be no. Defining the position as a fraction of the screen size would only give consistent results near the top and left edges of the screen, and there it's almost the same to use the pixel values. For example the position of the right edge of a window depends not only on the position of the left edge but also the window width (which depending on the window is either fixed, selectable or variable) and the window scaling setting.

As all that is user-specific, it's best left to the users. Yes, a little bit of work is required - putting together some guidance for beginners may help if you like to promote some specific way of setting things up - but it's a one-time effort. I've set my values once and haven't touched them since.

Link to comment
Share on other sites

Christian Kovanen (1379372)

@Juha Holopainen Can't you just get the width by subtracting the x coordinate of the bottom left corner from the x coordinate of the top right corner? Assuming you can get the coordinates with the function I posted a picture of above?

Link to comment
Share on other sites

Juha Holopainen

That function actually gives lat/lon coordinate points, not pixels (there is another one though that can be used to find out the radar screen dimensions in pixels). My point was that if you define a window's position as a proportion of the screen size, it still won't look the same on different resolution screens. As a simple example case, if you have a window with a fixed size of 100*100 pixels and were able to define its position at 0.9/0.9 (proportional values of radar screen size), on a 1000*1000 radar screen the window's bottom right corner would be exactly at the radar screen's bottom right corner. But on a 2000*2000 screen there would be 100 pixels between the window's right and bottom edges and the screen edges, and on a 500*500 screen only the top left quarter of the window would be visible on the screen.

Link to comment
Share on other sites

Christian Kovanen (1379372)

I forgot the windows were fixed size, makes more sense now. If you someday add the ability to scale windows from the config then this should work if you just define the top left corner and bottom right corners of the window as proportional values.

Link to comment
Share on other sites

Juha Holopainen

The ability to scale windows is of course already available in TopSky, and the beta versions of GRplugin, but to allow defining proportional values to both top left and bottom right corners, code should be added to allow a separate scaling setting for each window (both in the x and y directions to be precise). But as a good window scaling factor depends on so much more than the screen dimensions - for example one's eyesight and the physical size of the screen (a window on a 24" 4K screen needs to be much bigger in pixels than the same window on a 65" 4K screen to be readable) - I still maintain that there's no reasonable amount of code that could provide anywhere close to the same results as everyone using 10 minutes of their time to save settings according to their hardware and preferences.

Link to comment
Share on other sites

Bernardo Reis (1096507)

@Juha Holopainenthe problem is not so much the window size, that can be easily resizable. The issue is when we have windows opening outside of the screen itself.

The request was not due to have everything defined with a set of parameters and make them work for everyone but rather eliminate windows appearing out of the screen, rendering them unusable.

Link to comment
Share on other sites

Bernardo Reis (1096507)

It would also be cool if we could configure the windows in Euroscope itself.

 

We would set up the windows as required, go into local settings and press save or something like this. 

Link to comment
Share on other sites

Christian Kovanen (1379372)
12 hours ago, Juha Holopainen said:

The ability to scale windows is of course already available in TopSky, and the beta versions of GRplugin, but to allow defining proportional values to both top left and bottom right corners, code should be added to allow a separate scaling setting for each window (both in the x and y directions to be precise). But as a good window scaling factor depends on so much more than the screen dimensions - for example one's eyesight and the physical size of the screen (a window on a 24" 4K screen needs to be much bigger in pixels than the same window on a 65" 4K screen to be readable) - I still maintain that there's no reasonable amount of code that could provide anywhere close to the same results as everyone using 10 minutes of their time to save settings according to their hardware and preferences.

I meant resize, I think thats not possible via the config?

Link to comment
Share on other sites

Juha Holopainen

@Bernardo Reis, can you give an example of a setting that takes a window completely outside of the display area? That's not supposed to happen. In TopSky, at least the top left corner of the window should remain visible so the window can be dragged back, and in GR the whole window should be limited to the screen area. As the limiting code is run only when the map background is refreshed, pan or zoom may be required in some cases to trigger the automatic limiting, especially on GR.

Saving window positions from within the plugin is not planned as the plugin wouldn't know where to save them (general or callsign-specific, and if callsign-specific, and specific to the exact callsign or a part of it, etc.). A lot of the flexibility would be lost. Taking a screenshot and getting the coordinates from it is pretty quick, and you get to decide the cases where the settings are used.

@Christian Kovanen, resizing settings are also available for those windows that can be resized.

Link to comment
Share on other sites

Juha Holopainen

I don't remember exactly when the window size settings became available but they have been there at least since version 2.2. You just have to know they're there as the only indication in the settings spreadsheet is the accepted formats (e.g. Window_Zoom does not accept the format with the width/height values but Window_ASM does as it is a resizable window). The "size-enabled" window settings are grouped together though which helps a bit.

Link to comment
Share on other sites

Juha Holopainen

If I try to drag the window outside of the radar screen area, it ends up showing at least the top left corner so it can be dragged back, which is the intended behavior. Defining it to open outside of the screen area (tested with "Window_FlightPlan=1,3000,100"), it also opens with the left edge visible. The only case I came across where the entire window ended up outside the screen area was when resizing the EuroScope program window. In that case the plugin does not get the new window dimensions in time, and zooming or panning the screen is necessary to run the window limiting code again.

If there is a case where a window gets positioned completely outside the screen as a result of something other than resizing the program window, please provide exact steps to reproduce so I can have a look if it can be prevented.

Link to comment
Share on other sites

  • 3 weeks later...
Jonas Kuster (1158939)
On 28/11/2020 at 11:37, Juha Holopainen said:

Saving window positions from within the plugin is not planned as the plugin wouldn't know where to save them (general or callsign-specific, and if callsign-specific, and specific to the exact callsign or a part of it, etc.). A lot of the flexibility would be lost.

Why not save them in the ASR file, exactly as other settings are already? You can easily write these numbers to plugin specific entries, and fall back to the default one if these entries don't exist in the ASR. When using specific plugin settings, you probably gonna use a specific ASR for this as well, so this would be a match.

Jonas Kuster Leader Operation - vACC Switzerland | www.vacc.ch

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

When visiting this site, only cookies that are strictly necessary for you to use the website is being used, unless you have provided further consent. Read more in our Privacy Policy