summaryrefslogtreecommitdiff
path: root/src/ui/widget.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-09 08:25:12 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-09 08:25:12 +0200
commit5a1b9c16d4c45b9ae40c107bd2592415b48ded58 (patch)
tree8cdb55694564eab57602573eed8a2dcc1598d3f0 /src/ui/widget.c
parent1dc86d6ee3f083f1b2b842d9621ae99dc49d87e7 (diff)
Widget: Border shadow appearance
Diffstat (limited to 'src/ui/widget.c')
-rw-r--r--src/ui/widget.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/widget.c b/src/ui/widget.c
index 2d964445..d7543615 100644
--- a/src/ui/widget.c
+++ b/src/ui/widget.c
@@ -703,10 +703,11 @@ void drawBackground_Widget(const iWidget *d) {
703 iPaint p; 703 iPaint p;
704 init_Paint(&p); 704 init_Paint(&p);
705 const iBool isLight = isLight_ColorTheme(colorTheme_App()); 705 const iBool isLight = isLight_ColorTheme(colorTheme_App());
706 p.alpha = isLight ? 0x40 : 0x20; 706 p.alpha = isLight ? 0xc : 0x20;
707 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_BLEND); 707 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_BLEND);
708 iRect shadowRect = expanded_Rect(bounds_Widget(d), mulf_I2(gap2_UI, 1)); 708 iRect shadowRect = expanded_Rect(bounds_Widget(d), mulf_I2(gap2_UI, 1));
709 fillRect_Paint(&p, shadowRect, isLight ? white_ColorId : black_ColorId); 709 shadowRect.pos.y += gap_UI / 4;
710 fillRect_Paint(&p, shadowRect, /*isLight ? white_ColorId :*/ black_ColorId);
710 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_NONE); 711 SDL_SetRenderDrawBlendMode(renderer_Window(get_Window()), SDL_BLENDMODE_NONE);
711 } 712 }
712 if (fadeBackground) { 713 if (fadeBackground) {