Esempio n. 1
0
        public SetupWindow() : base("")
        {
            Title          = String.Format("{0} {1}", Properties_Resources.ApplicationName, Catalog.GetString("Setup"));
            BorderWidth    = 0;
            IconName       = "dataspacesync-app";
            Resizable      = false;
            WindowPosition = WindowPosition.Center;
            Deletable      = false;

            DeleteEvent += delegate(object sender, DeleteEventArgs args) {
                args.RetVal = true;
            };

            SecondaryTextColor = UIHelpers.GdkColorToHex(Style.Foreground(StateType.Insensitive));

            SecondaryTextColorSelected =
                UIHelpers.GdkColorToHex(
                    MixColors(
                        new TreeView().Style.Foreground(StateType.Selected),
                        new TreeView().Style.Background(StateType.Selected),
                        0.15
                        )
                    );

            SetSizeRequest(680, 400);

            HBox = new HBox(false, 0);

            VBox = new VBox(false, 0);

            Wrapper = new VBox(false, 0)
            {
                BorderWidth = 0
            };

            OptionArea = new VBox(false, 0)
            {
                BorderWidth = 0
            };

            Buttons = CreateButtonBox();


            HBox layout_horizontal = new HBox(false, 0)
            {
                BorderWidth = 0
            };

            layout_horizontal.PackStart(OptionArea, true, true, 0);
            layout_horizontal.PackStart(Buttons, false, false, 0);

            VBox.PackStart(Wrapper, true, true, 0);
            VBox.PackStart(layout_horizontal, false, false, 15);

            EventBox box = new EventBox();

            Gdk.Color bg_color = new Gdk.Color();
            Gdk.Color.Parse("#000", ref bg_color);
            box.ModifyBg(StateType.Normal, bg_color);

            Image side_splash = UIHelpers.GetImage("side-splash.png");

            side_splash.Yalign = 1;

            box.Add(side_splash);

            HBox.PackStart(box, false, false, 0);
            HBox.PackStart(VBox, true, true, 30);

            base.Add(HBox);
        }