void ButtonStateChanged(object o, Gtk.StateChangedArgs args) { //while the menu's open, make sure the button looks depressed if (isOpen && button.State != Gtk.StateType.Active) { button.State = Gtk.StateType.Active; } }
void HandleStateChanged(object o, Gtk.StateChangedArgs args) { //while the menu's open, make sure the button looks depressed if (isOpen && Widget.State != Gtk.StateType.Active) { Widget.SetStateActive(); } }
void HandleStateChanged(object o, Gtk.StateChangedArgs args) { Gtk.Widget w = (Gtk.Widget)Widget; //while the menu's open, make sure the button looks depressed if (isOpen && w.State != Gtk.StateType.Active) { w.State = Gtk.StateType.Active; } }
void ImageMenuItemStateChanged(object o, Gtk.StateChangedArgs args) { var it = item as Gtk.ImageMenuItem; var image = it?.Image as ImageBox; if (image == null || selImage == null || defImage == null) { return; } if (it.State == Gtk.StateType.Prelight) { image.Image = selImage.Value; } else if (args.PreviousState == Gtk.StateType.Prelight) { image.Image = defImage.Value; } }