Opened 9 years ago

Closed 7 years ago

#5472 closed bug (fixed)

[LaunchBox] "Set description" window appears offscreen

Reported by: diver Owned by: stippi
Priority: normal Milestone: R1
Component: Applications/LaunchBox Version: R1/Development
Keywords: gsoc2011 Cc:
Blocked By: Blocking:
Has a Patch: yes Platform: All

Description

Tested with hrev35600 in VirtualBox 3.0.12.

Attachments (2)

always-center.diff (283 bytes) - added by GeneralMaximus 8 years ago.
Always center the edit description window on screen.
add_offsets.diff (626 bytes) - added by GeneralMaximus 8 years ago.

Download all attachments as: .zip

Change History (8)

Changed 8 years ago by GeneralMaximus

Attachment: always-center.diff added

Always center the edit description window on screen.

comment:1 Changed 8 years ago by GeneralMaximus

Has a Patch: set

comment:2 Changed 8 years ago by yourpalal

Keywords: gsoc2011 added

First of all, thanks for looking in to this!

I don't think centering the NamePanel every single time it appears is the best way to solve this problem. For one thing, there are mechanisms in place in Launchbox that save the frame of the NamePanel, so that its location and size persist, even between boots. With this patch, you lost that functionality, but the code that actually carries out those actions (saving/loading the frame and so on) is still active.

One of the factors contributing to the undesired behaviour here is the make_sure_frame_is_on_screen() function (in support.cpp), which, if the frame is off to the left top (as fNamePanelFrame is, when it isn't loaded from the settings file) places the frame in the top left corner. Preferably, when fNamePanelFrame is invalid, the NamePanel would be placed near the LaunchBox window, instead of the top left corner.

Changed 8 years ago by GeneralMaximus

Attachment: add_offsets.diff added

comment:3 Changed 8 years ago by GeneralMaximus

Turns out the window was not really off the screen. make_sure_frame_is_on_screen just needed to take window borders into account when calculating the left and top edges of the window. Adding an offset of 5.0 fixes the issue.

Is there a way to get the border width programmatically instead of hardcoding the value?

comment:4 in reply to:  3 Changed 8 years ago by anevilyak

Replying to GeneralMaximus:

Is there a way to get the border width programmatically instead of hardcoding the value?

If I recall correctly, you can retrieve that via BWindow::GetDecoratorSettings(), c.f. http://dev.haiku-os.org/browser/haiku/trunk/headers/os/interface/Window.h#L210

comment:5 Changed 7 years ago by stippi

I think the solution should be to open the name panel near the LaunchBox panel for which the request is being made. Nothing should be saved in the settings except perhaps the user changed window size.

comment:6 Changed 7 years ago by stippi

Resolution: fixed
Status: newclosed

I've solved the problem differently in hrev42975 by placing the window near the mouse and to the side of the pad window that has enough room.

Note: See TracTickets for help on using tickets.