Ensure the window is at the right position before showing it. Fixes #7011.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42587 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,7 +54,7 @@ const float kSmallPadding = 2;
|
|||||||
|
|
||||||
NotificationWindow::NotificationWindow()
|
NotificationWindow::NotificationWindow()
|
||||||
:
|
:
|
||||||
BWindow(BRect(10, 10, 30, 30), B_TRANSLATE_MARK("Notification"),
|
BWindow(BRect(0, 0, 0, 0), B_TRANSLATE_MARK("Notification"),
|
||||||
kLeftTitledWindowLook, B_FLOATING_ALL_WINDOW_FEEL, B_AVOID_FRONT | B_AVOID_FOCUS | B_NOT_CLOSABLE
|
kLeftTitledWindowLook, B_FLOATING_ALL_WINDOW_FEEL, B_AVOID_FRONT | B_AVOID_FOCUS | B_NOT_CLOSABLE
|
||||||
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE,
|
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE,
|
||||||
B_ALL_WORKSPACES)
|
B_ALL_WORKSPACES)
|
||||||
@@ -63,6 +63,7 @@ NotificationWindow::NotificationWindow()
|
|||||||
|
|
||||||
AddChild(fBorder);
|
AddChild(fBorder);
|
||||||
|
|
||||||
|
SetPosition();
|
||||||
Show();
|
Show();
|
||||||
Hide();
|
Hide();
|
||||||
|
|
||||||
@@ -363,13 +364,15 @@ NotificationWindow::ResizeAll()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResizeTo(ViewWidth(), height);
|
ResizeTo(ViewWidth(), height);
|
||||||
PopupAnimation(Bounds().Width(), Bounds().Height());
|
PopupAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
NotificationWindow::PopupAnimation(float width, float height)
|
NotificationWindow::SetPosition()
|
||||||
{
|
{
|
||||||
|
float width = Bounds().Width();
|
||||||
|
float height = Bounds().Height();
|
||||||
float x = 0, y = 0, sx, sy;
|
float x = 0, y = 0, sx, sy;
|
||||||
float pad = 0;
|
float pad = 0;
|
||||||
BDeskbar deskbar;
|
BDeskbar deskbar;
|
||||||
@@ -423,6 +426,12 @@ NotificationWindow::PopupAnimation(float width, float height)
|
|||||||
}
|
}
|
||||||
|
|
||||||
MoveTo(x, y);
|
MoveTo(x, y);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
NotificationWindow::PopupAnimation()
|
||||||
|
{
|
||||||
|
SetPosition();
|
||||||
|
|
||||||
if (IsHidden() && fViews.size() != 0)
|
if (IsHidden() && fViews.size() != 0)
|
||||||
Show();
|
Show();
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
friend class AppGroupView;
|
friend class AppGroupView;
|
||||||
|
|
||||||
void PopupAnimation(float, float);
|
void SetPosition();
|
||||||
|
void PopupAnimation();
|
||||||
void LoadSettings(bool startMonitor = false);
|
void LoadSettings(bool startMonitor = false);
|
||||||
void LoadAppFilters(bool startMonitor = false);
|
void LoadAppFilters(bool startMonitor = false);
|
||||||
void SaveAppFilters();
|
void SaveAppFilters();
|
||||||
|
|||||||
Reference in New Issue
Block a user