diff --git a/src/servers/app/WorkspacesLayer.cpp b/src/servers/app/WorkspacesLayer.cpp index 0bef6ba778..05285ce28a 100644 --- a/src/servers/app/WorkspacesLayer.cpp +++ b/src/servers/app/WorkspacesLayer.cpp @@ -23,6 +23,8 @@ WorkspacesLayer::WorkspacesLayer(BRect frame, const char* name, int32 token, uint32 resizeMode, uint32 flags, DrawingEngine* driver) : Layer(frame, name, token, resizeMode, flags, driver) { + fDrawState->SetLowColor(RGBColor(255, 255, 255)); + fDrawState->SetHighColor(RGBColor(0, 0, 0)); } @@ -138,6 +140,32 @@ WorkspacesLayer::_DrawWindow(const BRect& workspaceFrame, frame.InsetBy(1, 1); GetDrawingEngine()->FillRect(frame, white); + + // draw title + + // TODO: disabled because it's much too slow this way - the mini-window + // functionality should probably be moved into the WindowLayer class, + // so that it has only to be recalculated on demand. With double buffered + // windows, this would also open up the door to have a more detailed + // preview. +#if 0 + BString title = window->Name(); + + ServerFont font = fDrawState->Font(); + font.SetSize(7); + fDrawState->SetFont(font); + + fDrawState->Font().TruncateString(&title, B_TRUNCATE_END, frame.Width() - 4); + float width = GetDrawingEngine()->StringWidth(title.String(), title.Length(), + fDrawState, NULL); + float height = GetDrawingEngine()->StringHeight(title.String(), title.Length(), + fDrawState); + + GetDrawingEngine()->DrawString(title.String(), title.Length(), + BPoint(frame.left + (frame.Width() - width) / 2, + frame.top + (frame.Height() + height) / 2), + fDrawState, NULL); +#endif }