public PreferencesButton(string label, Preview preview) : base(label) { Clicked += delegate { var activeColor = new Variable <RGB>(preview.Renderer.ActiveColor); var inactiveColor = new Variable <RGB>(preview.Renderer.InactiveColor); var dialog = new PreferencesDialog(activeColor, inactiveColor); dialog.ShowAll(); var type = dialog.Run(); if (type == ResponseType.Ok) { preview.SetColors(activeColor.Value, inactiveColor.Value); } dialog.Destroy(); }; }
public PreferencesButton(string label, Preview preview) : base(label) { Clicked += delegate { var activeColor = new Variable<RGB>(preview.Renderer.ActiveColor); var inactiveColor = new Variable<RGB>(preview.Renderer.InactiveColor); var dialog = new PreferencesDialog(activeColor, inactiveColor); dialog.ShowAll(); var type = dialog.Run(); if (type == ResponseType.Ok) { preview.SetColors(activeColor.Value, inactiveColor.Value); } dialog.Destroy(); }; }