(svn r18103) -Codechange: Base content window detail title height on font height.

This commit is contained in:
peter1138
2009-11-15 18:39:22 +00:00
parent ce6e15ee11
commit cfcd6c13f3

View File

@@ -476,11 +476,13 @@ public:
*/ */
void DrawDetails(const Rect &r) const void DrawDetails(const Rect &r) const
{ {
static const int DETAIL_TITLE_HEIGHT = 50; ///< Number of pixels for the title
static const int DETAIL_LEFT = 5; ///< Number of pixels at the left static const int DETAIL_LEFT = 5; ///< Number of pixels at the left
static const int DETAIL_RIGHT = 5; ///< Number of pixels at the right static const int DETAIL_RIGHT = 5; ///< Number of pixels at the right
static const int DETAIL_TOP = 5; ///< Number of pixels at the top static const int DETAIL_TOP = 5; ///< Number of pixels at the top
/* Height for the title banner */
int DETAIL_TITLE_HEIGHT = 5 * FONT_HEIGHT_NORMAL;
/* Create the nice grayish rectangle at the details top */ /* Create the nice grayish rectangle at the details top */
GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.top + DETAIL_TITLE_HEIGHT, 157); GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.top + DETAIL_TITLE_HEIGHT, 157);
DrawString(r.left + WD_INSET_LEFT, r.right - WD_INSET_RIGHT, r.top + FONT_HEIGHT_NORMAL + WD_INSET_TOP, STR_CONTENT_DETAIL_TITLE, TC_FROMSTRING, SA_CENTER); DrawString(r.left + WD_INSET_LEFT, r.right - WD_INSET_RIGHT, r.top + FONT_HEIGHT_NORMAL + WD_INSET_TOP, STR_CONTENT_DETAIL_TITLE, TC_FROMSTRING, SA_CENTER);