summaryrefslogtreecommitdiff
path: root/src/widget.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-11-18 20:38:30 +0000
committerfrosch <frosch@openttd.org>2011-11-18 20:38:30 +0000
commitca4f0509fcd828711fcf799222b3ac27360d91bc (patch)
treeefc8f25fd46566b75e4e9a1c962099b4b213f5ba /src/widget.cpp
parent8ed02997d4214ce6fa33aae3d3a37c6ef9d520ef (diff)
downloadopenttd-ca4f0509fcd828711fcf799222b3ac27360d91bc.tar.xz
(svn r23252) -Codechange: Add WD_BEVEL_xxx constants.
Diffstat (limited to 'src/widget.cpp')
-rw-r--r--src/widget.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widget.cpp b/src/widget.cpp
index 1e50cdf6f..ba8c7ebf3 100644
--- a/src/widget.cpp
+++ b/src/widget.cpp
@@ -184,20 +184,20 @@ void DrawFrameRect(int left, int top, int right, int bottom, Colours colour, Fra
uint interior;
if (flags & FR_LOWERED) {
- GfxFillRect(left, top, left, bottom, dark);
- GfxFillRect(left + 1, top, right, top, dark);
- GfxFillRect(right, top + 1, right, bottom - 1, light);
- GfxFillRect(left + 1, bottom, right, bottom, light);
+ GfxFillRect(left, top, left, bottom, dark);
+ GfxFillRect(left + WD_BEVEL_LEFT, top, right, top, dark);
+ GfxFillRect(right, top + WD_BEVEL_TOP, right, bottom - WD_BEVEL_BOTTOM, light);
+ GfxFillRect(left + WD_BEVEL_LEFT, bottom, right, bottom, light);
interior = (flags & FR_DARKENED ? medium_dark : medium_light);
} else {
- GfxFillRect(left, top, left, bottom - 1, light);
- GfxFillRect(left + 1, top, right - 1, top, light);
- GfxFillRect(right, top, right, bottom - 1, dark);
- GfxFillRect(left, bottom, right, bottom, dark);
+ GfxFillRect(left, top, left, bottom - WD_BEVEL_BOTTOM, light);
+ GfxFillRect(left + WD_BEVEL_LEFT, top, right - WD_BEVEL_RIGHT, top, light);
+ GfxFillRect(right, top, right, bottom - WD_BEVEL_BOTTOM, dark);
+ GfxFillRect(left, bottom, right, bottom, dark);
interior = medium_dark;
}
if (!(flags & FR_BORDERONLY)) {
- GfxFillRect(left + 1, top + 1, right - 1, bottom - 1, interior);
+ GfxFillRect(left + WD_BEVEL_LEFT, top + WD_BEVEL_TOP, right - WD_BEVEL_RIGHT, bottom - WD_BEVEL_BOTTOM, interior);
}
}
}