Giter Site home page Giter Site logo

Comments (9)

Revivius avatar Revivius commented on July 29, 2024

@markiewb, @ZMichaelChow let me try.

from nb-darcula.

markiewb avatar markiewb commented on July 29, 2024

That would be cool! Thanks!

from nb-darcula.

Revivius avatar Revivius commented on July 29, 2024

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:

non_stretched_tabs

Personally I think stretched tabs are better and current icon is not that bad. What say you ?

from nb-darcula.

markiewb avatar markiewb commented on July 29, 2024

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.

from nb-darcula.

Saljack avatar Saljack commented on July 29, 2024

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
minimazebutton

minimazebutton
.

from nb-darcula.

mizhoux avatar mizhoux commented on July 29, 2024

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.

from nb-darcula.

Revivius avatar Revivius commented on July 29, 2024

OK! now user can opt to use stretched tabs or not. Tabs are not stretched by default:

stretched_tabs

Thanks everybody for opinions.

from nb-darcula.

markiewb avatar markiewb commented on July 29, 2024

Thank you too!

from nb-darcula.

mizhoux avatar mizhoux commented on July 29, 2024

Well done! Thank you so much~

from nb-darcula.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.