src/java.desktop/share/classes/com/sun/java/swing/plaf/gtk/GTKGraphicsUtils.java
changeset 47834 d4ed3b8d166c
parent 47216 71c04702a3d5
equal deleted inserted replaced
47833:845872abef55 47834:d4ed3b8d166c
    45             // Metacity handles painting of text on internal frame title,
    45             // Metacity handles painting of text on internal frame title,
    46             // ignore this.
    46             // ignore this.
    47             return;
    47             return;
    48         }
    48         }
    49         int componentState = context.getComponentState();
    49         int componentState = context.getComponentState();
    50         if ((componentState & SynthConstants.DISABLED) ==
       
    51                               SynthConstants.DISABLED){
       
    52             if (!GTKLookAndFeel.is3()) {
       
    53                 Color orgColor = g.getColor();
       
    54                 g.setColor(context.getStyle().getColor(context,
       
    55                         GTKColorType.WHITE));
       
    56                 x += 1;
       
    57                 y += 1;
       
    58                 super.paintText(context, g, text, x, y, mnemonicIndex);
       
    59 
    50 
    60                 g.setColor(orgColor);
    51         String themeName = GTKLookAndFeel.getGtkThemeName();
    61                 x -= 1;
    52         if (themeName != null && themeName.startsWith("blueprint") &&
    62                 y -= 1;
    53             shouldShadowText(context.getRegion(), componentState)) {
    63             }
    54 
    64             super.paintText(context, g, text, x, y, mnemonicIndex);
    55             g.setColor(Color.BLACK);
       
    56             super.paintText(context, g, text, x+1, y+1, mnemonicIndex);
       
    57             g.setColor(Color.WHITE);
    65         }
    58         }
    66         else {
       
    67             String themeName = GTKLookAndFeel.getGtkThemeName();
       
    68             if (themeName != null && themeName.startsWith("blueprint") &&
       
    69                 shouldShadowText(context.getRegion(), componentState)) {
       
    70 
    59 
    71                 g.setColor(Color.BLACK);
    60         super.paintText(context, g, text, x, y, mnemonicIndex);
    72                 super.paintText(context, g, text, x+1, y+1, mnemonicIndex);
       
    73                 g.setColor(Color.WHITE);
       
    74             }
       
    75 
       
    76             super.paintText(context, g, text, x, y, mnemonicIndex);
       
    77         }
       
    78     }
    61     }
    79 
    62 
    80     /**
    63     /**
    81      * Paints text at the specified location. This will not attempt to
    64      * Paints text at the specified location. This will not attempt to
    82      * render the text as html nor will it offset by the insets of the
    65      * render the text as html nor will it offset by the insets of the