From 14ac1ee9620bcd06aa0a3730d0d66897eff5f6f1 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Mon, 31 Oct 2011 14:26:37 +0000 Subject: [PATCH] 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 --- src/kits/interface/Window.cpp | 7 ++++--- src/servers/notification/NotificationView.cpp | 4 ++-- src/servers/notification/NotificationWindow.cpp | 8 ++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/kits/interface/Window.cpp b/src/kits/interface/Window.cpp index aad44398ce..b95e19d313 100644 --- a/src/kits/interface/Window.cpp +++ b/src/kits/interface/Window.cpp @@ -2088,9 +2088,10 @@ BWindow::DecoratorFrame() const settings.FindFloat("border width", &borderWidth); } else { // probably no-border window look - if (fLook == B_NO_BORDER_WINDOW_LOOK) { - borderWidth = 0.0; - } + if (fLook == B_NO_BORDER_WINDOW_LOOK) + borderWidth = 0.f; + else if (fLook == B_BORDERED_WINDOW_LOOK) + borderWidth = 1.f; // else use fall-back values from above } diff --git a/src/servers/notification/NotificationView.cpp b/src/servers/notification/NotificationView.cpp index 215b1e1958..8241542496 100644 --- a/src/servers/notification/NotificationView.cpp +++ b/src/servers/notification/NotificationView.cpp @@ -105,8 +105,8 @@ NotificationView::NotificationView(NotificationWindow* win, break; case B_PROGRESS_NOTIFICATION: { - BRect frame(kIconStripeWidth + 8, Bounds().bottom - 36, - Bounds().right - 8, Bounds().bottom - 8); + BRect frame(kIconStripeWidth + 9, Bounds().bottom - 36, + Bounds().right - 8, Bounds().bottom - 10); BStatusBar* progress = new BStatusBar(frame, "progress"); progress->SetBarHeight(12.0f); progress->SetMaxValue(1.0f); diff --git a/src/servers/notification/NotificationWindow.cpp b/src/servers/notification/NotificationWindow.cpp index a633c38321..8c9c5032b0 100644 --- a/src/servers/notification/NotificationWindow.cpp +++ b/src/servers/notification/NotificationWindow.cpp @@ -55,14 +55,17 @@ const float kSmallPadding = 2; NotificationWindow::NotificationWindow() : 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_NOT_ZOOMABLE | B_NOT_MINIMIZABLE | B_NOT_RESIZABLE | B_NOT_MOVABLE, + B_BORDERED_WINDOW_LOOK, 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_MOVABLE, B_ALL_WORKSPACES) { fBorder = new BorderView(Bounds(), "Notification"); AddChild(fBorder); + // Needed so everything gets the right size - we should switch to layout + // mode... Show(); Hide(); @@ -379,6 +382,7 @@ NotificationWindow::SetPosition() float rightOffset = bounds.right - Frame().right; float bottomOffset = bounds.bottom - Frame().bottom; // Size of the borders around the window + printf("%f %f %f %f\n",leftOffset, topOffset, rightOffset, bottomOffset); float x = Frame().left, y = Frame().top; // If we can't guess, don't move...