override fun paint()

in src/main/kotlin/com/jetbrains/rider/ezargs/ui/platformCustomization/CustomDarculaComboBoxUI.kt [82:114]


            override fun paint(g: Graphics) {
                val g2 = g.create() as Graphics2D
                try {
                    g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON)
                    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_NORMALIZE)
                    val r = getArrowButtonRect(this)
                    g2.translate(r.x, r.y)
                    val bw = DarculaUIUtil.BW.float
                    val lw = DarculaUIUtil.LW.float
                    var arc = DarculaUIUtil.COMPONENT_ARC.float
                    arc = if (arc > bw + lw) arc - bw - lw else 0.0f
                    val innerShape: Path2D = Path2D.Float()
                    innerShape.moveTo(lw.toDouble(), lw.toDouble())
                    innerShape.lineTo((r.width - lw - arc).toDouble(), lw.toDouble())
                    innerShape.quadTo((r.width - lw).toDouble(), lw.toDouble(), (r.width - lw).toDouble(), (lw + arc).toDouble())
                    innerShape.lineTo((r.width - lw).toDouble(), (r.height - lw - arc).toDouble())
                    innerShape.quadTo((r.width - lw).toDouble(), (r.height - lw).toDouble(), (r.width - lw - arc).toDouble(), (r.height - lw).toDouble())
                    innerShape.lineTo(lw.toDouble(), (r.height - lw).toDouble())
                    innerShape.closePath()
                    g2.color = comboBox.background // difference from idea
                    g2.fill(innerShape)

                    if (comboBox.isEditable || ClientProperty.isTrue(comboBox, PAINT_VERTICAL_LINE)) {
                        val parentColor = (parent as CmdlineComboBoxComponent).getClientProperty("CustomBorderColor") as? Color
                        g2.color = parentColor ?: DarculaUIUtil.getOutlineColor(comboBox.isEnabled, false)
                        g2.fill(Rectangle2D.Float(0f, lw, DarculaUIUtil.LW.float, r.height - lw * 2))
                    }
                    g2.translate(-r.x, -r.y + JBUI.scale(1))
                    paintArrow(g2, this)
                } finally {
                    g2.dispose()
                }
            }