When import dialog taller than main window, it's not horizontally centered

Issue #374 new
Robert Leach created an issue

USE CASE: WHAT DO YOU WANT TO DO?

I would like the placement of the data import interface dialog to be consistent from machine to machine.

STEPS TO REPRODUCE AN ISSUE (OR TRIGGER A NEW FEATURE)

  1. On a 15" Mac Laptop, run treeview
  2. Make the main window as small as it can be and drag it to the lower right corner of the screen
  3. Open any file
  4. Observe the positioning of the data import dialog window on the screen.

CURRENT BEHAVIOR

When the data import window is taller than the main window, it is placed on the left edge of the screen. When the data import window is shorter than the main window, it is centered over the main window:

When taller:

data_import_window_not_horiz_centered_when_taller_and_at_bottom.png

When shorter:

data_import_horiz_centered_when_shorter_and_at_bottom.png

EXPECTED BEHAVIOR

The placement of the data import window should always be horizontally and vertically aligned with the main window and adjusted to not go off the edge of the screen.

DEVELOPERS ONLY SECTION

SUGGESTED CHANGE (Pseudocode optional)

Center mathematically and adjust to bring screen-distended portions back into view.

FILES AFFECTED (where the changes will be implemented) - developers only

unknown

LEVEL OF EFFORT - developers only

trivial

COMMENTS

Comments (12)

  1. Robert Leach reporter

    I started developing on my laptop at home for the first time today, so I'm seeing new issues pop up related to screen size.

  2. Christopher Keil repo owner

    The size of the dialog is manually set at the moment and if centering it means that part of it would be off-screen, it will not be centered. What could be done in case the TreeView3 app frame is smaller and on some edge is to pop open the dialog in that corner, keep it's size as-is and overlay it in front of the app. So it would be "as much centered as possible" rather than moving to another portion of the screen.

    Google Chrome does this on Windows (no idea about OSX or Linux right now):

    desk1.jpg

    desk2.jpg

  3. Robert Leach reporter

    I just figured it could behave the same way the cluster window does. The cluster window is wider than the main window and when I open the cluster window (when the main window is against the lower-right corner of the display), the cluster window is vertically centered and moved just left of center of the main window so that the right-edge is against the right edge of the display.

    I would just expect the load window to behave analogously in that, if it's taller, it's horizontally centered and it's bottom edge is against the bottom edge of the screen. Seems like this should be the expected behavior, no?

    Here's the location where the cluster window is placed:

    cluster_window_placement_using_small_screen.png

  4. Christopher Keil repo owner

    Just added 2 pics (Internet was bad before) to my previous comment. Does this resemble what you mean?

    Edit: ok just saw your screenshot (again, bad Internet here). I have to look at how the dialog centers itself. Since they both use CustomDialog as base class I would find it curious if the methods actually differ.

  5. Robert Leach reporter

    OK, now that I see your screen captures, I see you are agreeing with me. I got confused because it sounded like you were disagreeing... The example you included is not akin to what happens currently with the load window, as you can see in the screenshots I attached to the issue. TV3 is putting the load window against the left edge of the screen when the main window is against the right edge and is shorter than it (even though it is horizontally narrower than the main window). The horizontal placement of the window should not have changed.

  6. Log in to comment