MCPcopy Create free account
hub / github.com/benfry/processing4 / updateTheme

Method updateTheme

app/src/processing/app/ui/EditorStatus.java:254–294  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252
253
254 protected void updateTheme() {
255 urlEnabledAlpha = 255 * Theme.getInteger("status.url.enabled.alpha") / 100;
256 urlRolloverAlpha = 255 * Theme.getInteger("status.url.rollover.alpha") / 100;
257 urlPressedAlpha = 255 * Theme.getInteger("status.url.pressed.alpha") / 100;
258
259 String[] stateColors = new String[] {
260 Theme.get("status.notice.fgcolor"),
261 Theme.get("status.error.fgcolor"),
262 Theme.get("status.error.fgcolor"),
263 Theme.get("status.warning.fgcolor"),
264 Theme.get("status.warning.fgcolor")
265 };
266
267 clipboardIcon = renderIcons("status/copy-to-clipboard", stateColors);
268 searchIcon = renderIcons("status/search", stateColors);
269 collapseIcon = renderIcons("status/console-collapse", stateColors);
270 expandIcon = renderIcons("status/console-expand", stateColors);
271
272 btnEnabledAlpha = Theme.getInteger("status.button.enabled.alpha") / 100f;
273 btnRolloverAlpha = Theme.getInteger("status.button.rollover.alpha") / 100f;
274 btnPressedAlpha = Theme.getInteger("status.button.pressed.alpha") / 100f;
275
276 fgColor = new Color[] {
277 Theme.getColor("status.notice.fgcolor"),
278 Theme.getColor("status.error.fgcolor"),
279 Theme.getColor("status.error.fgcolor"),
280 Theme.getColor("status.warning.fgcolor"),
281 Theme.getColor("status.warning.fgcolor")
282 };
283
284 bgColor = new Color[] {
285 Theme.getColor("status.notice.bgcolor"),
286 Theme.getColor("status.error.bgcolor"),
287 Theme.getColor("status.error.bgcolor"),
288 Theme.getColor("status.warning.bgcolor"),
289 Theme.getColor("status.warning.bgcolor")
290 };
291
292 font = Theme.getFont("status.font");
293 metrics = null;
294 }
295
296
297 static private ImageIcon[] renderIcons(String path, String[] hexColors) {

Callers 1

EditorStatusMethod · 0.95

Calls 5

getIntegerMethod · 0.95
getMethod · 0.95
renderIconsMethod · 0.95
getColorMethod · 0.95
getFontMethod · 0.95

Tested by

no test coverage detected