public SparkleSetupWindow() : base("SparkleShare Setup") { SetWmclass("SparkleShare", "SparkleShare"); IconName = "sparkleshare"; Resizable = false; WindowPosition = WindowPosition.Center; Deletable = false; TypeHint = Gdk.WindowTypeHint.Dialog; SetSizeRequest(680, 400); DeleteEvent += delegate(object sender, DeleteEventArgs args) { args.RetVal = true; }; Gdk.Color color = SparkleUIHelpers.RGBAToColor(StyleContext.GetColor(StateFlags.Insensitive)); SecondaryTextColor = SparkleUIHelpers.ColorToHex(color); color = MixColors( SparkleUIHelpers.RGBAToColor(new TreeView().StyleContext.GetColor(StateFlags.Selected)), SparkleUIHelpers.RGBAToColor(new TreeView().StyleContext.GetBackgroundColor(StateFlags.Selected)), 0.39); SecondaryTextColorSelected = SparkleUIHelpers.ColorToHex(color); HBox layout_horizontal = new HBox(false, 0); VBox layout_vertical = new VBox(false, 0); this.content_area = new EventBox(); this.option_area = new EventBox(); this.buttons = CreateButtonBox(); HBox layout_actions = new HBox(false, 48); layout_actions.PackStart(this.option_area, true, true, 0); layout_actions.PackStart(this.buttons, false, false, 0); layout_vertical.PackStart(this.content_area, true, true, 0); layout_vertical.PackStart(layout_actions, false, false, 15); Image side_splash = SparkleUIHelpers.GetImage("side-splash.png"); side_splash.Yalign = 1; layout_horizontal.PackStart(side_splash, false, false, 0); layout_horizontal.PackStart(layout_vertical, true, true, 30); base.Add(layout_horizontal); }
public SparkleUI() { this.application = new Gtk.Application("org.sparkleshare.sparkleshare", 0); this.application.Register(null); this.application.Activated += ApplicationActivatedDelegate; Gdk.Color color = SparkleUIHelpers.RGBAToColor(new Label().StyleContext.GetColor(StateFlags.Insensitive)); SecondaryTextColor = SparkleUIHelpers.ColorToHex(color); color = SparkleUIHelpers.MixColors( SparkleUIHelpers.RGBAToColor(new TreeView().StyleContext.GetColor(StateFlags.Selected)), SparkleUIHelpers.RGBAToColor(new TreeView().StyleContext.GetBackgroundColor(StateFlags.Selected)), 0.39); SecondaryTextColorSelected = SparkleUIHelpers.ColorToHex(color); }