Search in sources :

Example 1 with TableLayout

use of com.intellij.ui.tabs.impl.table.TableLayout in project intellij-community by JetBrains.

the class JBEditorTabs method doPaintInactive.

@Override
protected void doPaintInactive(Graphics2D g2d, boolean leftGhostExists, TabLabel label, Rectangle effectiveBounds, boolean rightGhostExists, int row, int column) {
    Insets insets = getTabsBorder().getEffectiveBorder();
    int _x = effectiveBounds.x + insets.left;
    int _y = effectiveBounds.y + insets.top;
    int _width = effectiveBounds.width - insets.left - insets.right + (getTabsPosition() == JBTabsPosition.right ? 1 : 0);
    int _height = effectiveBounds.height - insets.top - insets.bottom;
    if ((!isSingleRow()) || (isSingleRow() && isHorizontalTabs())) {
        if (isSingleRow() && getPosition() == JBTabsPosition.bottom) {
            _y += getActiveTabUnderlineHeight();
        } else {
            if (isSingleRow()) {
                _height -= getActiveTabUnderlineHeight();
            } else {
                TabInfo info = label.getInfo();
                if (((TableLayout) getEffectiveLayout()).isLastRow(info)) {
                    _height -= getActiveTabUnderlineHeight();
                }
            }
        }
    }
    final boolean vertical = getTabsPosition() == JBTabsPosition.left || getTabsPosition() == JBTabsPosition.right;
    final Color tabColor = label.getInfo().getTabColor();
    final Composite oldComposite = g2d.getComposite();
    //if (label != getSelectedLabel()) {
    //  g2d.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.9f));
    //}
    getPainter().doPaintInactive(g2d, effectiveBounds, _x, _y, _width, _height, tabColor, row, column, vertical);
//g2d.setComposite(oldComposite);
}
Also used : TabInfo(com.intellij.ui.tabs.TabInfo) TableLayout(com.intellij.ui.tabs.impl.table.TableLayout)

Aggregations

TabInfo (com.intellij.ui.tabs.TabInfo)1 TableLayout (com.intellij.ui.tabs.impl.table.TableLayout)1