From f339acf3803257cc82efdf4b995e4b84ad3ab076 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Sat, 20 Dec 2014 20:28:07 +0800 Subject: [PATCH] fix qrcode on high dpi --- .../View/QRCodeForm.Designer.cs | 33 ++++++------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/shadowsocks-csharp/View/QRCodeForm.Designer.cs b/shadowsocks-csharp/View/QRCodeForm.Designer.cs index 5bebca56..89a07907 100755 --- a/shadowsocks-csharp/View/QRCodeForm.Designer.cs +++ b/shadowsocks-csharp/View/QRCodeForm.Designer.cs @@ -29,49 +29,37 @@ private void InitializeComponent() { this.pictureBox1 = new System.Windows.Forms.PictureBox(); - this.panel1 = new System.Windows.Forms.Panel(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.panel1.SuspendLayout(); this.SuspendLayout(); // // pictureBox1 // - this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.pictureBox1.Location = new System.Drawing.Point(10, 10); + this.pictureBox1.Location = new System.Drawing.Point(9, 9); this.pictureBox1.Margin = new System.Windows.Forms.Padding(0); this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(204, 202); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.Size = new System.Drawing.Size(210, 210); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; this.pictureBox1.TabIndex = 1; this.pictureBox1.TabStop = false; // - // panel1 - // - this.panel1.Controls.Add(this.pictureBox1); - this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Margin = new System.Windows.Forms.Padding(0); - this.panel1.Name = "panel1"; - this.panel1.Padding = new System.Windows.Forms.Padding(10); - this.panel1.Size = new System.Drawing.Size(224, 222); - this.panel1.TabIndex = 2; - // // QRCodeForm // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.AutoSize = true; + this.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; this.BackColor = System.Drawing.Color.White; - this.ClientSize = new System.Drawing.Size(224, 222); - this.Controls.Add(this.panel1); + this.ClientSize = new System.Drawing.Size(338, 274); + this.Controls.Add(this.pictureBox1); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "QRCodeForm"; + this.Padding = new System.Windows.Forms.Padding(9); this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.Text = "QRCode"; this.Load += new System.EventHandler(this.QRCodeForm_Load); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.panel1.ResumeLayout(false); this.ResumeLayout(false); } @@ -79,6 +67,5 @@ #endregion private System.Windows.Forms.PictureBox pictureBox1; - private System.Windows.Forms.Panel panel1; } } \ No newline at end of file