Tweak the notification window again :

* Spacing of the bprogressbar is now 8pixels on each size
  * Remove the useless window tab for now

Also fix DecoratorFrame() again as BORDERED_WINDOW didn't work with it either.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@43034 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adrien Destugues
2011-10-31 14:26:37 +00:00
parent 9b7ff360a0
commit 14ac1ee962
3 changed files with 12 additions and 7 deletions
+4 -3
View File
@@ -2088,9 +2088,10 @@ BWindow::DecoratorFrame() const
settings.FindFloat("border width", &borderWidth); settings.FindFloat("border width", &borderWidth);
} else { } else {
// probably no-border window look // probably no-border window look
if (fLook == B_NO_BORDER_WINDOW_LOOK) { if (fLook == B_NO_BORDER_WINDOW_LOOK)
borderWidth = 0.0; borderWidth = 0.f;
} else if (fLook == B_BORDERED_WINDOW_LOOK)
borderWidth = 1.f;
// else use fall-back values from above // else use fall-back values from above
} }
@@ -105,8 +105,8 @@ NotificationView::NotificationView(NotificationWindow* win,
break; break;
case B_PROGRESS_NOTIFICATION: case B_PROGRESS_NOTIFICATION:
{ {
BRect frame(kIconStripeWidth + 8, Bounds().bottom - 36, BRect frame(kIconStripeWidth + 9, Bounds().bottom - 36,
Bounds().right - 8, Bounds().bottom - 8); Bounds().right - 8, Bounds().bottom - 10);
BStatusBar* progress = new BStatusBar(frame, "progress"); BStatusBar* progress = new BStatusBar(frame, "progress");
progress->SetBarHeight(12.0f); progress->SetBarHeight(12.0f);
progress->SetMaxValue(1.0f); progress->SetMaxValue(1.0f);
@@ -55,14 +55,17 @@ const float kSmallPadding = 2;
NotificationWindow::NotificationWindow() NotificationWindow::NotificationWindow()
: :
BWindow(BRect(0, 0, 0, 0), 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 B_BORDERED_WINDOW_LOOK, B_FLOATING_ALL_WINDOW_FEEL, B_AVOID_FRONT
| B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NOT_MOVABLE, | B_AVOID_FOCUS | B_NOT_CLOSABLE | B_NOT_ZOOMABLE | B_NOT_MINIMIZABLE
| B_NOT_RESIZABLE | B_NOT_MOVABLE,
B_ALL_WORKSPACES) B_ALL_WORKSPACES)
{ {
fBorder = new BorderView(Bounds(), "Notification"); fBorder = new BorderView(Bounds(), "Notification");
AddChild(fBorder); AddChild(fBorder);
// Needed so everything gets the right size - we should switch to layout
// mode...
Show(); Show();
Hide(); Hide();
@@ -379,6 +382,7 @@ NotificationWindow::SetPosition()
float rightOffset = bounds.right - Frame().right; float rightOffset = bounds.right - Frame().right;
float bottomOffset = bounds.bottom - Frame().bottom; float bottomOffset = bounds.bottom - Frame().bottom;
// Size of the borders around the window // Size of the borders around the window
printf("%f %f %f %f\n",leftOffset, topOffset, rightOffset, bottomOffset);
float x = Frame().left, y = Frame().top; float x = Frame().left, y = Frame().top;
// If we can't guess, don't move... // If we can't guess, don't move...