Source/WebCore/platform/wpe/ThemeWPE.cpp
@
@
void ThemeWPE::paint(ControlPart part, ControlStates& states, GraphicsContext& c
67
67
paintRadio(states, context, zoomedRect, zoomFactor);
68
68
break;
69
69
case PushButtonPart:
70
paintButton(states, context, zoomedRect, zoomFactor);
70
case DefaultButtonPart:
71
case ButtonPart:
72
case SquareButtonPart:
73
paintButton(part, states, context, zoomedRect, zoomFactor);
71
74
break;
72
75
default:
73
76
break;
@
@
void ThemeWPE::paintRadio(ControlStates& states, GraphicsContext& context, const
129
132
}
130
133
}
131
134
132
void ThemeWPE::paintButton(ControlStates& states, GraphicsContext& context, const FloatRect& zoomedRect, float)
135
void ThemeWPE::paintButton(
ControlPart part,
ControlStates& states, GraphicsContext& context, const FloatRect& zoomedRect, float)
133
136
{
134
137
GraphicsContextStateSaver stateSaver(context);
135
138
136
FloatSize corner(2, 2);
139
float roundness = 2;
140
141
if (part == SquareButtonPart)
142
roundness = 0;
143
144
FloatSize corner(roundness, roundness);
137
145
FloatRoundedRect roundedRect(zoomedRect, corner, corner, corner, corner);
138
146
Path path;
139
147
path.addRoundedRect(roundedRect);
Source/WebCore/platform/wpe/ThemeWPE.h
@
@
private:
37
37
38
38
void paintCheckbox(ControlStates&, GraphicsContext&, const FloatRect&, float);
39
39
void paintRadio(ControlStates&, GraphicsContext&, const FloatRect&, float);
40
void paintButton(ControlStates&, GraphicsContext&, const FloatRect&, float);
40
void paintButton(
ControlPart,
ControlStates&, GraphicsContext&, const FloatRect&, float);
41
41
};
42
42
43
43
} // namespace WebCore