Closed markiewb closed 8 years ago
@markiewb, @ZMichaelChow let me try.
That would be cool! Thanks!
Well; after some digging in NetBeans sources I can see that a hardcoded color is used:
package org.netbeans.swing.tabcontrol.plaf;
abstract class AbstractWinViewTabDisplayerUI {
@Override
protected void paintTabContent(Graphics g, int index, String text, int x,
int y, int width, int height) {
...
if( isUseStretchingTabs() ) {
ColorUtil.paintVistaTabDragTexture(getDisplayer(), g, x + BUMP_X_PAD, y
+ BUMP_Y_PAD_UPPER, height - (BUMP_Y_PAD_UPPER
+ BUMP_Y_PAD_BOTTOM));
}
...
}
}
final class ColorUtil {
...
/**
* Draws drag texture of the tab in specified bounds.
*/
public static void paintVistaTabDragTexture(Component control, Graphics g,
int x, int y, int height) {
if (VISTA_DRAG_IMAGE == null) {
VISTA_DRAG_IMAGE = initVistaDragTextureImage();
}
int count = height / 4;
int ypos = y;
606: g.setColor( Color.WHITE ); // <<<<<--- How to hack this ?
for (int i = 0; i < count; i++) {
VISTA_DRAG_IMAGE.paintIcon(control, g, x, ypos);
g.drawLine( x+1, ypos+2, x+2, ypos+2 );
g.drawLine( x+2, ypos+1, x+2, ypos+1 );
ypos += 4;
}
}
...
}
So if we keep using stretched tabs I dont see a way of changing the hardcoded white color in ColorUtil:606. But If we drop using stretched tabs (which is default since NB 8.0 I think) dotted icon not painted:
Personally I think stretched tabs are better and current icon is not that bad. What say you ?
IMO the non-streched variant looks OK for me.
Provide an option and let the user decide. It would be a waste of your invested free-time, if there is no output.
Non-streched variant is better for me because there are not minimaze button on tab. I have problem with order of close, minimaze buttons. I think order minimaze before close makes more sense
.
Non-streched tabs is better for me, too. I always make the tabs non-streched :) I agree with @markiewb. If possible(and convenient), provide an option in "Tools->Options" and let the user decide.
OK! now user can opt to use stretched tabs or not. Tabs are not stretched by default:
Thanks everybody for opinions.
Thank you too!
Well done! Thank you so much~
See also the latest screenshots from @ZMichaelChow at https://github.com/Revivius/nb-darcula/issues/20 He compared several other LAFs and also the Darcula LAF from IDEA