R5 obviously doesn't have B_SHINE_COLOR, B_SHADOW_COLOR, and B_HIGHLIGHTED_CONTROL_COLOR.
Set the shell variable COMPILE_FOR_R5 to 1 when compiling DiskProbe for R5; it will use default values for the colors in this case. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6843 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
a1fd38b277
commit
4a6c7d6ffc
@ -4,6 +4,18 @@ UsePrivateHeaders shared ;
|
||||
|
||||
AddResources DiskProbe : DiskProbe.rdef ;
|
||||
|
||||
# set some additional defines for R5 compatibility
|
||||
{
|
||||
local defines = ;
|
||||
|
||||
if $(COMPILE_FOR_R5) {
|
||||
defines += COMPILE_FOR_R5 ;
|
||||
}
|
||||
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
SubDirC++Flags $(defines) -Wall -Wno-multichar ;
|
||||
}
|
||||
|
||||
App DiskProbe :
|
||||
DiskProbe.cpp
|
||||
DataEditor.cpp
|
||||
|
@ -301,8 +301,15 @@ PositionSlider::DrawBar()
|
||||
frame.top++;
|
||||
frame.left++;
|
||||
frame.right = ThumbFrame().left + ThumbFrame().Width() / 2;
|
||||
#ifdef COMPILE_FOR_R5
|
||||
if (IsEnabled())
|
||||
view->SetHighColor(102, 152, 203);
|
||||
else
|
||||
view->SetHighColor(92, 102, 160);
|
||||
#else
|
||||
view->SetHighColor(IsEnabled() ? ui_color(B_CONTROL_HIGHLIGHT_COLOR)
|
||||
: tint_color(ui_color(B_CONTROL_HIGHLIGHT_COLOR), B_DARKEN_1_TINT));
|
||||
#endif
|
||||
view->FillRect(frame);
|
||||
|
||||
frame.left = frame.right + 1;
|
||||
@ -312,8 +319,13 @@ PositionSlider::DrawBar()
|
||||
|
||||
rgb_color cornerColor = tint_color(ViewColor(), B_DARKEN_1_TINT);
|
||||
rgb_color darkColor = tint_color(ViewColor(), B_DARKEN_3_TINT);
|
||||
#ifdef COMPILE_FOR_R5
|
||||
rgb_color shineColor = {255, 255, 255};
|
||||
rgb_color shadowColor = {0, 0, 0};
|
||||
#else
|
||||
rgb_color shineColor = ui_color(B_SHINE_COLOR);
|
||||
rgb_color shadowColor = ui_color(B_SHADOW_COLOR);
|
||||
#endif
|
||||
if (!IsEnabled()) {
|
||||
darkColor = tint_color(ViewColor(), B_DARKEN_1_TINT);
|
||||
shineColor = tint_color(shineColor, B_DARKEN_2_TINT);
|
||||
@ -577,7 +589,11 @@ HeaderView::Draw(BRect updateRect)
|
||||
{
|
||||
BRect rect = Bounds();
|
||||
|
||||
#ifdef COMPILE_FOR_R5
|
||||
SetHighColor(255, 255, 255);
|
||||
#else
|
||||
SetHighColor(ui_color(B_SHINE_COLOR));
|
||||
#endif
|
||||
StrokeLine(rect.LeftTop(), rect.LeftBottom());
|
||||
StrokeLine(rect.LeftTop(), rect.RightTop());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user