Opened 15 years ago
Closed 13 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: | ||
Platform: | All |
Description
Tested with hrev35600 in VirtualBox 3.0.12.
Attachments (2)
Change History (8)
by , 14 years ago
Attachment: | always-center.diff added |
---|
comment:1 by , 14 years ago
patch: | 0 → 1 |
---|
comment:2 by , 14 years ago
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.
by , 14 years ago
Attachment: | add_offsets.diff added |
---|
follow-up: 4 comment:3 by , 14 years ago
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 by , 14 years ago
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 by , 13 years ago
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 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
Always center the edit description window on screen.