@@ -78,19 +78,21 @@ void Window::draw(NVGcontext *ctx) {
78
78
79
79
80
80
/* Draw a drop shadow */
81
- NVGpaint shadowPaint = nvgBoxGradient (
82
- ctx, mPos .x (), mPos .y (), mSize .x (), mSize .y (), cr*2 , ds*2 ,
83
- mTheme ->mDropShadow , mTheme ->mTransparent );
81
+ if (ds > 0 ) {
82
+ NVGpaint shadowPaint = nvgBoxGradient (
83
+ ctx, mPos .x (), mPos .y (), mSize .x (), mSize .y (), cr*2 , ds*2 ,
84
+ mTheme ->mDropShadow , mTheme ->mTransparent );
84
85
85
- nvgSave (ctx);
86
- nvgResetScissor (ctx);
87
- nvgBeginPath (ctx);
88
- nvgRect (ctx, mPos .x ()-ds,mPos .y ()-ds, mSize .x ()+2 *ds, mSize .y ()+2 *ds);
89
- nvgRoundedRect (ctx, mPos .x (), mPos .y (), mSize .x (), mSize .y (), cr);
90
- nvgPathWinding (ctx, NVG_HOLE);
91
- nvgFillPaint (ctx, shadowPaint);
92
- nvgFill (ctx);
93
- nvgRestore (ctx);
86
+ nvgSave (ctx);
87
+ nvgResetScissor (ctx);
88
+ nvgBeginPath (ctx);
89
+ nvgRect (ctx, mPos .x ()-ds,mPos .y ()-ds, mSize .x ()+2 *ds, mSize .y ()+2 *ds);
90
+ nvgRoundedRect (ctx, mPos .x (), mPos .y (), mSize .x (), mSize .y (), cr);
91
+ nvgPathWinding (ctx, NVG_HOLE);
92
+ nvgFillPaint (ctx, shadowPaint);
93
+ nvgFill (ctx);
94
+ nvgRestore (ctx);
95
+ }
94
96
95
97
if (!mTitle .empty ()) {
96
98
/* Draw header */
0 commit comments