|
|
|
@ -6,6 +6,7 @@ import com.formdev.flatlaf.ui.FlatStylingSupport.Styleable;
|
|
|
|
|
import com.formdev.flatlaf.ui.FlatToggleButtonUI; |
|
|
|
|
import com.formdev.flatlaf.ui.FlatUIUtils; |
|
|
|
|
import com.fr.design.gui.ibutton.UIButton; |
|
|
|
|
import org.jetbrains.annotations.NotNull; |
|
|
|
|
import org.jetbrains.annotations.Nullable; |
|
|
|
|
|
|
|
|
|
import javax.swing.AbstractButton; |
|
|
|
@ -156,6 +157,16 @@ public class FineToggleButtonUI extends FlatToggleButtonUI {
|
|
|
|
|
FlatUIUtils.paintComponentBackground(g2, 0, 0, c.getWidth(), c.getHeight(), focusWidth, 0); |
|
|
|
|
} else { |
|
|
|
|
float arc = FlatUIUtils.getBorderArc( c ) / 2; |
|
|
|
|
Shape path2D = getGroupButtonPath2D(c, position, arc); |
|
|
|
|
g2.fill(path2D); |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
g2.dispose(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@NotNull |
|
|
|
|
private static Shape getGroupButtonPath2D(JComponent c, int position, float arc) { |
|
|
|
|
Shape path2D; |
|
|
|
|
switch (position) { |
|
|
|
|
case GROUP_BUTTON_POSITION_LEFT: |
|
|
|
@ -179,11 +190,7 @@ public class FineToggleButtonUI extends FlatToggleButtonUI {
|
|
|
|
|
default: |
|
|
|
|
path2D = new Rectangle(); |
|
|
|
|
} |
|
|
|
|
g2.fill(path2D); |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
g2.dispose(); |
|
|
|
|
} |
|
|
|
|
return path2D; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|