app_server: Add casts to appease GCC2.
This commit is contained in:
@@ -207,7 +207,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
// TODO: While this works, it does not look so crisp at higher resolutions.
|
// TODO: While this works, it does not look so crisp at higher resolutions.
|
||||||
#define COLORS_INDEX(i, borderWidth, nominalLimit) ((float(i) / float(borderWidth)) * nominalLimit)
|
#define COLORS_INDEX(i, borderWidth, nominalLimit) int32((float(i) / float(borderWidth)) * nominalLimit)
|
||||||
|
|
||||||
// Draw the border frame
|
// Draw the border frame
|
||||||
BRect border = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
|
BRect border = BRect(fTopBorder.LeftTop(), fBottomBorder.RightBottom());
|
||||||
@@ -231,7 +231,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
|
|||||||
if (fTitleBarRect.IsValid()) {
|
if (fTitleBarRect.IsValid()) {
|
||||||
// grey along the bottom of the tab
|
// grey along the bottom of the tab
|
||||||
// (overwrites "white" from frame)
|
// (overwrites "white" from frame)
|
||||||
const int overdraw = ceilf(fBorderWidth / 5.0f);
|
const int overdraw = (int)ceilf(fBorderWidth / 5.0f);
|
||||||
for (int i = 1; i <= overdraw; i++) {
|
for (int i = 1; i <= overdraw; i++) {
|
||||||
fDrawingEngine->StrokeLine(
|
fDrawingEngine->StrokeLine(
|
||||||
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),
|
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),
|
||||||
@@ -300,7 +300,7 @@ DefaultDecorator::_DrawFrame(BRect rect)
|
|||||||
if (fTitleBarRect.IsValid() && fTopTab->look != kLeftTitledWindowLook) {
|
if (fTitleBarRect.IsValid() && fTopTab->look != kLeftTitledWindowLook) {
|
||||||
// grey along the bottom of the tab
|
// grey along the bottom of the tab
|
||||||
// (overwrites "white" from frame)
|
// (overwrites "white" from frame)
|
||||||
const int overdraw = ceilf(fBorderWidth / 5.0f);
|
const int overdraw = (int)ceilf(fBorderWidth / 5.0f);
|
||||||
for (int i = 1; i <= overdraw; i++) {
|
for (int i = 1; i <= overdraw; i++) {
|
||||||
fDrawingEngine->StrokeLine(
|
fDrawingEngine->StrokeLine(
|
||||||
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),
|
BPoint(fTitleBarRect.left + 2, fTitleBarRect.bottom + i),
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ TabDecorator::_DoLayout()
|
|||||||
fBorderWidth = 0;
|
fBorderWidth = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
fBorderWidth *= scaleFactor;
|
fBorderWidth = int32(fBorderWidth * scaleFactor);
|
||||||
fResizeKnobSize = kResizeKnobSize * scaleFactor;
|
fResizeKnobSize = kResizeKnobSize * scaleFactor;
|
||||||
fBorderResizeLength = kBorderResizeLength * scaleFactor;
|
fBorderResizeLength = kBorderResizeLength * scaleFactor;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user