Exemple #1
0
        private void CreateDockAndPads(HBox container)
        {
            Gtk.IconFactory fact = new Gtk.IconFactory ();
            fact.Add ("Tools.Pencil.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Tools.Pencil.png")));
            fact.Add ("Pinta.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Pinta.png")));
            fact.AddDefault ();

            // Dock widget
            dock = new DockFrame ();
            dock.CompactGuiLevel = 5;

            // Toolbox pad
            var toolboxpad = new ToolBoxPad ();
            toolboxpad.Initialize (dock, show_pad);

            // Palette pad
            var palettepad = new ColorPalettePad ();
            palettepad.Initialize (dock, show_pad);

            // Canvas pad
            var canvas_pad = new CanvasPad ();
            canvas_pad.Initialize (dock, show_pad);

            sw = canvas_pad.ScrolledWindow;

            // Layer pad
            var layers_pad = new LayersPad ();
            layers_pad.Initialize (dock, show_pad);

            // History pad
            var history_pad = new HistoryPad ();
            history_pad.Initialize (dock, show_pad);

            // Open Images pad
            var open_images_pad = new OpenImagesPad ();
            open_images_pad.Initialize (dock, show_pad);

            container.PackStart (dock, true, true, 0);

            string layout_file = System.IO.Path.Combine (PintaCore.Settings.GetUserSettingsDirectory (), "layouts.xml");

            if (System.IO.File.Exists(layout_file))
            {
                try
                {
                    dock.LoadLayouts(layout_file);
                }
                // If parsing layouts.xml fails for some reason, proceed to create the default layout.
                catch (Exception e)
                {
                    System.Console.Error.WriteLine ("Error reading layouts.xml: " + e.ToString());
                }
            }

            if (!dock.HasLayout ("Default"))
                dock.CreateLayout ("Default", false);

            dock.CurrentLayout = "Default";
        }
Exemple #2
0
        private void CreateDockAndPads(HBox container)
        {
            Gtk.IconFactory fact = new Gtk.IconFactory();
            fact.Add("Tools.Pencil.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Tools.Pencil.png")));
            fact.Add("Pinta.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Pinta.png")));
            fact.AddDefault();

            // Dock widget
            dock = new DockFrame();
            dock.CompactGuiLevel = 5;

            // Toolbox pad
            var toolboxpad = new ToolBoxPad();

            toolboxpad.Initialize(dock, show_pad);

            // Palette pad
            var palettepad = new ColorPalettePad();

            palettepad.Initialize(dock, show_pad);

            // Canvas pad
            canvas_pad = new CanvasPad();
            canvas_pad.Initialize(dock, show_pad);

            sw = canvas_pad.ScrolledWindow;

            // Layer pad
            var layers_pad = new LayersPad();

            layers_pad.Initialize(dock, show_pad);

            // Open Images pad
            var open_images_pad = new OpenImagesPad();

            open_images_pad.Initialize(dock, show_pad);

            // History pad
            var history_pad = new HistoryPad();

            history_pad.Initialize(dock, show_pad);

            container.PackStart(dock, true, true, 0);

            string layout_file = System.IO.Path.Combine(PintaCore.Settings.GetUserSettingsDirectory(), "layouts.xml");

            if (System.IO.File.Exists(layout_file))
            {
                try
                {
                    dock.LoadLayouts(layout_file);
                }
                // If parsing layouts.xml fails for some reason, proceed to create the default layout.
                catch (Exception e)
                {
                    System.Console.Error.WriteLine("Error reading layouts.xml: " + e.ToString());
                }
            }

            if (!dock.HasLayout("Default"))
            {
                dock.CreateLayout("Default", false);
            }

            dock.CurrentLayout = "Default";
        }
Exemple #3
0
        private void CreateDockAndPads(HBox container)
        {
            Gtk.IconFactory fact = new Gtk.IconFactory ();
            fact.Add ("Tools.Pencil.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Tools.Pencil.png")));
            fact.Add ("Pinta.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Pinta.png")));
            fact.AddDefault ();

            // Dock widget
            dock = new DockFrame ();
            dock.CompactGuiLevel = 5;

            // Toolbox pad
            var toolboxpad = new ToolBoxPad ();
            toolboxpad.Initialize (dock, show_pad);

            // Palette pad
            var palettepad = new ColorPalettePad ();
            palettepad.Initialize (dock, show_pad);

            // Canvas pad
            var canvas_pad = new CanvasPad ();
            canvas_pad.Initialize (dock, show_pad);

            sw = canvas_pad.ScrolledWindow;

            // Layer pad
            var layers_pad = new LayersPad ();
            layers_pad.Initialize (dock, show_pad);

            // History pad
            var history_pad = new HistoryPad ();
            history_pad.Initialize (dock, show_pad);

            container.PackStart (dock, true, true, 0);

            string layout_file = System.IO.Path.Combine (PintaCore.Settings.GetUserSettingsDirectory (), "layouts.xml");

            if (System.IO.File.Exists (layout_file))
                dock.LoadLayouts (layout_file);

            if (!dock.HasLayout ("Default"))
                dock.CreateLayout ("Default", false);

            dock.CurrentLayout = "Default";
        }
Exemple #4
0
        private void CreateDockAndPads(HBox container)
        {
            Gtk.IconFactory fact = new Gtk.IconFactory();
            fact.Add("Tools.Pencil.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Tools.Pencil.png")));
            fact.Add("Pinta.png", new Gtk.IconSet(PintaCore.Resources.GetIcon("Pinta.png")));
            fact.AddDefault();

            // Dock widget
            dock = new DockFrame();
            dock.CompactGuiLevel = 5;

            var style = new DockVisualStyle();

            style.PadTitleLabelColor         = Styles.PadLabelColor;
            style.PadBackgroundColor         = Styles.PadBackground;
            style.InactivePadBackgroundColor = Styles.InactivePadBackground;
            style.TabStyle          = DockTabStyle.Normal;
            style.ShowPadTitleIcon  = false;
            dock.DefaultVisualStyle = style;

            // Toolbox pad
            var toolboxpad = new ToolBoxPad();

            toolboxpad.Initialize(dock, show_pad);

            // Palette pad
            var palettepad = new ColorPalettePad();

            palettepad.Initialize(dock, show_pad);

            // Canvas pad
            canvas_pad = new CanvasPad();
            canvas_pad.Initialize(dock, show_pad);

            dock_container = canvas_pad.NotebookContainer;

            // Layer pad
            var layers_pad = new LayersPad();

            layers_pad.Initialize(dock, show_pad);

            // Open Images pad
            var open_images_pad = new OpenImagesPad();

            open_images_pad.Initialize(dock, show_pad);

            // History pad
            var history_pad = new HistoryPad();

            history_pad.Initialize(dock, show_pad);

            container.PackStart(dock, true, true, 0);

            string layout_file = PintaCore.Settings.LayoutFilePath;

            if (System.IO.File.Exists(layout_file))
            {
                try
                {
                    dock.LoadLayouts(layout_file);
                }
                // If parsing layouts.xml fails for some reason, proceed to create the default layout.
                catch (Exception e)
                {
                    System.Console.Error.WriteLine("Error reading " + PintaCore.Settings.LayoutFile + ": " + e.ToString());
                }
            }

            if (!dock.HasLayout("Default"))
            {
                dock.CreateLayout("Default", false);
            }

            dock.CurrentLayout = "Default";
        }
Exemple #5
0
		private void CreateDockAndPads (HBox container)
		{
			Gtk.IconFactory fact = new Gtk.IconFactory ();
			fact.Add ("Tools.Pencil.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Tools.Pencil.png")));
			fact.Add ("Pinta.png", new Gtk.IconSet (PintaCore.Resources.GetIcon ("Pinta.png")));
			fact.AddDefault ();

			// Dock widget
			dock = new DockFrame ();
			dock.CompactGuiLevel = 5;

            var style = new DockVisualStyle ();
            style.PadTitleLabelColor = Styles.PadLabelColor;
            style.PadBackgroundColor = Styles.PadBackground;
            style.InactivePadBackgroundColor = Styles.InactivePadBackground;
            style.TabStyle = DockTabStyle.Normal;
            style.ShowPadTitleIcon = false;
            dock.DefaultVisualStyle = style;

			// Toolbox pad
			var toolboxpad = new ToolBoxPad ();
			toolboxpad.Initialize (dock, show_pad);
		
			// Palette pad
			var palettepad = new ColorPalettePad ();
			palettepad.Initialize (dock, show_pad);

			// Canvas pad
			canvas_pad = new CanvasPad ();
			canvas_pad.Initialize (dock, show_pad);

            dock_container = canvas_pad.NotebookContainer;

			// Layer pad
			var layers_pad = new LayersPad ();
			layers_pad.Initialize (dock, show_pad);

			// Open Images pad
			var open_images_pad = new OpenImagesPad ();
			open_images_pad.Initialize (dock, show_pad);

			// History pad
			var history_pad = new HistoryPad ();
			history_pad.Initialize (dock, show_pad);

			container.PackStart (dock, true, true, 0);
			
			string layout_file = PintaCore.Settings.LayoutFilePath;

            if (System.IO.File.Exists(layout_file))
            {
                try
                {
                    dock.LoadLayouts(layout_file);
                }
                // If parsing layouts.xml fails for some reason, proceed to create the default layout.
                catch (Exception e)
                {
                    System.Console.Error.WriteLine ("Error reading " + PintaCore.Settings.LayoutFile + ": " + e.ToString());
                }
            }
			
			if (!dock.HasLayout ("Default"))
				dock.CreateLayout ("Default", false);
				
			dock.CurrentLayout = "Default";
		}