Andersen27 / Photino.Blazor.Docking

Docking system for Photino.Blazor applications with split, tabs and floating panels support
MIT License
11 stars 2 forks source link

Remaining scaling issues: detached panels and auto-rescale #6

Closed pm64 closed 1 month ago

pm64 commented 8 months ago

The recent updates to support multiple monitor scales is a huge leap forward. My test system has 3 monitors, with one at 150%. I'm able to move windows between monitors now, and the system is generally stable.

Of course, I am observing 2 remaining issues :)

  1. After a window is moved between displays at different scales, it doesn't re-scale automatically. But then manually resizing the window triggers the needed re-scale.

  2. It looks like support for detached panels at non-100% scale is still pending. If a panel is detached from the main window at non-100% scale, it exhibits several glitches: it goes crazy when resized, the mouse pointer is offset from the title bar when dragging, etc.. basically similar to what the main window was doing prior to the recent update.

A bit of complexity here since the window and multiple detached panels could each be displayed on different monitors at different scales. But currently the behavior is very near perfect.

Andersen27 commented 8 months ago
  1. Save/load layout was broken (this is regression bug which I fixed in the develop branch).
Andersen27 commented 8 months ago

3 monitors... I have a great tester suitable for the project :)

  1. CustomWindow component have the following code. It does exactly what you described with the window resize, but automatically, and i tested this. The window interface scales depending on which monitor has a larger window area, so you might not have a rescale on dragging end if the window still occupies a significant part of the previous monitor. You can get an unambiguous result by moving the entire window from one monitor to another. To resolve this issue, I will need additional information such as screen recording. I can't reproduce it yet.

    private void OnHeaderPointerUp(PointerEventArgs e)
    {
    if (_movingProcess)
    {
        . . .
    
        // hack to force update layout scale when working with different scaled screens
        var targetSize = Size;
        Window.Size = new Size(targetSize.Width, targetSize.Height - 1);
        Window.Size = targetSize;
    }
    }
  2. I will check it as soon as I have access to a computer with 2 monitors. Thank you for report!
Andersen27 commented 8 months ago

In addition to 1. This problem is reproduced on Photino-only project. So if the window containing the DockPanelHost component is the default Photino window (as in Photino.Blazor.Docking.Simple), the effect will remain. But for the main window you can also use the Photino.Blazer.CustomWindow project, and problem will be solved, since I control dragging window process.

pm64 commented 8 months ago

Thanks @Andersen27, this is consistent with what I'm seeing. None of these issues are present when using Docking+CustomWindow.

Andersen27 commented 1 month ago

I'm closing it because it's irrelevant