src/widget.cpp
changeset 9607 5a5728fb702a
parent 9273 35e0224ea8f1
child 9770 8c260fb382f8
equal deleted inserted replaced
9606:59d9cc5391f2 9607:5a5728fb702a
   160 	uint medium_dark  = _colour_gradient[ctab][5];
   160 	uint medium_dark  = _colour_gradient[ctab][5];
   161 	uint medium_light = _colour_gradient[ctab][6];
   161 	uint medium_light = _colour_gradient[ctab][6];
   162 	uint light        = _colour_gradient[ctab][7];
   162 	uint light        = _colour_gradient[ctab][7];
   163 
   163 
   164 	if (flags & FR_TRANSPARENT) {
   164 	if (flags & FR_TRANSPARENT) {
   165 		GfxFillRect(left, top, right, bottom, PALETTE_TO_TRANSPARENT | (1 << USE_COLORTABLE));
   165 		GfxFillRect(left, top, right, bottom, PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOR);
   166 	} else {
   166 	} else {
   167 		uint interior;
   167 		uint interior;
   168 
   168 
   169 		if (flags & FR_LOWERED) {
   169 		if (flags & FR_LOWERED) {
   170 			GfxFillRect(left,     top,     left,  bottom,     dark);
   170 			GfxFillRect(left,     top,     left,  bottom,     dark);
   315 			int c1 = _colour_gradient[wi->color & 0xF][3];
   315 			int c1 = _colour_gradient[wi->color & 0xF][3];
   316 			int c2 = _colour_gradient[wi->color & 0xF][7];
   316 			int c2 = _colour_gradient[wi->color & 0xF][7];
   317 
   317 
   318 			/* draw "shaded" background */
   318 			/* draw "shaded" background */
   319 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
   319 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
   320 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c1 | (1 << PALETTE_MODIFIER_GREYOUT));
   320 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c1, FILLRECT_CHECKER);
   321 
   321 
   322 			/* draw shaded lines */
   322 			/* draw shaded lines */
   323 			GfxFillRect(r.left + 2, r.top + 10, r.left + 2, r.bottom - 10, c1);
   323 			GfxFillRect(r.left + 2, r.top + 10, r.left + 2, r.bottom - 10, c1);
   324 			GfxFillRect(r.left + 3, r.top + 10, r.left + 3, r.bottom - 10, c2);
   324 			GfxFillRect(r.left + 3, r.top + 10, r.left + 3, r.bottom - 10, c2);
   325 			GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
   325 			GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
   346 			int c1 = _colour_gradient[wi->color & 0xF][3];
   346 			int c1 = _colour_gradient[wi->color & 0xF][3];
   347 			int c2 = _colour_gradient[wi->color & 0xF][7];
   347 			int c2 = _colour_gradient[wi->color & 0xF][7];
   348 
   348 
   349 			/* draw "shaded" background */
   349 			/* draw "shaded" background */
   350 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
   350 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c2);
   351 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c1 | (1 << PALETTE_MODIFIER_GREYOUT));
   351 			GfxFillRect(r.left, r.top + 10, r.right, r.bottom - 10, c1, FILLRECT_CHECKER);
   352 
   352 
   353 			/* draw shaded lines */
   353 			/* draw shaded lines */
   354 			GfxFillRect(r.left + 2, r.top + 10, r.left + 2, r.bottom - 10, c1);
   354 			GfxFillRect(r.left + 2, r.top + 10, r.left + 2, r.bottom - 10, c1);
   355 			GfxFillRect(r.left + 3, r.top + 10, r.left + 3, r.bottom - 10, c2);
   355 			GfxFillRect(r.left + 3, r.top + 10, r.left + 3, r.bottom - 10, c2);
   356 			GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
   356 			GfxFillRect(r.left + 7, r.top + 10, r.left + 7, r.bottom - 10, c1);
   377 			int c1 = _colour_gradient[wi->color & 0xF][3];
   377 			int c1 = _colour_gradient[wi->color & 0xF][3];
   378 			int c2 = _colour_gradient[wi->color & 0xF][7];
   378 			int c2 = _colour_gradient[wi->color & 0xF][7];
   379 
   379 
   380 			/* draw "shaded" background */
   380 			/* draw "shaded" background */
   381 			GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c2);
   381 			GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c2);
   382 			GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c1 | (1 << PALETTE_MODIFIER_GREYOUT));
   382 			GfxFillRect(r.left + 10, r.top, r.right - 10, r.bottom, c1, FILLRECT_CHECKER);
   383 
   383 
   384 			/* draw shaded lines */
   384 			/* draw shaded lines */
   385 			GfxFillRect(r.left + 10, r.top + 2, r.right - 10, r.top + 2, c1);
   385 			GfxFillRect(r.left + 10, r.top + 2, r.right - 10, r.top + 2, c1);
   386 			GfxFillRect(r.left + 10, r.top + 3, r.right - 10, r.top + 3, c2);
   386 			GfxFillRect(r.left + 10, r.top + 3, r.right - 10, r.top + 3, c2);
   387 			GfxFillRect(r.left + 10, r.top + 7, r.right - 10, r.top + 7, c1);
   387 			GfxFillRect(r.left + 10, r.top + 7, r.right - 10, r.top + 7, c1);
   488 			break;
   488 			break;
   489 		}
   489 		}
   490 		}
   490 		}
   491 
   491 
   492 		if (this->IsWidgetDisabled(i)) {
   492 		if (this->IsWidgetDisabled(i)) {
   493 			GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, _colour_gradient[wi->color & 0xF][2] | (1 << PALETTE_MODIFIER_GREYOUT));
   493 			GfxFillRect(r.left + 1, r.top + 1, r.right - 1, r.bottom - 1, _colour_gradient[wi->color & 0xF][2], FILLRECT_CHECKER);
   494 		}
   494 		}
   495 	}
   495 	}
   496 
   496 
   497 
   497 
   498 	if (this->flags4 & WF_WHITE_BORDER_MASK) {
   498 	if (this->flags4 & WF_WHITE_BORDER_MASK) {