Skip to content

Commit

Permalink
Open Settings window relative to the main window
Browse files Browse the repository at this point in the history
Don't open the Settings window at the last saved position, but
always with a fixed offset to the main window.
  • Loading branch information
humdingerb committed Nov 29, 2024
1 parent 06109df commit d4bc752
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ MainWindow::MessageReceived(BMessage* message)
{
if (fSetupWindow->IsHidden()) {
SetFeel(B_NORMAL_WINDOW_FEEL);
BRect rect = Frame().OffsetBySelf(fIconHeight * 4, fIconHeight);
fSetupWindow->MoveTo(rect.LeftTop());
fSetupWindow->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
fSetupWindow->Show();
} else {
SetFeel(B_FLOATING_ALL_WINDOW_FEEL);
Expand Down

0 comments on commit d4bc752

Please sign in to comment.