void GetLocationOnScreen(out Screen screen, out int x, out int y) { Rectangle area; Orientation orientation; status_icon.GetGeometry(out screen, out area, out orientation); x = area.X + area.Width / 2; y = area.Y + area.Height - 5; }
public void AttachToStatusIcon(StatusIcon status_icon) { Screen screen; Rectangle rect; Orientation orientation; int x, y; if (!status_icon.GetGeometry(out screen, out rect, out orientation)) { return; } x = rect.X + rect.Width / 2; y = rect.Y + rect.Height / 2; SetGeometryHints(screen, x, y); this.status_icon = status_icon; attach_widget = null; }