This is an automated email from the ASF dual-hosted git repository.
mbien 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 e6f536bbd8 fix multitabs underline at top tab rendering.
new 2ad408e1f4 Merge pull request #6073 from
mbien/multitab-underline-rendering-fix
e6f536bbd8 is described below
commit e6f536bbd8a051ddb268a77f77032eb7ace1c41c
Author: Michael Bien <[email protected]>
AuthorDate: Wed Jun 14 00:33:43 2023 +0200
fix multitabs underline at top tab rendering.
this makes it look consitent to regular editor tabs
---
.../org/netbeans/core/multitabs/impl/TabDataRenderer.java | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git
a/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/TabDataRenderer.java
b/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/TabDataRenderer.java
index 1b36adf64b..c46db39eeb 100644
---
a/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/TabDataRenderer.java
+++
b/platform/core.multitabs/src/org/netbeans/core/multitabs/impl/TabDataRenderer.java
@@ -59,6 +59,7 @@ public class TabDataRenderer implements TableCellRenderer {
private static final Color inactiveUnderlineColor =
UIManager.getColor("nb.multitabs.inactiveUnderlineColor"); // NOI18N
private static final Color activeBackground =
UIManager.getColor("nb.multitabs.activeBackground"); // NOI18N
private static final Color hoverBackground =
UIManager.getColor("nb.multitabs.hoverBackground"); // NOI18N
+ private static final boolean underlineAtTop =
UIManager.getBoolean("EditorTab.underlineAtTop");
private final RendererPanel renderer = new RendererPanel();
private final List<TabDecorator> decorators = getDecorators();
@@ -238,10 +239,18 @@ public class TabDataRenderer implements TableCellRenderer
{
switch (tabsLocation) {
default:
case JTabbedPane.TOP:
- g.fillRect(0, rect.height - underlineHeight,
rect.width, underlineHeight);
+ if (underlineAtTop) {
+ g.fillRect(0, 0, rect.width, underlineHeight);
+ } else {
+ g.fillRect(0, rect.height - underlineHeight,
rect.width, underlineHeight);
+ }
break;
case JTabbedPane.BOTTOM:
- g.fillRect(0, 0, rect.width, underlineHeight);
+ if (underlineAtTop) {
+ g.fillRect(0, rect.height - underlineHeight,
rect.width, underlineHeight);
+ } else {
+ g.fillRect(0, 0, rect.width, underlineHeight);
+ }
break;
case JTabbedPane.LEFT:
g.fillRect(rect.width - underlineHeight, 0,
underlineHeight, 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