Unfortunately right now it is done via a trick. I cannot do rounded corners and gradient together. Right now it is implemented in a way that I draw top part with rounded corners without gradient, middle part with gradient and bottom part with rounded corners without gradient. Making those non-gradient sections bigger will make this trick more apparent.