Replace double with CGFloat

To avoid warnings on conflicting return type of `borderWidth` and `cornerRadius` in some circumstances.