private void onPaint(PaintEvent e) { if (hoverState == STATE_NORMAL) return; GC gc = e.gc; Rectangle carea = getClientArea(); gc.setBackground(getHoverBackground()); int savedAntialias = gc.getAntialias(); FormUtil.setAntialias(gc, SWT.ON); gc.fillRoundRectangle(carea.x + HMARGIN, carea.y + 2, carea.width - HMARGIN * 2, carea.height - 4, ARC_WIDTH, ARC_HEIGHT); FormUtil.setAntialias(gc, savedAntialias); }
private void onPaint(PaintEvent e) { if (hoverState == STATE_NORMAL) return; GC gc = e.gc; Rectangle carea = getClientArea(); gc.setBackground(getHoverBackground()); int savedAntialias = gc.getAntialias(); FormUtil.setAntialias(gc, SWT.ON); gc.fillRoundRectangle(carea.x + HMARGIN, carea.y + 2, carea.width - HMARGIN * 2, carea.height - 4, ARC_WIDTH, ARC_HEIGHT); FormUtil.setAntialias(gc, savedAntialias); }
public void setHoverState(int state) { if (dragSource == null || this.hoverState == state) return; this.hoverState = state; Color color = getHoverBackground(); titleLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (busyLabel != null) busyLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (menuHyperlink != null) menuHyperlink.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); redraw(); }
public void setHoverState(int state) { if (dragSource == null || this.hoverState == state) return; this.hoverState = state; Color color = getHoverBackground(); titleLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (busyLabel != null) busyLabel.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); if (menuHyperlink != null) menuHyperlink.setBackground(color != null ? color : getColor(FormHeading.COLOR_BASE_BG)); redraw(); }