warning fixes, one might also want to change hardcoded colors into system colors, but that's later on...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24372 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
092c62f0f1
commit
0c0d857f2d
@ -69,12 +69,12 @@ void DormantNodeListItem::DrawItem(
|
|||||||
r.right = r.left + B_MINI_ICON - 1.0;
|
r.right = r.left + B_MINI_ICON - 1.0;
|
||||||
r.bottom = r.top + B_MINI_ICON - 1.0;
|
r.bottom = r.top + B_MINI_ICON - 1.0;
|
||||||
if (IsSelected()) {
|
if (IsSelected()) {
|
||||||
owner->SetHighColor(255.0, 255.0, 255.0, 255.0);
|
owner->SetHighColor(255, 255, 255, 255);
|
||||||
owner->FillRect(r);
|
owner->FillRect(r);
|
||||||
owner->SetDrawingMode(B_OP_INVERT);
|
owner->SetDrawingMode(B_OP_INVERT);
|
||||||
owner->DrawBitmap(m_icon, r.LeftTop());
|
owner->DrawBitmap(m_icon, r.LeftTop());
|
||||||
owner->SetDrawingMode(B_OP_ALPHA);
|
owner->SetDrawingMode(B_OP_ALPHA);
|
||||||
owner->SetHighColor(0.0, 0.0, 0.0, 180.0);
|
owner->SetHighColor(0, 0, 0, 180);
|
||||||
owner->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
|
owner->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
|
||||||
owner->DrawBitmap(m_icon, r.LeftTop());
|
owner->DrawBitmap(m_icon, r.LeftTop());
|
||||||
owner->SetDrawingMode(B_OP_OVER);
|
owner->SetDrawingMode(B_OP_OVER);
|
||||||
@ -93,7 +93,7 @@ void DormantNodeListItem::DrawItem(
|
|||||||
r.bottom = r.top + m_fontHeight.ascent + m_fontHeight.descent;
|
r.bottom = r.top + m_fontHeight.ascent + m_fontHeight.descent;
|
||||||
if (IsSelected() || drawEverything) {
|
if (IsSelected() || drawEverything) {
|
||||||
if (IsSelected()) {
|
if (IsSelected()) {
|
||||||
owner->SetHighColor(16.0, 64.0, 96.0, 255.0);
|
owner->SetHighColor(16, 64, 96, 255);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
owner->SetHighColor(owner->ViewColor());
|
owner->SetHighColor(owner->ViewColor());
|
||||||
@ -101,10 +101,10 @@ void DormantNodeListItem::DrawItem(
|
|||||||
owner->FillRect(r);
|
owner->FillRect(r);
|
||||||
}
|
}
|
||||||
if (IsSelected()) {
|
if (IsSelected()) {
|
||||||
owner->SetHighColor(255.0, 255.0, 255.0, 255.0);
|
owner->SetHighColor(255, 255, 255, 255);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
owner->SetHighColor(0.0, 0.0, 0.0, 0.0);
|
owner->SetHighColor(0, 0, 0, 0);
|
||||||
}
|
}
|
||||||
BPoint labelOffset(r.left + 1.0, r.bottom - m_fontHeight.descent);
|
BPoint labelOffset(r.left + 1.0, r.bottom - m_fontHeight.descent);
|
||||||
owner->DrawString(m_info.name, labelOffset);
|
owner->DrawString(m_info.name, labelOffset);
|
||||||
@ -199,10 +199,10 @@ BBitmap *DormantNodeListItem::getDragBitmap() {
|
|||||||
BView *dragView = new BView(dragBitmap->Bounds(), "", B_FOLLOW_NONE, 0);
|
BView *dragView = new BView(dragBitmap->Bounds(), "", B_FOLLOW_NONE, 0);
|
||||||
dragBitmap->AddChild(dragView);
|
dragBitmap->AddChild(dragView);
|
||||||
dragView->SetOrigin(0.0, 0.0);
|
dragView->SetOrigin(0.0, 0.0);
|
||||||
dragView->SetHighColor(0.0, 0.0, 0.0, 0.0);
|
dragView->SetHighColor(0, 0, 0, 0);
|
||||||
dragView->FillRect(dragView->Bounds());
|
dragView->FillRect(dragView->Bounds());
|
||||||
dragView->SetDrawingMode(B_OP_ALPHA);
|
dragView->SetDrawingMode(B_OP_ALPHA);
|
||||||
dragView->SetHighColor(0.0, 0.0, 0.0, 128.0);
|
dragView->SetHighColor(0, 0, 0, 128);
|
||||||
dragView->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
|
dragView->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_COMPOSITE);
|
||||||
// Drawing code back again
|
// Drawing code back again
|
||||||
if (m_icon) {
|
if (m_icon) {
|
||||||
|
@ -288,7 +288,7 @@ StatusView::drawInto(BView *v, BRect updateRect)
|
|||||||
|
|
||||||
r.InsetBy(2.0, 0.0);
|
r.InsetBy(2.0, 0.0);
|
||||||
v->SetDrawingMode(B_OP_ALPHA);
|
v->SetDrawingMode(B_OP_ALPHA);
|
||||||
v->SetHighColor(0, 0, 0, 255 * m_opacity);
|
v->SetHighColor(0, 0, 0, uchar(255 * m_opacity));
|
||||||
|
|
||||||
// draw icon
|
// draw icon
|
||||||
if (m_icon) {
|
if (m_icon) {
|
||||||
|
@ -316,7 +316,7 @@ void ValControlDigitSegment::MessageReceived(BMessage* pMsg) {
|
|||||||
case ValControl::M_SET_VALUE:
|
case ValControl::M_SET_VALUE:
|
||||||
err = pMsg->FindDouble("value", &fVal);
|
err = pMsg->FindDouble("value", &fVal);
|
||||||
ASSERT(err == B_OK);
|
ASSERT(err == B_OK);
|
||||||
setValue(fVal, fVal < 0);
|
setValue((int64)fVal, fVal < 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ValControl::M_GET_VALUE: {
|
case ValControl::M_GET_VALUE: {
|
||||||
|
@ -32,6 +32,9 @@ __BEGIN_CORTEX_NAMESPACE
|
|||||||
// the locking interface
|
// the locking interface
|
||||||
|
|
||||||
class ILockable {
|
class ILockable {
|
||||||
|
public:
|
||||||
|
ILockable() { }
|
||||||
|
virtual ~ILockable() { }
|
||||||
public: // constants
|
public: // constants
|
||||||
enum lock_t {
|
enum lock_t {
|
||||||
WRITE,
|
WRITE,
|
||||||
|
@ -14,6 +14,9 @@ __BEGIN_CORTEX_NAMESPACE
|
|||||||
|
|
||||||
class IObservable {
|
class IObservable {
|
||||||
|
|
||||||
|
public:
|
||||||
|
IObservable() { }
|
||||||
|
virtual ~IObservable() { }
|
||||||
public: // *** deletion
|
public: // *** deletion
|
||||||
// clients must call release() rather than deleting,
|
// clients must call release() rather than deleting,
|
||||||
// to ensure that all observers are notified of the
|
// to ensure that all observers are notified of the
|
||||||
|
@ -25,6 +25,8 @@ class MouseTrackingSourceView;
|
|||||||
// interface for a mouse-tracking destination
|
// interface for a mouse-tracking destination
|
||||||
class IMouseTrackingDestination {
|
class IMouseTrackingDestination {
|
||||||
public: // operations
|
public: // operations
|
||||||
|
IMouseTrackingDestination() { }
|
||||||
|
virtual ~IMouseTrackingDestination() { }
|
||||||
// a MouseTrackingSourceView has started tracking the mouse
|
// a MouseTrackingSourceView has started tracking the mouse
|
||||||
// (point is in pSource view coordinates)
|
// (point is in pSource view coordinates)
|
||||||
virtual void mouseTrackingBegin(
|
virtual void mouseTrackingBegin(
|
||||||
|
@ -267,4 +267,4 @@ void ObservableHandler::_handleRemoveObserver(
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// END -- ObservableHandler.cpp --
|
// END -- ObservableHandler.cpp --
|
||||||
|
@ -156,4 +156,4 @@ bool TextControlFloater::QuitRequested() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// END -- TextControlFloater.cpp --
|
// END -- TextControlFloater.cpp --
|
||||||
|
Loading…
x
Reference in New Issue
Block a user