ProgressBar: fixed right-to-left painting

This commit is contained in:
Karl Tauber
2019-08-26 18:43:55 +02:00
parent d2a2548420
commit bf0e16b8d6

View File

@@ -93,7 +93,8 @@ public class FlatProgressBarUI
g.setColor( progressBar.getForeground() );
((Graphics2D)g).fill( horizontal
? new RoundRectangle2D.Float( x, y, amountFull, height, arc, arc )
? new RoundRectangle2D.Float( c.getComponentOrientation().isLeftToRight() ? x : x + (width - amountFull),
y, amountFull, height, arc, arc )
: new RoundRectangle2D.Float( x, y + (height - amountFull), width, amountFull, arc, arc ) );
if( progressBar.isStringPainted() )