private void setCheckboardBackground(bool b) { checkboardBackground = b; checkboardBtn.Checked = b; pictureBox.BackColor = checkboardBackground ? ThemeMan.DarkBackColor : Color.Black; MainHelper.ApplyCheckerboardBackground(pictureBox, b, true); }
private void setZoomFactor(int newZoomFactor) { if (newZoomFactor < 1) { newZoomFactor = 1; } if (newZoomFactor > 250) { newZoomFactor = 250; } if (newZoomFactor != zoomFactor) { zoomFactor = newZoomFactor; zoomLabel.Text = LangMan.Get("zoom") + ": " + zoomFactor.ToString() + "%"; setAutoZoom(false); int newWidth = Convert.ToInt32(width * zoomFactor / 100); int newHeight = Convert.ToInt32(height * zoomFactor / 100); pictureBox.Size = new Size(newWidth, newHeight); MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); } }
private void MiniViewForm_ResizeEnd(object sender, EventArgs e) { if (!autoZoom) { MainHelper.UpdatePictureBoxLocation(picturePanel, pictureBox); } zoomLabel.ForeColor = Width > 240 ? Color.White : Color.Black; }