style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30407 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -19,20 +19,20 @@
|
|||||||
namespace Bluetooth {
|
namespace Bluetooth {
|
||||||
|
|
||||||
DeviceListItem::DeviceListItem(BluetoothDevice* bDevice)
|
DeviceListItem::DeviceListItem(BluetoothDevice* bDevice)
|
||||||
: BListItem()
|
: BListItem(),
|
||||||
, fDevice(bDevice)
|
fDevice(bDevice)
|
||||||
{
|
{
|
||||||
SetDevice(fDevice);
|
SetDevice(fDevice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DeviceListItem::DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi)
|
DeviceListItem::DeviceListItem(bdaddr_t bdaddr, DeviceClass dClass, int32 rssi)
|
||||||
: BListItem()
|
: BListItem(),
|
||||||
, fDevice(NULL)
|
fDevice(NULL),
|
||||||
, fAddress(bdaddr)
|
fAddress(bdaddr),
|
||||||
, fClass(dClass)
|
fClass(dClass),
|
||||||
, fName("unknown")
|
fName("unknown"),
|
||||||
, fRSSI(rssi)
|
fRSSI(rssi)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -59,13 +59,13 @@ DeviceListItem::DrawItem(BView* owner, BRect itemRect, bool complete)
|
|||||||
{
|
{
|
||||||
rgb_color kBlack = { 0,0,0,0 };
|
rgb_color kBlack = { 0,0,0,0 };
|
||||||
rgb_color kHighlight = { 156,154,156,0 };
|
rgb_color kHighlight = { 156,154,156,0 };
|
||||||
|
|
||||||
if (IsSelected() || complete) {
|
if (IsSelected() || complete) {
|
||||||
rgb_color color;
|
rgb_color color;
|
||||||
if (IsSelected())
|
if (IsSelected())
|
||||||
color = kHighlight;
|
color = kHighlight;
|
||||||
else
|
else
|
||||||
color = owner->ViewColor();
|
color = owner->ViewColor();
|
||||||
|
|
||||||
owner->SetHighColor(color);
|
owner->SetHighColor(color);
|
||||||
owner->SetLowColor(color);
|
owner->SetLowColor(color);
|
||||||
@@ -127,7 +127,7 @@ DeviceListItem::DrawItem(BView* owner, BRect itemRect, bool complete)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
owner->SetHighColor(kBlack);
|
owner->SetHighColor(kBlack);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -138,9 +138,8 @@ DeviceListItem::Update(BView *owner, const BFont *font)
|
|||||||
|
|
||||||
font_height height;
|
font_height height;
|
||||||
font->GetHeight(&height);
|
font->GetHeight(&height);
|
||||||
SetHeight(MAX((height.ascent + height.descent + height.leading) * TEXT_ROWS + (TEXT_ROWS+1)*INSETS,
|
SetHeight(MAX((height.ascent + height.descent + height.leading) * TEXT_ROWS +
|
||||||
DeviceClass::PixelsForIcon + 2 * INSETS));
|
(TEXT_ROWS+1)*INSETS, DeviceClass::PixelsForIcon + 2 * INSETS));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user