mirror of https://github.com/OpenTTD/OpenTTD
Change: Draw info headers as shade of window colour instead of pixel colour. (#14123)
Use the normal or lightest colour gradient to pick a suitable colour, instead of an arbitrary pixel colour. (Except for the NewGRF window's info panel, this happens to be the same colour.)vehicle-details-tooltip
parent
55fad9c78a
commit
b87ce9c845
|
@ -535,8 +535,8 @@ public:
|
|||
Rect tr = r.Shrink(WidgetDimensions::scaled.frametext);
|
||||
tr.top += HEADER_HEIGHT;
|
||||
|
||||
/* Create the nice grayish rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(HEADER_HEIGHT).Shrink(WidgetDimensions::scaled.bevel.left, WidgetDimensions::scaled.bevel.top, WidgetDimensions::scaled.bevel.right, 0), PC_GREY);
|
||||
/* Create the nice lighter rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(HEADER_HEIGHT).Shrink(WidgetDimensions::scaled.bevel.left, WidgetDimensions::scaled.bevel.top, WidgetDimensions::scaled.bevel.right, 0), GetColourGradient(COLOUR_GREY, SHADE_LIGHTEST));
|
||||
DrawString(hr.left, hr.right, hr.top, STR_SAVELOAD_DETAIL_CAPTION, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
|
||||
if (this->selected == nullptr) return;
|
||||
|
|
|
@ -687,8 +687,8 @@ public:
|
|||
Rect tr = r.Shrink(WidgetDimensions::scaled.frametext);
|
||||
tr.top += HEADER_HEIGHT;
|
||||
|
||||
/* Create the nice grayish rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(HEADER_HEIGHT).Shrink(WidgetDimensions::scaled.bevel.left, WidgetDimensions::scaled.bevel.top, WidgetDimensions::scaled.bevel.right, 0), PC_DARK_BLUE);
|
||||
/* Create the nice darker rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(HEADER_HEIGHT).Shrink(WidgetDimensions::scaled.bevel.left, WidgetDimensions::scaled.bevel.top, WidgetDimensions::scaled.bevel.right, 0), GetColourGradient(COLOUR_LIGHT_BLUE, SHADE_NORMAL));
|
||||
DrawString(hr.left, hr.right, hr.top, STR_CONTENT_DETAIL_TITLE, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
|
||||
/* Draw the total download size */
|
||||
|
|
|
@ -623,8 +623,8 @@ public:
|
|||
tr.top += header_height;
|
||||
|
||||
/* Draw the right menu */
|
||||
/* Create the nice grayish rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(header_height).Shrink(WidgetDimensions::scaled.bevel), PC_DARK_BLUE);
|
||||
/* Create the nice darker rectangle at the details top */
|
||||
GfxFillRect(r.WithHeight(header_height).Shrink(WidgetDimensions::scaled.bevel), GetColourGradient(COLOUR_LIGHT_BLUE, SHADE_NORMAL));
|
||||
hr.top = DrawStringMultiLine(hr, header_msg, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
if (sel == nullptr) return;
|
||||
|
||||
|
|
|
@ -906,8 +906,8 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
|||
}
|
||||
|
||||
case WID_NS_NEWGRF_INFO_TITLE: {
|
||||
/* Create the nice grayish rectangle at the details top. */
|
||||
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), PC_DARK_BLUE);
|
||||
/* Create the nice darker rectangle at the details top. */
|
||||
GfxFillRect(r.Shrink(WidgetDimensions::scaled.bevel), GetColourGradient(COLOUR_MAUVE, SHADE_NORMAL));
|
||||
DrawString(r.left, r.right, CentreBounds(r.top, r.bottom, GetCharacterHeight(FS_NORMAL)), STR_NEWGRF_SETTINGS_INFO_TITLE, TC_FROMSTRING, SA_HOR_CENTER);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue