mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-25 09:40:10 +00:00
8191041: Questionable Rendering of Disabled Text in Swing GTK L&F
Reviewed-by: prr, ssadetsky
This commit is contained in:
parent
8934efd172
commit
e0aaa2c8ae
@ -47,34 +47,17 @@ class GTKGraphicsUtils extends SynthGraphicsUtils {
|
||||
return;
|
||||
}
|
||||
int componentState = context.getComponentState();
|
||||
if ((componentState & SynthConstants.DISABLED) ==
|
||||
SynthConstants.DISABLED){
|
||||
if (!GTKLookAndFeel.is3()) {
|
||||
Color orgColor = g.getColor();
|
||||
g.setColor(context.getStyle().getColor(context,
|
||||
GTKColorType.WHITE));
|
||||
x += 1;
|
||||
y += 1;
|
||||
super.paintText(context, g, text, x, y, mnemonicIndex);
|
||||
|
||||
g.setColor(orgColor);
|
||||
x -= 1;
|
||||
y -= 1;
|
||||
}
|
||||
super.paintText(context, g, text, x, y, mnemonicIndex);
|
||||
String themeName = GTKLookAndFeel.getGtkThemeName();
|
||||
if (themeName != null && themeName.startsWith("blueprint") &&
|
||||
shouldShadowText(context.getRegion(), componentState)) {
|
||||
|
||||
g.setColor(Color.BLACK);
|
||||
super.paintText(context, g, text, x+1, y+1, mnemonicIndex);
|
||||
g.setColor(Color.WHITE);
|
||||
}
|
||||
else {
|
||||
String themeName = GTKLookAndFeel.getGtkThemeName();
|
||||
if (themeName != null && themeName.startsWith("blueprint") &&
|
||||
shouldShadowText(context.getRegion(), componentState)) {
|
||||
|
||||
g.setColor(Color.BLACK);
|
||||
super.paintText(context, g, text, x+1, y+1, mnemonicIndex);
|
||||
g.setColor(Color.WHITE);
|
||||
}
|
||||
|
||||
super.paintText(context, g, text, x, y, mnemonicIndex);
|
||||
}
|
||||
super.paintText(context, g, text, x, y, mnemonicIndex);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user