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