This is an automated email from the ASF dual-hosted git repository.
skygo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/netbeans.git
The following commit(s) were added to refs/heads/master by this push:
new bdae36f [NETBEANS-3787] FlatLaf: fixed active tab painting if project
tab colors enabled
new 4d31fa0 Merge pull request #2048 from
DevCharly/flatlaf-project-color-tab-fix
bdae36f is described below
commit bdae36f85b3f69c494cfcd860b0e402b32d2d32c
Author: Karl Tauber <[email protected]>
AuthorDate: Thu Mar 26 23:44:11 2020 +0100
[NETBEANS-3787] FlatLaf: fixed active tab painting if project tab colors
enabled
---
.../core/multitabs/impl/ProjectColorTabDecorator.java | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git
a/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ProjectColorTabDecorator.java
b/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ProjectColorTabDecorator.java
index 28e8a04..06d2711 100644
---
a/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ProjectColorTabDecorator.java
+++
b/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/ProjectColorTabDecorator.java
@@ -161,8 +161,16 @@ public class ProjectColorTabDecorator extends TabDecorator
{
}
g.setColor( c );
Rectangle rect = new Rectangle( tabRect );
- rect.y += rect.height - 3;
- rect.grow( -1, -1 );
+ int underlineHeight =
UIManager.getInt("nb.multitabs.underlineHeight"); // NOI18N
+ if( underlineHeight > 0 ) {
+ // if the selected tab is highlighted with an "underline" (e.g. in
FlatLaf)
+ // then paint the project color bar at the top of the tab
+ rect.height = underlineHeight;
+ } else {
+ // bottom project color bar
+ rect.y += rect.height - 3;
+ rect.grow( -1, -1 );
+ }
g.fillRect( rect.x, rect.y, rect.width, rect.height );
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists