Notification preflet and server changes
Remove unneeded classes from preflet jamfile Fix some notification layout and bold text issues
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
* Copyright 2017, Haiku, Inc. All Rights Reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef EP_APPREFFILTER_H
|
||||
#define EP_APPREFFILTER_H
|
||||
#ifndef _APP_REF_FILTER_H
|
||||
#define _APP_REF_FILTER_H
|
||||
|
||||
#include <FilePanel.h>
|
||||
#include <NodeInfo.h>
|
||||
@@ -18,4 +18,4 @@ public:
|
||||
const char *filetype);
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif // _APP_REF_FILTER_H
|
||||
|
||||
@@ -12,8 +12,6 @@ Application Notifications :
|
||||
SettingsPane.cpp
|
||||
GeneralView.cpp
|
||||
NotificationsView.cpp
|
||||
../../servers/notification/NotificationView.cpp
|
||||
../../servers/notification/AppGroupView.cpp
|
||||
: be translation tracker libcolumnlistview.a libnotification.a [ TargetLibstdc++ ] localestub
|
||||
: Notifications.rdef
|
||||
;
|
||||
|
||||
@@ -38,7 +38,7 @@ AppGroupView::AppGroupView(const BMessenger& messenger, const char* label)
|
||||
{
|
||||
SetFlags(Flags() | B_WILL_DRAW);
|
||||
|
||||
fHeaderSize = be_plain_font->Size()
|
||||
fHeaderSize = be_bold_font->Size()
|
||||
+ be_control_look->ComposeSpacing(B_USE_ITEM_SPACING);
|
||||
static_cast<BGroupLayout*>(GetLayout())->SetInsets(0, fHeaderSize, 0, 0);
|
||||
}
|
||||
@@ -92,9 +92,7 @@ AppGroupView::Draw(BRect updateRect)
|
||||
if (fCollapsed)
|
||||
label << " (" << fInfo.size() << ")";
|
||||
|
||||
BFont boldFont(be_plain_font);
|
||||
boldFont.SetFace(B_BOLD_FACE);
|
||||
SetFont(&boldFont);
|
||||
SetFont(be_bold_font);
|
||||
font_height fontHeight;
|
||||
GetFontHeight(&fontHeight);
|
||||
float y = (bounds.top + bounds.bottom - ceilf(fontHeight.ascent)
|
||||
|
||||
@@ -457,10 +457,8 @@ NotificationView::SetText(float newMaxWidth)
|
||||
else
|
||||
iconRight += 32;
|
||||
|
||||
BFont boldFont(be_plain_font);
|
||||
boldFont.SetFace(B_BOLD_FACE);
|
||||
font_height fh;
|
||||
boldFont.GetHeight(&fh);
|
||||
be_bold_font->GetHeight(&fh);
|
||||
float fontHeight = ceilf(fh.leading) + ceilf(fh.descent)
|
||||
+ ceilf(fh.ascent);
|
||||
float y = fontHeight + kEdgePadding * 2;
|
||||
@@ -468,7 +466,7 @@ NotificationView::SetText(float newMaxWidth)
|
||||
// Title
|
||||
LineInfo* titleLine = new LineInfo;
|
||||
titleLine->text = fNotification->Title();
|
||||
titleLine->font = boldFont;
|
||||
titleLine->font = *be_bold_font;
|
||||
|
||||
titleLine->location = BPoint(iconRight + kEdgePadding, y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user