mirror of
https://github.com/JFormDesigner/FlatLaf.git
synced 2025-12-08 15:00:54 +03:00
TabbedPane: do not clip title on left tabs when scrolled
This commit is contained in:
@@ -188,7 +188,6 @@ public class FlatTabbedPaneUI
|
|||||||
} else
|
} else
|
||||||
super.installDefaults();
|
super.installDefaults();
|
||||||
|
|
||||||
|
|
||||||
disabledForeground = UIManager.getColor( "TabbedPane.disabledForeground" );
|
disabledForeground = UIManager.getColor( "TabbedPane.disabledForeground" );
|
||||||
selectedBackground = UIManager.getColor( "TabbedPane.selectedBackground" );
|
selectedBackground = UIManager.getColor( "TabbedPane.selectedBackground" );
|
||||||
selectedForeground = UIManager.getColor( "TabbedPane.selectedForeground" );
|
selectedForeground = UIManager.getColor( "TabbedPane.selectedForeground" );
|
||||||
@@ -508,7 +507,8 @@ public class FlatTabbedPaneUI
|
|||||||
viewRect.width -= 4; // subtract width of cropped edge
|
viewRect.width -= 4; // subtract width of cropped edge
|
||||||
if( !viewRect.contains( textRect ) ) {
|
if( !viewRect.contains( textRect ) ) {
|
||||||
Rectangle r = viewRect.intersection( textRect );
|
Rectangle r = viewRect.intersection( textRect );
|
||||||
title = JavaCompatibility.getClippedString( null, metrics, title, r.width );
|
if( r.x > viewRect.x )
|
||||||
|
title = JavaCompatibility.getClippedString( null, metrics, title, r.width );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user