From 6eb10fd26643f3a072b0cb0d820066c14ae06491 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 16:12:45 -0400 Subject: move zoom, undo/redo and file io in artpad to menu --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 291 +++++++++++++---------- 1 file changed, 169 insertions(+), 122 deletions(-) (limited to 'ShiftOS.WinForms/Applications/Artpad.Designer.cs') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index 7b94c34..03df792 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -292,12 +292,6 @@ namespace ShiftOS.WinForms.Applications this.btnpaintbrush = new System.Windows.Forms.Button(); this.btntexttool = new System.Windows.Forms.Button(); this.btneracer = new System.Windows.Forms.Button(); - this.btnnew = new System.Windows.Forms.Button(); - this.btnmagnify = new System.Windows.Forms.Button(); - this.btnopen = new System.Windows.Forms.Button(); - this.btnsave = new System.Windows.Forms.Button(); - this.btnundo = new System.Windows.Forms.Button(); - this.btnredo = new System.Windows.Forms.Button(); this.line1 = new System.Windows.Forms.Panel(); this.pnltoolpreview = new System.Windows.Forms.Panel(); this.Label13 = new System.Windows.Forms.Label(); @@ -311,6 +305,22 @@ namespace ShiftOS.WinForms.Applications this.pullbottom = new System.Windows.Forms.Timer(this.components); this.pullside = new System.Windows.Forms.Timer(this.components); this.tmrsetupui = new System.Windows.Forms.Timer(this.components); + this.msTools = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.gENNEWToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.gENLOADToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.gENSAVEToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.gENEXITToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.undoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.redoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.viewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.zoomToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripMenuItem5 = new System.Windows.Forms.ToolStripMenuItem(); + this.moreControlsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.pgcontents.SuspendLayout(); this.pnldrawingbackground.SuspendLayout(); this.pnlinitialcanvassettings.SuspendLayout(); @@ -335,6 +345,7 @@ namespace ShiftOS.WinForms.Applications this.pnltoolpositioner.SuspendLayout(); this.pnltoolpreview.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.picpreview)).BeginInit(); + this.msTools.SuspendLayout(); this.SuspendLayout(); // // pgcontents @@ -344,9 +355,9 @@ namespace ShiftOS.WinForms.Applications this.pgcontents.Controls.Add(this.pnlbottompanel); this.pgcontents.Controls.Add(this.pnltools); this.pgcontents.Dock = System.Windows.Forms.DockStyle.Fill; - this.pgcontents.Location = new System.Drawing.Point(0, 0); + this.pgcontents.Location = new System.Drawing.Point(0, 24); this.pgcontents.Name = "pgcontents"; - this.pgcontents.Size = new System.Drawing.Size(802, 598); + this.pgcontents.Size = new System.Drawing.Size(802, 574); this.pgcontents.TabIndex = 20; // // pnldrawingbackground @@ -359,7 +370,7 @@ namespace ShiftOS.WinForms.Applications this.pnldrawingbackground.Dock = System.Windows.Forms.DockStyle.Fill; this.pnldrawingbackground.Location = new System.Drawing.Point(120, 0); this.pnldrawingbackground.Name = "pnldrawingbackground"; - this.pnldrawingbackground.Size = new System.Drawing.Size(682, 474); + this.pnldrawingbackground.Size = new System.Drawing.Size(682, 450); this.pnldrawingbackground.TabIndex = 2; // // pnlinitialcanvassettings @@ -602,7 +613,7 @@ namespace ShiftOS.WinForms.Applications this.pnlbottompanel.Controls.Add(this.pnlpallet); this.pnlbottompanel.Controls.Add(this.pnltoolproperties); this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbottompanel.Location = new System.Drawing.Point(120, 474); + this.pnlbottompanel.Location = new System.Drawing.Point(120, 450); this.pnlbottompanel.Name = "pnlbottompanel"; this.pnlbottompanel.Size = new System.Drawing.Size(682, 124); this.pnlbottompanel.TabIndex = 1; @@ -2933,7 +2944,7 @@ namespace ShiftOS.WinForms.Applications this.pnltools.Dock = System.Windows.Forms.DockStyle.Left; this.pnltools.Location = new System.Drawing.Point(0, 0); this.pnltools.Name = "pnltools"; - this.pnltools.Size = new System.Drawing.Size(120, 598); + this.pnltools.Size = new System.Drawing.Size(120, 574); this.pnltools.TabIndex = 0; // // pnltoolpositioner @@ -2948,16 +2959,10 @@ namespace ShiftOS.WinForms.Applications this.pnltoolpositioner.Controls.Add(this.btnpaintbrush); this.pnltoolpositioner.Controls.Add(this.btntexttool); this.pnltoolpositioner.Controls.Add(this.btneracer); - this.pnltoolpositioner.Controls.Add(this.btnnew); - this.pnltoolpositioner.Controls.Add(this.btnmagnify); - this.pnltoolpositioner.Controls.Add(this.btnopen); - this.pnltoolpositioner.Controls.Add(this.btnsave); - this.pnltoolpositioner.Controls.Add(this.btnundo); - this.pnltoolpositioner.Controls.Add(this.btnredo); this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill; this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0); this.pnltoolpositioner.Name = "pnltoolpositioner"; - this.pnltoolpositioner.Size = new System.Drawing.Size(119, 498); + this.pnltoolpositioner.Size = new System.Drawing.Size(119, 474); this.pnltoolpositioner.TabIndex = 2; // // btnpixelsetter @@ -3116,109 +3121,13 @@ namespace ShiftOS.WinForms.Applications this.btneracer.UseVisualStyleBackColor = true; this.btneracer.Click += new System.EventHandler(this.btneracer_Click); // - // btnnew - // - this.btnnew.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadnew; - this.btnnew.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnnew.FlatAppearance.BorderSize = 0; - this.btnnew.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnnew.Location = new System.Drawing.Point(6, 286); - this.btnnew.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnnew.Name = "btnnew"; - this.btnnew.Size = new System.Drawing.Size(50, 50); - this.btnnew.TabIndex = 6; - this.btnnew.Tag = "nobuttonskin"; - this.btnnew.Text = " "; - this.btnnew.UseVisualStyleBackColor = true; - this.btnnew.Click += new System.EventHandler(this.btnnew_Click); - // - // btnmagnify - // - this.btnmagnify.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadmagnify; - this.btnmagnify.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnmagnify.FlatAppearance.BorderSize = 0; - this.btnmagnify.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnmagnify.Location = new System.Drawing.Point(62, 286); - this.btnmagnify.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnmagnify.Name = "btnmagnify"; - this.btnmagnify.Size = new System.Drawing.Size(50, 50); - this.btnmagnify.TabIndex = 3; - this.btnmagnify.Tag = "nobuttonskin"; - this.btnmagnify.Text = " "; - this.btnmagnify.UseVisualStyleBackColor = true; - this.btnmagnify.Click += new System.EventHandler(this.btnmagnify_Click); - // - // btnopen - // - this.btnopen.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadopen; - this.btnopen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnopen.FlatAppearance.BorderSize = 0; - this.btnopen.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnopen.Location = new System.Drawing.Point(6, 342); - this.btnopen.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnopen.Name = "btnopen"; - this.btnopen.Size = new System.Drawing.Size(50, 50); - this.btnopen.TabIndex = 10; - this.btnopen.Tag = "nobuttonskin"; - this.btnopen.Text = " "; - this.btnopen.UseVisualStyleBackColor = true; - this.btnopen.Click += new System.EventHandler(this.btnopen_Click); - // - // btnsave - // - this.btnsave.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsave; - this.btnsave.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnsave.FlatAppearance.BorderSize = 0; - this.btnsave.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnsave.Location = new System.Drawing.Point(62, 342); - this.btnsave.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnsave.Name = "btnsave"; - this.btnsave.Size = new System.Drawing.Size(50, 50); - this.btnsave.TabIndex = 5; - this.btnsave.Tag = "nobuttonskin"; - this.btnsave.Text = " "; - this.btnsave.UseVisualStyleBackColor = true; - this.btnsave.Click += new System.EventHandler(this.btnsave_Click); - // - // btnundo - // - this.btnundo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadundo; - this.btnundo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnundo.FlatAppearance.BorderSize = 0; - this.btnundo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnundo.Location = new System.Drawing.Point(6, 398); - this.btnundo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnundo.Name = "btnundo"; - this.btnundo.Size = new System.Drawing.Size(50, 50); - this.btnundo.TabIndex = 8; - this.btnundo.Tag = "nobuttonskin"; - this.btnundo.Text = " "; - this.btnundo.UseVisualStyleBackColor = true; - this.btnundo.Click += new System.EventHandler(this.btnundo_Click); - // - // btnredo - // - this.btnredo.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadredo; - this.btnredo.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btnredo.FlatAppearance.BorderSize = 0; - this.btnredo.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnredo.Location = new System.Drawing.Point(62, 398); - this.btnredo.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); - this.btnredo.Name = "btnredo"; - this.btnredo.Size = new System.Drawing.Size(50, 50); - this.btnredo.TabIndex = 9; - this.btnredo.Tag = "nobuttonskin"; - this.btnredo.Text = " "; - this.btnredo.UseVisualStyleBackColor = true; - this.btnredo.Click += new System.EventHandler(this.btnredo_Click); - // // line1 // this.line1.BackColor = System.Drawing.Color.Black; this.line1.Dock = System.Windows.Forms.DockStyle.Right; this.line1.Location = new System.Drawing.Point(119, 0); this.line1.Name = "line1"; - this.line1.Size = new System.Drawing.Size(1, 498); + this.line1.Size = new System.Drawing.Size(1, 474); this.line1.TabIndex = 1; // // pnltoolpreview @@ -3229,7 +3138,7 @@ namespace ShiftOS.WinForms.Applications this.pnltoolpreview.Controls.Add(this.line4); this.pnltoolpreview.Controls.Add(this.line2); this.pnltoolpreview.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnltoolpreview.Location = new System.Drawing.Point(0, 498); + this.pnltoolpreview.Location = new System.Drawing.Point(0, 474); this.pnltoolpreview.Name = "pnltoolpreview"; this.pnltoolpreview.Size = new System.Drawing.Size(120, 100); this.pnltoolpreview.TabIndex = 0; @@ -3305,11 +3214,136 @@ namespace ShiftOS.WinForms.Applications // this.tmrsetupui.Tick += new System.EventHandler(this.tmrsetupui_Tick); // + // msTools + // + this.msTools.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.editToolStripMenuItem, + this.viewToolStripMenuItem}); + this.msTools.Location = new System.Drawing.Point(0, 0); + this.msTools.Name = "msTools"; + this.msTools.Size = new System.Drawing.Size(802, 24); + this.msTools.TabIndex = 3; + this.msTools.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.gENNEWToolStripMenuItem, + this.gENLOADToolStripMenuItem, + this.gENSAVEToolStripMenuItem, + this.gENEXITToolStripMenuItem}); + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Text = "File"; + // + // gENNEWToolStripMenuItem + // + this.gENNEWToolStripMenuItem.Name = "gENNEWToolStripMenuItem"; + this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENNEWToolStripMenuItem.Text = "{GEN_NEW}"; + this.gENNEWToolStripMenuItem.Click += new System.EventHandler(this.btnnew_Click); + // + // gENLOADToolStripMenuItem + // + this.gENLOADToolStripMenuItem.Name = "gENLOADToolStripMenuItem"; + this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENLOADToolStripMenuItem.Text = "{GEN_LOAD}"; + this.gENLOADToolStripMenuItem.Click += new System.EventHandler(this.btnopen_Click); + // + // gENSAVEToolStripMenuItem + // + this.gENSAVEToolStripMenuItem.Name = "gENSAVEToolStripMenuItem"; + this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENSAVEToolStripMenuItem.Text = "{GEN_SAVE}"; + this.gENSAVEToolStripMenuItem.Click += new System.EventHandler(this.btnsave_Click); + // + // gENEXITToolStripMenuItem + // + this.gENEXITToolStripMenuItem.Name = "gENEXITToolStripMenuItem"; + this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENEXITToolStripMenuItem.Text = "{GEN_EXIT}"; + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.undoToolStripMenuItem, + this.redoToolStripMenuItem}); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.editToolStripMenuItem.Text = "Edit"; + // + // undoToolStripMenuItem + // + this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; + this.undoToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.undoToolStripMenuItem.Text = "Undo"; + this.undoToolStripMenuItem.Click += new System.EventHandler(this.btnundo_Click); + // + // redoToolStripMenuItem + // + this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; + this.redoToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.redoToolStripMenuItem.Text = "Redo"; + this.redoToolStripMenuItem.Click += new System.EventHandler(this.btnredo_Click); + // + // viewToolStripMenuItem + // + this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.zoomToolStripMenuItem}); + this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; + this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.viewToolStripMenuItem.Text = "View"; + // + // zoomToolStripMenuItem + // + this.zoomToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripMenuItem2, + this.toolStripMenuItem3, + this.toolStripMenuItem4, + this.toolStripMenuItem5, + this.moreControlsToolStripMenuItem}); + this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem"; + this.zoomToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.zoomToolStripMenuItem.Text = "Zoom"; + // + // toolStripMenuItem2 + // + this.toolStripMenuItem2.Name = "toolStripMenuItem2"; + this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem2.Text = "25%"; + // + // toolStripMenuItem3 + // + this.toolStripMenuItem3.Name = "toolStripMenuItem3"; + this.toolStripMenuItem3.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem3.Text = "50%"; + // + // toolStripMenuItem4 + // + this.toolStripMenuItem4.Name = "toolStripMenuItem4"; + this.toolStripMenuItem4.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem4.Text = "100%"; + // + // toolStripMenuItem5 + // + this.toolStripMenuItem5.Name = "toolStripMenuItem5"; + this.toolStripMenuItem5.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem5.Text = "200%"; + // + // moreControlsToolStripMenuItem + // + this.moreControlsToolStripMenuItem.Name = "moreControlsToolStripMenuItem"; + this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.moreControlsToolStripMenuItem.Text = "More controls"; + this.moreControlsToolStripMenuItem.Click += new System.EventHandler(this.btnmagnify_Click); + // // Artpad // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.pgcontents); + this.Controls.Add(this.msTools); this.MinimumSize = new System.Drawing.Size(502, 398); this.Name = "Artpad"; this.Size = new System.Drawing.Size(802, 598); @@ -3349,7 +3383,10 @@ namespace ShiftOS.WinForms.Applications this.pnltoolpositioner.ResumeLayout(false); this.pnltoolpreview.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.picpreview)).EndInit(); + this.msTools.ResumeLayout(false); + this.msTools.PerformLayout(); this.ResumeLayout(false); + this.PerformLayout(); } internal System.Windows.Forms.Panel pgcontents; @@ -3369,7 +3406,6 @@ namespace ShiftOS.WinForms.Applications internal System.Windows.Forms.Button btnpixelsettersetpixel; internal System.Windows.Forms.TextBox txtpixelsetterycoordinate; internal System.Windows.Forms.TextBox txtpixelsetterxcoordinate; - internal System.Windows.Forms.Button btnmagnify; internal System.Windows.Forms.Panel colourpallet32; internal System.Windows.Forms.Panel colourpallet31; internal System.Windows.Forms.Panel colourpallet30; @@ -3415,7 +3451,6 @@ namespace ShiftOS.WinForms.Applications internal System.Windows.Forms.Label lblpixelplacerhelp; internal System.Windows.Forms.Label Label6; internal System.Windows.Forms.Label Label5; - internal System.Windows.Forms.Button btnnew; internal System.Windows.Forms.FlowLayoutPanel flowcolours; internal System.Windows.Forms.Button btnpencil; internal System.Windows.Forms.Panel pnlpencilsettings; @@ -3454,10 +3489,6 @@ namespace ShiftOS.WinForms.Applications internal System.Windows.Forms.Label lbltoolselected; internal System.Windows.Forms.Panel line4; internal System.Windows.Forms.Panel line2; - internal System.Windows.Forms.Button btnopen; - internal System.Windows.Forms.Button btnsave; - internal System.Windows.Forms.Button btnundo; - internal System.Windows.Forms.Button btnredo; internal System.Windows.Forms.Button btneracer; internal System.Windows.Forms.Button btnlinetool; internal System.Windows.Forms.Panel pnllinetoolsettings; @@ -3616,5 +3647,21 @@ namespace ShiftOS.WinForms.Applications internal System.Windows.Forms.Timer pullside; private System.Windows.Forms.Timer tmrsetupui; private System.Windows.Forms.Label label44; + private System.Windows.Forms.MenuStrip msTools; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem gENNEWToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem gENLOADToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem gENSAVEToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem gENEXITToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem undoToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem redoToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem viewToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem zoomToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4; + private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem5; + private System.Windows.Forms.ToolStripMenuItem moreControlsToolStripMenuItem; } } \ No newline at end of file -- cgit v1.2.3 From 3336f3e0dd238219b86adbdd6b08c3ce5c2d46b2 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 16:21:14 -0400 Subject: fix image size display colors --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 38 ++++++++---------------- ShiftOS.WinForms/Applications/Artpad.cs | 6 ++-- 2 files changed, 15 insertions(+), 29 deletions(-) (limited to 'ShiftOS.WinForms/Applications/Artpad.Designer.cs') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index 03df792..5dd2ed6 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -50,7 +50,6 @@ namespace ShiftOS.WinForms.Applications this.pgcontents = new System.Windows.Forms.Panel(); this.pnldrawingbackground = new System.Windows.Forms.Panel(); this.pnlinitialcanvassettings = new System.Windows.Forms.Panel(); - this.btncancel = new System.Windows.Forms.Button(); this.btncreate = new System.Windows.Forms.Button(); this.Label11 = new System.Windows.Forms.Label(); this.lbltotalpixels = new System.Windows.Forms.Label(); @@ -376,7 +375,6 @@ namespace ShiftOS.WinForms.Applications // pnlinitialcanvassettings // this.pnlinitialcanvassettings.BackColor = System.Drawing.Color.White; - this.pnlinitialcanvassettings.Controls.Add(this.btncancel); this.pnlinitialcanvassettings.Controls.Add(this.btncreate); this.pnlinitialcanvassettings.Controls.Add(this.Label11); this.pnlinitialcanvassettings.Controls.Add(this.lbltotalpixels); @@ -384,22 +382,11 @@ namespace ShiftOS.WinForms.Applications this.pnlinitialcanvassettings.Controls.Add(this.Label10); this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth); this.pnlinitialcanvassettings.Controls.Add(this.Label9); - this.pnlinitialcanvassettings.Location = new System.Drawing.Point(223, 178); + this.pnlinitialcanvassettings.Location = new System.Drawing.Point(194, 174); this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings"; this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100); this.pnlinitialcanvassettings.TabIndex = 1; // - // btncancel - // - this.btncancel.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btncancel.Location = new System.Drawing.Point(7, 66); - this.btncancel.Name = "btncancel"; - this.btncancel.Size = new System.Drawing.Size(102, 28); - this.btncancel.TabIndex = 7; - this.btncancel.Text = "Cancel"; - this.btncancel.UseVisualStyleBackColor = true; - this.btncancel.Click += new System.EventHandler(this.btncancel_Click); - // // btncreate // this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); @@ -488,7 +475,7 @@ namespace ShiftOS.WinForms.Applications this.pnlpalettesize.Controls.Add(this.Label42); this.pnlpalettesize.Controls.Add(this.txtcolorpalletwidth); this.pnlpalettesize.Controls.Add(this.Label43); - this.pnlpalettesize.Location = new System.Drawing.Point(207, 178); + this.pnlpalettesize.Location = new System.Drawing.Point(144, 303); this.pnlpalettesize.Name = "pnlpalettesize"; this.pnlpalettesize.Size = new System.Drawing.Size(259, 100); this.pnlpalettesize.TabIndex = 2; @@ -3240,28 +3227,28 @@ namespace ShiftOS.WinForms.Applications // gENNEWToolStripMenuItem // this.gENNEWToolStripMenuItem.Name = "gENNEWToolStripMenuItem"; - this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gENNEWToolStripMenuItem.Text = "{GEN_NEW}"; this.gENNEWToolStripMenuItem.Click += new System.EventHandler(this.btnnew_Click); // // gENLOADToolStripMenuItem // this.gENLOADToolStripMenuItem.Name = "gENLOADToolStripMenuItem"; - this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gENLOADToolStripMenuItem.Text = "{GEN_LOAD}"; this.gENLOADToolStripMenuItem.Click += new System.EventHandler(this.btnopen_Click); // // gENSAVEToolStripMenuItem // this.gENSAVEToolStripMenuItem.Name = "gENSAVEToolStripMenuItem"; - this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gENSAVEToolStripMenuItem.Text = "{GEN_SAVE}"; this.gENSAVEToolStripMenuItem.Click += new System.EventHandler(this.btnsave_Click); // // gENEXITToolStripMenuItem // this.gENEXITToolStripMenuItem.Name = "gENEXITToolStripMenuItem"; - this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.gENEXITToolStripMenuItem.Text = "{GEN_EXIT}"; // // editToolStripMenuItem @@ -3304,37 +3291,37 @@ namespace ShiftOS.WinForms.Applications this.toolStripMenuItem5, this.moreControlsToolStripMenuItem}); this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem"; - this.zoomToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.zoomToolStripMenuItem.Size = new System.Drawing.Size(106, 22); this.zoomToolStripMenuItem.Text = "Zoom"; // // toolStripMenuItem2 // this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem2.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem2.Text = "25%"; // // toolStripMenuItem3 // this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem3.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem3.Text = "50%"; // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem4.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem4.Text = "100%"; // // toolStripMenuItem5 // this.toolStripMenuItem5.Name = "toolStripMenuItem5"; - this.toolStripMenuItem5.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem5.Size = new System.Drawing.Size(148, 22); this.toolStripMenuItem5.Text = "200%"; // // moreControlsToolStripMenuItem // this.moreControlsToolStripMenuItem.Name = "moreControlsToolStripMenuItem"; - this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(148, 22); this.moreControlsToolStripMenuItem.Text = "More controls"; this.moreControlsToolStripMenuItem.Click += new System.EventHandler(this.btnmagnify_Click); // @@ -3534,7 +3521,6 @@ namespace ShiftOS.WinForms.Applications internal System.Windows.Forms.TextBox txtcolorpalletwidth; internal System.Windows.Forms.Label Label43; internal System.Windows.Forms.Panel pnlinitialcanvassettings; - internal System.Windows.Forms.Button btncancel; internal System.Windows.Forms.Button btncreate; internal System.Windows.Forms.Label Label11; internal System.Windows.Forms.Label lbltotalpixels; diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs index 19bf5d0..6511420 100644 --- a/ShiftOS.WinForms/Applications/Artpad.cs +++ b/ShiftOS.WinForms/Applications/Artpad.cs @@ -785,7 +785,7 @@ namespace ShiftOS.WinForms.Applications // ERROR: Handles clauses are not supported in C# private void txtnewcanvaswidth_TextChanged(object sender, EventArgs e) { - if (txtnewcanvaswidth.Text == "" | txtnewcanvasheight.Text == "") + if (txtnewcanvaswidth.Text == "" || txtnewcanvasheight.Text == "") { if (txtnewcanvasheight.Text == "") { @@ -803,7 +803,7 @@ namespace ShiftOS.WinForms.Applications lbltotalpixels.Text = (Convert.ToInt32(txtnewcanvaswidth.Text) * Convert.ToInt32(txtnewcanvasheight.Text)).ToString(); if (ShiftoriumFrontend.UpgradeInstalled("artpad_limitless_pixels") == true) { - lbltotalpixels.ForeColor = Color.Black; + lbltotalpixels.ForeColor = SkinEngine.LoadedSkin.ControlTextColor; } else { @@ -813,7 +813,7 @@ namespace ShiftOS.WinForms.Applications } else { - lbltotalpixels.ForeColor = Color.Black; + lbltotalpixels.ForeColor = SkinEngine.LoadedSkin.ControlTextColor; } } } -- cgit v1.2.3 From df14761a81a938423d16494101b871779825c98e Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 16:43:48 -0400 Subject: I'm living on the island of Floating Point. --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 150 ++++++++++++----------- ShiftOS.WinForms/Applications/Artpad.cs | 64 +++++++--- 2 files changed, 124 insertions(+), 90 deletions(-) (limited to 'ShiftOS.WinForms/Applications/Artpad.Designer.cs') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index 5dd2ed6..f6d41ec 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -204,6 +204,11 @@ namespace ShiftOS.WinForms.Applications this.Label4 = new System.Windows.Forms.Label(); this.line6 = new System.Windows.Forms.Panel(); this.pnltoolproperties = new System.Windows.Forms.Panel(); + this.pnlmagnifiersettings = new System.Windows.Forms.Panel(); + this.btnzoomout = new System.Windows.Forms.Button(); + this.btnzoomin = new System.Windows.Forms.Button(); + this.lblzoomlevel = new System.Windows.Forms.Label(); + this.Label7 = new System.Windows.Forms.Label(); this.pnleracertoolsettings = new System.Windows.Forms.Panel(); this.Label28 = new System.Windows.Forms.Label(); this.btneracersquare = new System.Windows.Forms.Button(); @@ -254,11 +259,6 @@ namespace ShiftOS.WinForms.Applications this.Label3 = new System.Windows.Forms.Label(); this.Label2 = new System.Windows.Forms.Label(); this.Label1 = new System.Windows.Forms.Label(); - this.pnlmagnifiersettings = new System.Windows.Forms.Panel(); - this.btnzoomout = new System.Windows.Forms.Button(); - this.btnzoomin = new System.Windows.Forms.Button(); - this.lblzoomlevel = new System.Windows.Forms.Label(); - this.Label7 = new System.Windows.Forms.Label(); this.pnlfloodfillsettings = new System.Windows.Forms.Panel(); this.Label12 = new System.Windows.Forms.Label(); this.Label15 = new System.Windows.Forms.Label(); @@ -329,6 +329,7 @@ namespace ShiftOS.WinForms.Applications this.pnlpallet.SuspendLayout(); this.flowcolours.SuspendLayout(); this.pnltoolproperties.SuspendLayout(); + this.pnlmagnifiersettings.SuspendLayout(); this.pnleracertoolsettings.SuspendLayout(); this.pnlpixelplacersettings.SuspendLayout(); this.pnlovaltoolsettings.SuspendLayout(); @@ -336,7 +337,6 @@ namespace ShiftOS.WinForms.Applications this.pnlpaintbrushtoolsettings.SuspendLayout(); this.pnltexttoolsettings.SuspendLayout(); this.pnlpixelsettersettings.SuspendLayout(); - this.pnlmagnifiersettings.SuspendLayout(); this.pnlfloodfillsettings.SuspendLayout(); this.pnlsquaretoolsettings.SuspendLayout(); this.pnlpencilsettings.SuspendLayout(); @@ -428,6 +428,7 @@ namespace ShiftOS.WinForms.Applications this.txtnewcanvasheight.Name = "txtnewcanvasheight"; this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22); this.txtnewcanvasheight.TabIndex = 3; + this.txtnewcanvasheight.Text = "0"; this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); // // Label10 @@ -450,6 +451,7 @@ namespace ShiftOS.WinForms.Applications this.txtnewcanvaswidth.Name = "txtnewcanvaswidth"; this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22); this.txtnewcanvaswidth.TabIndex = 1; + this.txtnewcanvaswidth.Text = "0"; this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); // // Label9 @@ -2068,6 +2070,7 @@ namespace ShiftOS.WinForms.Applications // // pnltoolproperties // + this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings); this.pnltoolproperties.Controls.Add(this.pnleracertoolsettings); this.pnltoolproperties.Controls.Add(this.pnlpixelplacersettings); this.pnltoolproperties.Controls.Add(this.pnlovaltoolsettings); @@ -2075,7 +2078,6 @@ namespace ShiftOS.WinForms.Applications this.pnltoolproperties.Controls.Add(this.pnlpaintbrushtoolsettings); this.pnltoolproperties.Controls.Add(this.pnltexttoolsettings); this.pnltoolproperties.Controls.Add(this.pnlpixelsettersettings); - this.pnltoolproperties.Controls.Add(this.pnlmagnifiersettings); this.pnltoolproperties.Controls.Add(this.pnlfloodfillsettings); this.pnltoolproperties.Controls.Add(this.pnlsquaretoolsettings); this.pnltoolproperties.Controls.Add(this.pnlpencilsettings); @@ -2088,6 +2090,60 @@ namespace ShiftOS.WinForms.Applications this.pnltoolproperties.Size = new System.Drawing.Size(457, 100); this.pnltoolproperties.TabIndex = 1; // + // pnlmagnifiersettings + // + this.pnlmagnifiersettings.Controls.Add(this.btnzoomout); + this.pnlmagnifiersettings.Controls.Add(this.btnzoomin); + this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel); + this.pnlmagnifiersettings.Controls.Add(this.Label7); + this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50); + this.pnlmagnifiersettings.Name = "pnlmagnifiersettings"; + this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44); + this.pnlmagnifiersettings.TabIndex = 6; + this.pnlmagnifiersettings.Visible = false; + // + // btnzoomout + // + this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomout.Location = new System.Drawing.Point(16, 33); + this.btnzoomout.Name = "btnzoomout"; + this.btnzoomout.Size = new System.Drawing.Size(129, 56); + this.btnzoomout.TabIndex = 11; + this.btnzoomout.Text = "-"; + this.btnzoomout.UseVisualStyleBackColor = true; + this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click); + // + // btnzoomin + // + this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.btnzoomin.Location = new System.Drawing.Point(313, 33); + this.btnzoomin.Name = "btnzoomin"; + this.btnzoomin.Size = new System.Drawing.Size(129, 56); + this.btnzoomin.TabIndex = 10; + this.btnzoomin.Text = "+"; + this.btnzoomin.UseVisualStyleBackColor = true; + this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click); + // + // lblzoomlevel + // + this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lblzoomlevel.Location = new System.Drawing.Point(151, 33); + this.lblzoomlevel.Name = "lblzoomlevel"; + this.lblzoomlevel.Size = new System.Drawing.Size(156, 56); + this.lblzoomlevel.TabIndex = 1; + this.lblzoomlevel.Text = "1X"; + this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // Label7 + // + this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Label7.Location = new System.Drawing.Point(6, 3); + this.Label7.Name = "Label7"; + this.Label7.Size = new System.Drawing.Size(444, 23); + this.Label7.TabIndex = 0; + this.Label7.Text = "Magnifier Settings"; + this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // // pnleracertoolsettings // this.pnleracertoolsettings.Controls.Add(this.Label28); @@ -2659,60 +2715,6 @@ namespace ShiftOS.WinForms.Applications this.Label1.Text = "Pixel Setter Settings"; this.Label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // - // pnlmagnifiersettings - // - this.pnlmagnifiersettings.Controls.Add(this.btnzoomout); - this.pnlmagnifiersettings.Controls.Add(this.btnzoomin); - this.pnlmagnifiersettings.Controls.Add(this.lblzoomlevel); - this.pnlmagnifiersettings.Controls.Add(this.Label7); - this.pnlmagnifiersettings.Location = new System.Drawing.Point(78, 50); - this.pnlmagnifiersettings.Name = "pnlmagnifiersettings"; - this.pnlmagnifiersettings.Size = new System.Drawing.Size(67, 44); - this.pnlmagnifiersettings.TabIndex = 6; - this.pnlmagnifiersettings.Visible = false; - // - // btnzoomout - // - this.btnzoomout.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnzoomout.Location = new System.Drawing.Point(16, 33); - this.btnzoomout.Name = "btnzoomout"; - this.btnzoomout.Size = new System.Drawing.Size(129, 56); - this.btnzoomout.TabIndex = 11; - this.btnzoomout.Text = "-"; - this.btnzoomout.UseVisualStyleBackColor = true; - this.btnzoomout.Click += new System.EventHandler(this.btnzoomout_Click); - // - // btnzoomin - // - this.btnzoomin.Font = new System.Drawing.Font("Microsoft Sans Serif", 27.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btnzoomin.Location = new System.Drawing.Point(313, 33); - this.btnzoomin.Name = "btnzoomin"; - this.btnzoomin.Size = new System.Drawing.Size(129, 56); - this.btnzoomin.TabIndex = 10; - this.btnzoomin.Text = "+"; - this.btnzoomin.UseVisualStyleBackColor = true; - this.btnzoomin.Click += new System.EventHandler(this.btnzoomin_Click); - // - // lblzoomlevel - // - this.lblzoomlevel.Font = new System.Drawing.Font("Microsoft Sans Serif", 36F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lblzoomlevel.Location = new System.Drawing.Point(151, 33); - this.lblzoomlevel.Name = "lblzoomlevel"; - this.lblzoomlevel.Size = new System.Drawing.Size(156, 56); - this.lblzoomlevel.TabIndex = 1; - this.lblzoomlevel.Text = "1X"; - this.lblzoomlevel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // - // Label7 - // - this.Label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label7.Location = new System.Drawing.Point(6, 3); - this.Label7.Name = "Label7"; - this.Label7.Size = new System.Drawing.Size(444, 23); - this.Label7.TabIndex = 0; - this.Label7.Text = "Magnifier Settings"; - this.Label7.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - // // pnlfloodfillsettings // this.pnlfloodfillsettings.Controls.Add(this.Label12); @@ -3227,28 +3229,28 @@ namespace ShiftOS.WinForms.Applications // gENNEWToolStripMenuItem // this.gENNEWToolStripMenuItem.Name = "gENNEWToolStripMenuItem"; - this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.gENNEWToolStripMenuItem.Text = "{GEN_NEW}"; this.gENNEWToolStripMenuItem.Click += new System.EventHandler(this.btnnew_Click); // // gENLOADToolStripMenuItem // this.gENLOADToolStripMenuItem.Name = "gENLOADToolStripMenuItem"; - this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.gENLOADToolStripMenuItem.Text = "{GEN_LOAD}"; this.gENLOADToolStripMenuItem.Click += new System.EventHandler(this.btnopen_Click); // // gENSAVEToolStripMenuItem // this.gENSAVEToolStripMenuItem.Name = "gENSAVEToolStripMenuItem"; - this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.gENSAVEToolStripMenuItem.Text = "{GEN_SAVE}"; this.gENSAVEToolStripMenuItem.Click += new System.EventHandler(this.btnsave_Click); // // gENEXITToolStripMenuItem // this.gENEXITToolStripMenuItem.Name = "gENEXITToolStripMenuItem"; - this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(141, 22); this.gENEXITToolStripMenuItem.Text = "{GEN_EXIT}"; // // editToolStripMenuItem @@ -3291,37 +3293,41 @@ namespace ShiftOS.WinForms.Applications this.toolStripMenuItem5, this.moreControlsToolStripMenuItem}); this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem"; - this.zoomToolStripMenuItem.Size = new System.Drawing.Size(106, 22); + this.zoomToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.zoomToolStripMenuItem.Text = "Zoom"; // // toolStripMenuItem2 // this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(148, 22); + this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22); this.toolStripMenuItem2.Text = "25%"; + this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); // // toolStripMenuItem3 // this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(148, 22); + this.toolStripMenuItem3.Size = new System.Drawing.Size(152, 22); this.toolStripMenuItem3.Text = "50%"; + this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(148, 22); + this.toolStripMenuItem4.Size = new System.Drawing.Size(152, 22); this.toolStripMenuItem4.Text = "100%"; + this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click); // // toolStripMenuItem5 // this.toolStripMenuItem5.Name = "toolStripMenuItem5"; - this.toolStripMenuItem5.Size = new System.Drawing.Size(148, 22); + this.toolStripMenuItem5.Size = new System.Drawing.Size(152, 22); this.toolStripMenuItem5.Text = "200%"; + this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click); // // moreControlsToolStripMenuItem // this.moreControlsToolStripMenuItem.Name = "moreControlsToolStripMenuItem"; - this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(148, 22); + this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); this.moreControlsToolStripMenuItem.Text = "More controls"; this.moreControlsToolStripMenuItem.Click += new System.EventHandler(this.btnmagnify_Click); // @@ -3348,6 +3354,7 @@ namespace ShiftOS.WinForms.Applications this.flowcolours.ResumeLayout(false); this.pnltoolproperties.ResumeLayout(false); this.pnltoolproperties.PerformLayout(); + this.pnlmagnifiersettings.ResumeLayout(false); this.pnleracertoolsettings.ResumeLayout(false); this.pnleracertoolsettings.PerformLayout(); this.pnlpixelplacersettings.ResumeLayout(false); @@ -3361,7 +3368,6 @@ namespace ShiftOS.WinForms.Applications this.pnltexttoolsettings.PerformLayout(); this.pnlpixelsettersettings.ResumeLayout(false); this.pnlpixelsettersettings.PerformLayout(); - this.pnlmagnifiersettings.ResumeLayout(false); this.pnlfloodfillsettings.ResumeLayout(false); this.pnlsquaretoolsettings.ResumeLayout(false); this.pnlsquaretoolsettings.PerformLayout(); diff --git a/ShiftOS.WinForms/Applications/Artpad.cs b/ShiftOS.WinForms/Applications/Artpad.cs index 6511420..af56f3c 100644 --- a/ShiftOS.WinForms/Applications/Artpad.cs +++ b/ShiftOS.WinForms/Applications/Artpad.cs @@ -93,8 +93,8 @@ namespace ShiftOS.WinForms.Applications Color canvascolor = Color.White; Bitmap previewcanvasbitmap; - int magnificationlevel = 1; - Rectangle magnifyRect; + float magnificationlevel = 1; + RectangleF magnifyRect; Graphics graphicsbitmap; public Color drawingcolour = Color.Black; string selectedtool = "Pixel Setter"; @@ -103,7 +103,7 @@ namespace ShiftOS.WinForms.Applications System.Drawing.Drawing2D.GraphicsPath mousePath = new System.Drawing.Drawing2D.GraphicsPath(); int pencilwidth = 1; undo undo = new undo(); - Point thisPoint; + PointF thisPoint; int eracerwidth = 15; string eracertype = "square"; @@ -373,8 +373,8 @@ namespace ShiftOS.WinForms.Applications undo.redoStack.Clear(); - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; if (selectedtool == "Pixel Placer") { @@ -384,7 +384,7 @@ namespace ShiftOS.WinForms.Applications { if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) { - canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + canvasbitmap.SetPixel((int)thisPoint.X, (int)thisPoint.Y, drawingcolour); //set the pixel on the canvas picdrawingdisplay.Invalidate(); //refresh the picture from the canvas @@ -410,7 +410,7 @@ namespace ShiftOS.WinForms.Applications { if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) { - SafeFloodFill(canvasbitmap, thisPoint.X, thisPoint.Y, drawingcolour); + SafeFloodFill(canvasbitmap, (int)thisPoint.X, (int)thisPoint.Y, drawingcolour); graphicsbitmap = Graphics.FromImage(canvasbitmap); picdrawingdisplay.Invalidate(); } @@ -496,10 +496,10 @@ namespace ShiftOS.WinForms.Applications // ERROR: Handles clauses are not supported in C# private void picdrawingdisplay_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) { - Point lastpoint; + PointF lastpoint; - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; if (e.Button == MouseButtons.Left) @@ -514,7 +514,8 @@ namespace ShiftOS.WinForms.Applications { if (thisPoint.Y < canvasbitmap.Height && thisPoint.Y > -1) { - canvasbitmap.SetPixel(thisPoint.X, thisPoint.Y, drawingcolour); + //NO, NO, NO... Please don't tell me you're using SetPixel()... Whatever... + canvasbitmap.SetPixel((int)thisPoint.X, (int)thisPoint.Y, drawingcolour); //set the pixel on the canvas picdrawingdisplay.Invalidate(); //refresh the picture from the canvas @@ -587,8 +588,8 @@ namespace ShiftOS.WinForms.Applications // ERROR: Handles clauses are not supported in C# private void picdrawingdisplay_MouseUp(object sender, MouseEventArgs e) { - thisPoint.X = (int)(e.Location.X - (magnificationlevel / 2)) / magnificationlevel; - thisPoint.Y = (int)(e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.X = (e.Location.X - (magnificationlevel / 2)) / magnificationlevel; + thisPoint.Y = (e.Location.Y - (magnificationlevel / 2)) / magnificationlevel; if (selectedtool == "Pencil") { @@ -689,7 +690,7 @@ namespace ShiftOS.WinForms.Applications // ERROR: Handles clauses are not supported in C# private void btnzoomout_Click(object sender, EventArgs e) { - if (magnificationlevel > 1) + if (magnificationlevel > 0) { magnificationlevel /= 2; pnldrawingbackground.AutoScrollPosition = new Point(0, 0); @@ -704,16 +705,16 @@ namespace ShiftOS.WinForms.Applications private void setmagnification() { - magnifyRect.Width = (int)canvaswidth / magnificationlevel; - magnifyRect.Height = (int)canvasheight / magnificationlevel; - picdrawingdisplay.Size = new Size(canvaswidth * magnificationlevel, canvasheight * magnificationlevel); + magnifyRect.Width = canvaswidth / magnificationlevel; + magnifyRect.Height = canvasheight / magnificationlevel; + picdrawingdisplay.Size = new Size((int)(canvaswidth * magnificationlevel), (int)(canvasheight * magnificationlevel)); if (picdrawingdisplay.Height > 468 && picdrawingdisplay.Width > 676) { picdrawingdisplay.Location = new Point(0, 0); } else { - picdrawingdisplay.Location = new Point((pnldrawingbackground.Width - canvaswidth * magnificationlevel) / 2, (pnldrawingbackground.Height - canvasheight * magnificationlevel) / 2); + picdrawingdisplay.CenterParent(); } picdrawingdisplay.Invalidate(); lblzoomlevel.Text = magnificationlevel + "X"; @@ -1561,6 +1562,33 @@ namespace ShiftOS.WinForms.Applications public void OnUpgrade() { } + + private void toolStripMenuItem2_Click(object sender, EventArgs e) + { + magnificationlevel = 0.25f; + setmagnification(); + } + + private void toolStripMenuItem3_Click(object sender, EventArgs e) + { + magnificationlevel = 0.5f; + setmagnification(); + + } + + private void toolStripMenuItem4_Click(object sender, EventArgs e) + { + magnificationlevel = 1; + setmagnification(); + + } + + private void toolStripMenuItem5_Click(object sender, EventArgs e) + { + magnificationlevel = 200f; + setmagnification(); + + } } public class undo -- cgit v1.2.3 From 472b658c22ba4b19bb49420d5b24d785c6e15655 Mon Sep 17 00:00:00 2001 From: wowmom98 Date: Tue, 20 Jun 2017 22:03:44 +0000 Subject: some ui changes for artpad --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 111 ++++++++++++----------- 1 file changed, 56 insertions(+), 55 deletions(-) (limited to 'ShiftOS.WinForms/Applications/Artpad.Designer.cs') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index f6d41ec..c5a313d 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -369,7 +369,7 @@ namespace ShiftOS.WinForms.Applications this.pnldrawingbackground.Dock = System.Windows.Forms.DockStyle.Fill; this.pnldrawingbackground.Location = new System.Drawing.Point(120, 0); this.pnldrawingbackground.Name = "pnldrawingbackground"; - this.pnldrawingbackground.Size = new System.Drawing.Size(682, 450); + this.pnldrawingbackground.Size = new System.Drawing.Size(682, 474); this.pnldrawingbackground.TabIndex = 2; // // pnlinitialcanvassettings @@ -382,17 +382,17 @@ namespace ShiftOS.WinForms.Applications this.pnlinitialcanvassettings.Controls.Add(this.Label10); this.pnlinitialcanvassettings.Controls.Add(this.txtnewcanvaswidth); this.pnlinitialcanvassettings.Controls.Add(this.Label9); - this.pnlinitialcanvassettings.Location = new System.Drawing.Point(194, 174); + this.pnlinitialcanvassettings.Location = new System.Drawing.Point(144, 137); this.pnlinitialcanvassettings.Name = "pnlinitialcanvassettings"; - this.pnlinitialcanvassettings.Size = new System.Drawing.Size(223, 100); + this.pnlinitialcanvassettings.Size = new System.Drawing.Size(326, 160); this.pnlinitialcanvassettings.TabIndex = 1; // // btncreate // this.btncreate.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btncreate.Location = new System.Drawing.Point(114, 66); + this.btncreate.Location = new System.Drawing.Point(196, 93); this.btncreate.Name = "btncreate"; - this.btncreate.Size = new System.Drawing.Size(102, 28); + this.btncreate.Size = new System.Drawing.Size(115, 50); this.btncreate.TabIndex = 6; this.btncreate.Text = "Create"; this.btncreate.UseVisualStyleBackColor = true; @@ -401,19 +401,19 @@ namespace ShiftOS.WinForms.Applications // Label11 // this.Label11.AutoSize = true; - this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label11.Location = new System.Drawing.Point(124, 9); + this.Label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 14F); + this.Label11.Location = new System.Drawing.Point(200, 7); this.Label11.Name = "Label11"; - this.Label11.Size = new System.Drawing.Size(88, 20); + this.Label11.Size = new System.Drawing.Size(106, 24); this.Label11.TabIndex = 5; this.Label11.Text = "Total Pixels"; // // lbltotalpixels // - this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 18F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lbltotalpixels.Location = new System.Drawing.Point(114, 30); + this.lbltotalpixels.Font = new System.Drawing.Font("Microsoft Sans Serif", 22F); + this.lbltotalpixels.Location = new System.Drawing.Point(181, 31); this.lbltotalpixels.Name = "lbltotalpixels"; - this.lbltotalpixels.Size = new System.Drawing.Size(106, 29); + this.lbltotalpixels.Size = new System.Drawing.Size(143, 56); this.lbltotalpixels.TabIndex = 4; this.lbltotalpixels.Text = "0"; this.lbltotalpixels.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -422,11 +422,11 @@ namespace ShiftOS.WinForms.Applications // this.txtnewcanvasheight.BackColor = System.Drawing.Color.White; this.txtnewcanvasheight.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtnewcanvasheight.Location = new System.Drawing.Point(59, 37); + this.txtnewcanvasheight.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.txtnewcanvasheight.Location = new System.Drawing.Point(82, 93); this.txtnewcanvasheight.MaxLength = 4; this.txtnewcanvasheight.Name = "txtnewcanvasheight"; - this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvasheight.Size = new System.Drawing.Size(54, 26); this.txtnewcanvasheight.TabIndex = 3; this.txtnewcanvasheight.Text = "0"; this.txtnewcanvasheight.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); @@ -434,10 +434,10 @@ namespace ShiftOS.WinForms.Applications // Label10 // this.Label10.AutoSize = true; - this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label10.Location = new System.Drawing.Point(8, 40); + this.Label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); + this.Label10.Location = new System.Drawing.Point(7, 91); this.Label10.Name = "Label10"; - this.Label10.Size = new System.Drawing.Size(50, 16); + this.Label10.Size = new System.Drawing.Size(74, 25); this.Label10.TabIndex = 2; this.Label10.Text = "Height:"; // @@ -445,11 +445,11 @@ namespace ShiftOS.WinForms.Applications // this.txtnewcanvaswidth.BackColor = System.Drawing.Color.White; this.txtnewcanvaswidth.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.txtnewcanvaswidth.Location = new System.Drawing.Point(59, 9); + this.txtnewcanvaswidth.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F); + this.txtnewcanvaswidth.Location = new System.Drawing.Point(82, 41); this.txtnewcanvaswidth.MaxLength = 4; this.txtnewcanvaswidth.Name = "txtnewcanvaswidth"; - this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 22); + this.txtnewcanvaswidth.Size = new System.Drawing.Size(54, 26); this.txtnewcanvaswidth.TabIndex = 1; this.txtnewcanvaswidth.Text = "0"; this.txtnewcanvaswidth.TextChanged += new System.EventHandler(this.txtnewcanvaswidth_TextChanged); @@ -457,10 +457,10 @@ namespace ShiftOS.WinForms.Applications // Label9 // this.Label9.AutoSize = true; - this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label9.Location = new System.Drawing.Point(8, 12); + this.Label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F); + this.Label9.Location = new System.Drawing.Point(7, 39); this.Label9.Name = "Label9"; - this.Label9.Size = new System.Drawing.Size(45, 16); + this.Label9.Size = new System.Drawing.Size(69, 25); this.Label9.TabIndex = 0; this.Label9.Text = "Width:"; // @@ -602,9 +602,9 @@ namespace ShiftOS.WinForms.Applications this.pnlbottompanel.Controls.Add(this.pnlpallet); this.pnlbottompanel.Controls.Add(this.pnltoolproperties); this.pnlbottompanel.Dock = System.Windows.Forms.DockStyle.Bottom; - this.pnlbottompanel.Location = new System.Drawing.Point(120, 450); + this.pnlbottompanel.Location = new System.Drawing.Point(120, 474); this.pnlbottompanel.Name = "pnlbottompanel"; - this.pnlbottompanel.Size = new System.Drawing.Size(682, 124); + this.pnlbottompanel.Size = new System.Drawing.Size(682, 100); this.pnlbottompanel.TabIndex = 1; // // pnlpallet @@ -618,15 +618,15 @@ namespace ShiftOS.WinForms.Applications this.pnlpallet.Controls.Add(this.line6); this.pnlpallet.Location = new System.Drawing.Point(457, 0); this.pnlpallet.Name = "pnlpallet"; - this.pnlpallet.Size = new System.Drawing.Size(225, 124); + this.pnlpallet.Size = new System.Drawing.Size(225, 100); this.pnlpallet.TabIndex = 0; // // label44 // this.label44.Dock = System.Windows.Forms.DockStyle.Fill; - this.label44.Location = new System.Drawing.Point(0, 24); + this.label44.Location = new System.Drawing.Point(0, 16); this.label44.Name = "label44"; - this.label44.Size = new System.Drawing.Size(225, 27); + this.label44.Size = new System.Drawing.Size(225, 11); this.label44.TabIndex = 13; this.label44.Text = "Left click to select, right click to change color"; this.label44.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -762,7 +762,7 @@ namespace ShiftOS.WinForms.Applications this.flowcolours.Controls.Add(this.colourpallet127); this.flowcolours.Controls.Add(this.colourpallet128); this.flowcolours.Dock = System.Windows.Forms.DockStyle.Bottom; - this.flowcolours.Location = new System.Drawing.Point(0, 51); + this.flowcolours.Location = new System.Drawing.Point(0, 27); this.flowcolours.Name = "flowcolours"; this.flowcolours.Padding = new System.Windows.Forms.Padding(1, 1, 0, 0); this.flowcolours.Size = new System.Drawing.Size(225, 73); @@ -2054,10 +2054,11 @@ namespace ShiftOS.WinForms.Applications this.Label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label4.Location = new System.Drawing.Point(0, 1); this.Label4.Name = "Label4"; - this.Label4.Size = new System.Drawing.Size(225, 23); + this.Label4.Size = new System.Drawing.Size(225, 15); this.Label4.TabIndex = 11; - this.Label4.Text = "Colours"; + this.Label4.Text = "Colors"; this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.Label4.Click += new System.EventHandler(this.Label4_Click); // // line6 // @@ -2174,7 +2175,7 @@ namespace ShiftOS.WinForms.Applications this.btneracersquare.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadsquarerubberselected; this.btneracersquare.FlatAppearance.BorderSize = 0; this.btneracersquare.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracersquare.Location = new System.Drawing.Point(75, 21); + this.btneracersquare.Location = new System.Drawing.Point(75, 15); this.btneracersquare.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); this.btneracersquare.Name = "btneracersquare"; this.btneracersquare.Size = new System.Drawing.Size(60, 50); @@ -2188,7 +2189,7 @@ namespace ShiftOS.WinForms.Applications this.btneracercircle.BackgroundImage = global::ShiftOS.WinForms.Properties.Resources.ArtPadcirclerubber; this.btneracercircle.FlatAppearance.BorderSize = 0; this.btneracercircle.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracercircle.Location = new System.Drawing.Point(9, 21); + this.btneracercircle.Location = new System.Drawing.Point(9, 15); this.btneracercircle.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); this.btneracercircle.Name = "btneracercircle"; this.btneracercircle.Size = new System.Drawing.Size(60, 50); @@ -2200,9 +2201,9 @@ namespace ShiftOS.WinForms.Applications // Label24 // this.Label24.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.Label24.Location = new System.Drawing.Point(141, 29); + this.Label24.Location = new System.Drawing.Point(141, 25); this.Label24.Name = "Label24"; - this.Label24.Size = new System.Drawing.Size(314, 38); + this.Label24.Size = new System.Drawing.Size(314, 35); this.Label24.TabIndex = 15; this.Label24.Text = "Choose a shape and size for your eracer then rub out unwanted parts of your drawi" + "ng with the mouse."; @@ -2213,7 +2214,7 @@ namespace ShiftOS.WinForms.Applications this.txteracersize.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.txteracersize.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.txteracersize.ForeColor = System.Drawing.Color.Black; - this.txteracersize.Location = new System.Drawing.Point(198, 70); + this.txteracersize.Location = new System.Drawing.Point(198, 69); this.txteracersize.Name = "txteracersize"; this.txteracersize.Size = new System.Drawing.Size(73, 26); this.txteracersize.TabIndex = 12; @@ -2234,7 +2235,7 @@ namespace ShiftOS.WinForms.Applications this.Label27.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Label27.Location = new System.Drawing.Point(6, 3); this.Label27.Name = "Label27"; - this.Label27.Size = new System.Drawing.Size(444, 23); + this.Label27.Size = new System.Drawing.Size(444, 18); this.Label27.TabIndex = 0; this.Label27.Text = "Eraser Tool Settings"; this.Label27.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; @@ -2946,8 +2947,8 @@ namespace ShiftOS.WinForms.Applications this.pnltoolpositioner.Controls.Add(this.btnsquare); this.pnltoolpositioner.Controls.Add(this.btnlinetool); this.pnltoolpositioner.Controls.Add(this.btnpaintbrush); - this.pnltoolpositioner.Controls.Add(this.btntexttool); this.pnltoolpositioner.Controls.Add(this.btneracer); + this.pnltoolpositioner.Controls.Add(this.btntexttool); this.pnltoolpositioner.Dock = System.Windows.Forms.DockStyle.Fill; this.pnltoolpositioner.Location = new System.Drawing.Point(0, 0); this.pnltoolpositioner.Name = "pnltoolpositioner"; @@ -3084,7 +3085,7 @@ namespace ShiftOS.WinForms.Applications this.btntexttool.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.btntexttool.FlatAppearance.BorderSize = 0; this.btntexttool.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btntexttool.Location = new System.Drawing.Point(6, 230); + this.btntexttool.Location = new System.Drawing.Point(62, 230); this.btntexttool.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); this.btntexttool.Name = "btntexttool"; this.btntexttool.Size = new System.Drawing.Size(50, 50); @@ -3100,7 +3101,7 @@ namespace ShiftOS.WinForms.Applications this.btneracer.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.btneracer.FlatAppearance.BorderSize = 0; this.btneracer.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.btneracer.Location = new System.Drawing.Point(62, 230); + this.btneracer.Location = new System.Drawing.Point(6, 230); this.btneracer.Margin = new System.Windows.Forms.Padding(6, 6, 0, 0); this.btneracer.Name = "btneracer"; this.btneracer.Size = new System.Drawing.Size(50, 50); @@ -3223,34 +3224,34 @@ namespace ShiftOS.WinForms.Applications this.gENSAVEToolStripMenuItem, this.gENEXITToolStripMenuItem}); this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; - this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 20); + this.fileToolStripMenuItem.Size = new System.Drawing.Size(35, 20); this.fileToolStripMenuItem.Text = "File"; // // gENNEWToolStripMenuItem // this.gENNEWToolStripMenuItem.Name = "gENNEWToolStripMenuItem"; - this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENNEWToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.gENNEWToolStripMenuItem.Text = "{GEN_NEW}"; this.gENNEWToolStripMenuItem.Click += new System.EventHandler(this.btnnew_Click); // // gENLOADToolStripMenuItem // this.gENLOADToolStripMenuItem.Name = "gENLOADToolStripMenuItem"; - this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENLOADToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.gENLOADToolStripMenuItem.Text = "{GEN_LOAD}"; this.gENLOADToolStripMenuItem.Click += new System.EventHandler(this.btnopen_Click); // // gENSAVEToolStripMenuItem // this.gENSAVEToolStripMenuItem.Name = "gENSAVEToolStripMenuItem"; - this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENSAVEToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.gENSAVEToolStripMenuItem.Text = "{GEN_SAVE}"; this.gENSAVEToolStripMenuItem.Click += new System.EventHandler(this.btnsave_Click); // // gENEXITToolStripMenuItem // this.gENEXITToolStripMenuItem.Name = "gENEXITToolStripMenuItem"; - this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(141, 22); + this.gENEXITToolStripMenuItem.Size = new System.Drawing.Size(140, 22); this.gENEXITToolStripMenuItem.Text = "{GEN_EXIT}"; // // editToolStripMenuItem @@ -3259,20 +3260,20 @@ namespace ShiftOS.WinForms.Applications this.undoToolStripMenuItem, this.redoToolStripMenuItem}); this.editToolStripMenuItem.Name = "editToolStripMenuItem"; - this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 20); + this.editToolStripMenuItem.Size = new System.Drawing.Size(37, 20); this.editToolStripMenuItem.Text = "Edit"; // // undoToolStripMenuItem // this.undoToolStripMenuItem.Name = "undoToolStripMenuItem"; - this.undoToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.undoToolStripMenuItem.Size = new System.Drawing.Size(100, 22); this.undoToolStripMenuItem.Text = "Undo"; this.undoToolStripMenuItem.Click += new System.EventHandler(this.btnundo_Click); // // redoToolStripMenuItem // this.redoToolStripMenuItem.Name = "redoToolStripMenuItem"; - this.redoToolStripMenuItem.Size = new System.Drawing.Size(103, 22); + this.redoToolStripMenuItem.Size = new System.Drawing.Size(100, 22); this.redoToolStripMenuItem.Text = "Redo"; this.redoToolStripMenuItem.Click += new System.EventHandler(this.btnredo_Click); // @@ -3281,7 +3282,7 @@ namespace ShiftOS.WinForms.Applications this.viewToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.zoomToolStripMenuItem}); this.viewToolStripMenuItem.Name = "viewToolStripMenuItem"; - this.viewToolStripMenuItem.Size = new System.Drawing.Size(44, 20); + this.viewToolStripMenuItem.Size = new System.Drawing.Size(42, 20); this.viewToolStripMenuItem.Text = "View"; // // zoomToolStripMenuItem @@ -3293,41 +3294,41 @@ namespace ShiftOS.WinForms.Applications this.toolStripMenuItem5, this.moreControlsToolStripMenuItem}); this.zoomToolStripMenuItem.Name = "zoomToolStripMenuItem"; - this.zoomToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.zoomToolStripMenuItem.Size = new System.Drawing.Size(101, 22); this.zoomToolStripMenuItem.Text = "Zoom"; // // toolStripMenuItem2 // this.toolStripMenuItem2.Name = "toolStripMenuItem2"; - this.toolStripMenuItem2.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem2.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem2.Text = "25%"; this.toolStripMenuItem2.Click += new System.EventHandler(this.toolStripMenuItem2_Click); // // toolStripMenuItem3 // this.toolStripMenuItem3.Name = "toolStripMenuItem3"; - this.toolStripMenuItem3.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem3.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem3.Text = "50%"; this.toolStripMenuItem3.Click += new System.EventHandler(this.toolStripMenuItem3_Click); // // toolStripMenuItem4 // this.toolStripMenuItem4.Name = "toolStripMenuItem4"; - this.toolStripMenuItem4.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem4.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem4.Text = "100%"; this.toolStripMenuItem4.Click += new System.EventHandler(this.toolStripMenuItem4_Click); // // toolStripMenuItem5 // this.toolStripMenuItem5.Name = "toolStripMenuItem5"; - this.toolStripMenuItem5.Size = new System.Drawing.Size(152, 22); + this.toolStripMenuItem5.Size = new System.Drawing.Size(138, 22); this.toolStripMenuItem5.Text = "200%"; this.toolStripMenuItem5.Click += new System.EventHandler(this.toolStripMenuItem5_Click); // // moreControlsToolStripMenuItem // this.moreControlsToolStripMenuItem.Name = "moreControlsToolStripMenuItem"; - this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.moreControlsToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.moreControlsToolStripMenuItem.Text = "More controls"; this.moreControlsToolStripMenuItem.Click += new System.EventHandler(this.btnmagnify_Click); // -- cgit v1.2.3 From 153057c7be952a94ab63a790662a10eee7b68e3d Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 20 Jun 2017 18:53:28 -0400 Subject: Opt-in multistate borders --- ShiftOS.WinForms/Applications/Artpad.Designer.cs | 1 - ShiftOS.WinForms/WindowBorder.cs | 132 +++++++++++++---------- ShiftOS_TheReturn/Skinning.cs | 7 ++ 3 files changed, 80 insertions(+), 60 deletions(-) (limited to 'ShiftOS.WinForms/Applications/Artpad.Designer.cs') diff --git a/ShiftOS.WinForms/Applications/Artpad.Designer.cs b/ShiftOS.WinForms/Applications/Artpad.Designer.cs index c5a313d..f30839a 100644 --- a/ShiftOS.WinForms/Applications/Artpad.Designer.cs +++ b/ShiftOS.WinForms/Applications/Artpad.Designer.cs @@ -2058,7 +2058,6 @@ namespace ShiftOS.WinForms.Applications this.Label4.TabIndex = 11; this.Label4.Text = "Colors"; this.Label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; - this.Label4.Click += new System.EventHandler(this.Label4_Click); // // line6 // diff --git a/ShiftOS.WinForms/WindowBorder.cs b/ShiftOS.WinForms/WindowBorder.cs index 7aefd42..0ee1289 100644 --- a/ShiftOS.WinForms/WindowBorder.cs +++ b/ShiftOS.WinForms/WindowBorder.cs @@ -262,6 +262,74 @@ namespace ShiftOS.WinForms } } + public void SetDefaultBorders() + { + pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebar"); + pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; + pnltitleleft.BackgroundImage = GetImage("titleleft"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); + pnltitleright.BackgroundImage = GetImage("titleright"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); + pnltitle.BackgroundImageLayout = GetImageLayout("titlebar"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? + + pnlleft.BackColor = LoadedSkin.BorderLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborder"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); + + pnlright.BackColor = LoadedSkin.BorderRightBackground; + pnlright.BackgroundImage = GetImage("rightborder"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); + + pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborder"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); + + pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborder"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); + + pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborder"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + + } + + public void SetInactiveBorders() + { + pnltitle.BackColor = LoadedSkin.TitleInactiveBackgroundColor; + pnltitle.BackgroundImage = GetImage("titlebarinactive"); + pnltitleleft.BackColor = LoadedSkin.TitleInactiveLeftCornerBackground; + pnltitleright.BackColor = LoadedSkin.TitleInactiveRightCornerBackground; + pnltitleleft.BackgroundImage = GetImage("titleleftinactive"); + pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleftinactive"); + pnltitleright.BackgroundImage = GetImage("titlerightinactive"); + pnltitleright.BackgroundImageLayout = GetImageLayout("titlerightinactive"); + pnltitle.BackgroundImageLayout = GetImageLayout("titlebarinactive"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? + + pnlleft.BackColor = LoadedSkin.BorderInactiveLeftBackground; + pnlleft.BackgroundImage = GetImage("leftborderinactive"); + pnlleft.BackgroundImageLayout = GetImageLayout("leftborderinactive"); + + pnlright.BackColor = LoadedSkin.BorderInactiveRightBackground; + pnlright.BackgroundImage = GetImage("rightborderinactive"); + pnlright.BackgroundImageLayout = GetImageLayout("rightborderinactive"); + + pnlbottom.BackColor = LoadedSkin.BorderInactiveBottomBackground; + pnlbottom.BackgroundImage = GetImage("bottomborderinactive"); + pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborderinactive"); + + pnlbottomr.BackColor = LoadedSkin.BorderInactiveBottomRightBackground; + pnlbottomr.BackgroundImage = GetImage("bottomrborderinactive"); + pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborderinactive"); + + pnlbottoml.BackColor = LoadedSkin.BorderInactiveBottomLeftBackground; + pnlbottoml.BackgroundImage = GetImage("bottomlborderinactive"); + pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborderinactive"); + + } + /// /// Setups the skin. /// @@ -271,68 +339,14 @@ namespace ShiftOS.WinForms //Border colors and images... if (IsFocused) { - pnltitle.BackColor = LoadedSkin.TitleBackgroundColor; - pnltitle.BackgroundImage = GetImage("titlebar"); - pnltitleleft.BackColor = LoadedSkin.TitleLeftCornerBackground; - pnltitleright.BackColor = LoadedSkin.TitleRightCornerBackground; - pnltitleleft.BackgroundImage = GetImage("titleleft"); - pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleft"); - pnltitleright.BackgroundImage = GetImage("titleright"); - pnltitleright.BackgroundImageLayout = GetImageLayout("titleright"); - pnltitle.BackgroundImageLayout = GetImageLayout("titlebar"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? - - pnlleft.BackColor = LoadedSkin.BorderLeftBackground; - pnlleft.BackgroundImage = GetImage("leftborder"); - pnlleft.BackgroundImageLayout = GetImageLayout("leftborder"); - - pnlright.BackColor = LoadedSkin.BorderRightBackground; - pnlright.BackgroundImage = GetImage("rightborder"); - pnlright.BackgroundImageLayout = GetImageLayout("rightborder"); - - pnlbottom.BackColor = LoadedSkin.BorderBottomBackground; - pnlbottom.BackgroundImage = GetImage("bottomborder"); - pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborder"); - - pnlbottomr.BackColor = LoadedSkin.BorderBottomRightBackground; - pnlbottomr.BackgroundImage = GetImage("bottomrborder"); - pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborder"); - - pnlbottoml.BackColor = LoadedSkin.BorderBottomLeftBackground; - pnlbottoml.BackgroundImage = GetImage("bottomlborder"); - pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborder"); + SetDefaultBorders(); } else { - pnltitle.BackColor = LoadedSkin.TitleInactiveBackgroundColor; - pnltitle.BackgroundImage = GetImage("titlebarinactive"); - pnltitleleft.BackColor = LoadedSkin.TitleInactiveLeftCornerBackground; - pnltitleright.BackColor = LoadedSkin.TitleInactiveRightCornerBackground; - pnltitleleft.BackgroundImage = GetImage("titleleftinactive"); - pnltitleleft.BackgroundImageLayout = GetImageLayout("titleleftinactive"); - pnltitleright.BackgroundImage = GetImage("titlerightinactive"); - pnltitleright.BackgroundImageLayout = GetImageLayout("titlerightinactive"); - pnltitle.BackgroundImageLayout = GetImageLayout("titlebarinactive"); //RETARD ALERT. WHY WASN'T THIS THERE WHEN IMAGELAYOUTS WERE FIRST IMPLEMENTED? - - pnlleft.BackColor = LoadedSkin.BorderInactiveLeftBackground; - pnlleft.BackgroundImage = GetImage("leftborderinactive"); - pnlleft.BackgroundImageLayout = GetImageLayout("leftborderinactive"); - - pnlright.BackColor = LoadedSkin.BorderInactiveRightBackground; - pnlright.BackgroundImage = GetImage("rightborderinactive"); - pnlright.BackgroundImageLayout = GetImageLayout("rightborderinactive"); - - pnlbottom.BackColor = LoadedSkin.BorderInactiveBottomBackground; - pnlbottom.BackgroundImage = GetImage("bottomborderinactive"); - pnlbottom.BackgroundImageLayout = GetImageLayout("bottomborderinactive"); - - pnlbottomr.BackColor = LoadedSkin.BorderInactiveBottomRightBackground; - pnlbottomr.BackgroundImage = GetImage("bottomrborderinactive"); - pnlbottomr.BackgroundImageLayout = GetImageLayout("bottomrborderinactive"); - - pnlbottoml.BackColor = LoadedSkin.BorderInactiveBottomLeftBackground; - pnlbottoml.BackgroundImage = GetImage("bottomlborderinactive"); - pnlbottoml.BackgroundImageLayout = GetImageLayout("bottomlborderinactive"); - + if (LoadedSkin.RenderInactiveBorders) + SetInactiveBorders(); + else + SetDefaultBorders(); } diff --git a/ShiftOS_TheReturn/Skinning.cs b/ShiftOS_TheReturn/Skinning.cs index e0a1a2b..656da30 100644 --- a/ShiftOS_TheReturn/Skinning.cs +++ b/ShiftOS_TheReturn/Skinning.cs @@ -634,6 +634,13 @@ namespace ShiftOS.Engine [ShifterDescription("The background color for the bottom border when the window is inactive.")] public Color BorderInactiveBottomBackground = DefaultBackground; + [ShifterMeta("Windows")] + [ShifterCategory("Window border")] + [ShifterName("Use Inactive Border Assets?")] + [RequiresUpgrade("shift_window_borders;shift_states")] + [ShifterDescription("Do you want to use separate colors and images for inactive Window Borders?")] + public bool RenderInactiveBorders = false; + [ShifterMeta("Desktop")] [ShifterCategory("Panel buttons")] -- cgit v1.2.3