From 30811f5d73950246bd91d41e187afb3f64f86725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Mon, 16 Mar 2015 21:48:51 +0000 Subject: [PATCH] Network: display title items in bold. --- src/preferences/network/NetworkWindow.cpp | 27 ++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/src/preferences/network/NetworkWindow.cpp b/src/preferences/network/NetworkWindow.cpp index 50ee3162f9..b147a5ebe2 100644 --- a/src/preferences/network/NetworkWindow.cpp +++ b/src/preferences/network/NetworkWindow.cpp @@ -60,6 +60,31 @@ static const uint32 kMsgItemSelected = 'ItSl'; #define B_TRANSLATION_CONTEXT "NetworkWindow" +class TitleItem : public BStringItem { +public: + TitleItem(const char* title) + : + BStringItem(title) + { + } + + void DrawItem(BView* owner, BRect bounds, bool complete) + { + owner->SetFont(be_bold_font); + BStringItem::DrawItem(owner, bounds, complete); + owner->SetFont(be_plain_font); + } + + void Update(BView* owner, const BFont* font) + { + BStringItem::Update(owner, be_bold_font); + } +}; + + +// #pragma mark - + + NetworkWindow::NetworkWindow() : BWindow(BRect(100, 100, 400, 400), B_TRANSLATE("Network"), B_TITLED_WINDOW, @@ -442,7 +467,7 @@ NetworkWindow::_ListItemFor(BNetworkSettingsType type) BListItem* NetworkWindow::_CreateItem(const char* label) { - BListItem* item = new BStringItem(label); + BListItem* item = new TitleItem(label); item->SetExpanded(true); fListView->AddItem(item); return item;