Add MoveOnScreen() calls to a number of applications.
Technically reverts 039f93ce5e,
but just moves the call elsewhere.
Should fix #19164.
Change-Id: I3f240d4a28a4ec522382440944a3c80a74bbaa0e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8445
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
9d9aa08a75
commit
0324754ddb
@@ -21,7 +21,6 @@ ActivityMonitor::ActivityMonitor()
|
|||||||
: BApplication(kSignature)
|
: BApplication(kSignature)
|
||||||
{
|
{
|
||||||
fWindow = new ActivityWindow();
|
fWindow = new ActivityWindow();
|
||||||
fWindow->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ ActivityWindow::ActivityWindow()
|
|||||||
if (settings.FindRect("window frame", &frame) == B_OK) {
|
if (settings.FindRect("window frame", &frame) == B_OK) {
|
||||||
MoveTo(frame.LeftTop());
|
MoveTo(frame.LeftTop());
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
|
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
||||||
} else {
|
} else {
|
||||||
float scaling = be_plain_font->Size() / 12.0f;
|
float scaling = be_plain_font->Size() / 12.0f;
|
||||||
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ CharacterWindow::CharacterWindow()
|
|||||||
if (settings.FindRect("window frame", &frame) == B_OK) {
|
if (settings.FindRect("window frame", &frame) == B_OK) {
|
||||||
MoveTo(frame.LeftTop());
|
MoveTo(frame.LeftTop());
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
|
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
||||||
} else {
|
} else {
|
||||||
float scaling = be_plain_font->Size() / 12.0f;
|
float scaling = be_plain_font->Size() / 12.0f;
|
||||||
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
||||||
|
|||||||
@@ -59,9 +59,10 @@ CalcWindow::CalcWindow(BRect frame, BMessage* settings)
|
|||||||
fCalcView->AddChild(dragger);
|
fCalcView->AddChild(dragger);
|
||||||
|
|
||||||
BRect rect;
|
BRect rect;
|
||||||
if (settings->FindRect("window frame", &rect) == B_OK)
|
if (settings->FindRect("window frame", &rect) == B_OK) {
|
||||||
SetFrame(rect);
|
SetFrame(rect);
|
||||||
else
|
MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
||||||
|
} else
|
||||||
SetFrame(frame, true);
|
SetFrame(frame, true);
|
||||||
|
|
||||||
// Add shortcut keys to menu options
|
// Add shortcut keys to menu options
|
||||||
|
|||||||
@@ -156,11 +156,9 @@ SudokuWindow::SudokuWindow()
|
|||||||
if (settings.FindRect("window frame", &frame) == B_OK) {
|
if (settings.FindRect("window frame", &frame) == B_OK) {
|
||||||
MoveTo(frame.LeftTop());
|
MoveTo(frame.LeftTop());
|
||||||
ResizeTo(frame.Width(), frame.Height());
|
ResizeTo(frame.Width(), frame.Height());
|
||||||
frame.OffsetTo(B_ORIGIN);
|
|
||||||
} else {
|
} else {
|
||||||
float scaling = std::max(1.0f, be_plain_font->Size() / 12.0f);
|
float scaling = std::max(1.0f, be_plain_font->Size() / 12.0f);
|
||||||
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
ResizeTo(Frame().Width() * scaling, Frame().Height() * scaling);
|
||||||
frame = Bounds();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MoveOnScreen();
|
MoveOnScreen();
|
||||||
|
|||||||
@@ -295,6 +295,7 @@ BackgroundsView::AllAttached()
|
|||||||
if (fSettings.FindPoint("pos", &point) == B_OK) {
|
if (fSettings.FindPoint("pos", &point) == B_OK) {
|
||||||
fFoundPositionSetting = true;
|
fFoundPositionSetting = true;
|
||||||
Window()->MoveTo(point);
|
Window()->MoveTo(point);
|
||||||
|
Window()->MoveOnScreen(B_MOVE_IF_PARTIALLY_OFFSCREEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
fApply->SetEnabled(false);
|
fApply->SetEnabled(false);
|
||||||
|
|||||||
Reference in New Issue
Block a user