1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-04-29 11:34:13 +02:00

Move some options from the General tab to the Advanced tab

This commit is contained in:
chylex 2022-01-21 13:13:50 +01:00
parent b0ba4595ae
commit 3939c2263a
Signed by: chylex
GPG Key ID: 4DE42C8F19A80548
4 changed files with 279 additions and 240 deletions

View File

@ -40,27 +40,34 @@ private void InitializeComponent() {
this.panelClearCacheAuto = new System.Windows.Forms.Panel();
this.panelConfiguration = new System.Windows.Forms.Panel();
this.labelConfiguration = new System.Windows.Forms.Label();
this.flowPanel = new System.Windows.Forms.FlowLayoutPanel();
this.flowPanelLeft = new System.Windows.Forms.FlowLayoutPanel();
this.labelBrowserSettings = new System.Windows.Forms.Label();
this.checkHardwareAcceleration = new System.Windows.Forms.CheckBox();
this.checkAutomaticallyDetectColorProfile = new System.Windows.Forms.CheckBox();
this.checkTouchAdjustment = new System.Windows.Forms.CheckBox();
this.labelProxy = new System.Windows.Forms.Label();
this.checkUseSystemProxyForAllConnections = new System.Windows.Forms.CheckBox();
this.labelDevTools = new System.Windows.Forms.Label();
this.checkDevToolsInContextMenu = new System.Windows.Forms.CheckBox();
this.checkDevToolsWindowOnTop = new System.Windows.Forms.CheckBox();
this.flowPanelRight = new System.Windows.Forms.FlowLayoutPanel();
this.panelSeparator = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.numClearCacheThreshold)).BeginInit();
this.panelAppButtons.SuspendLayout();
this.panelClearCacheAuto.SuspendLayout();
this.panelConfiguration.SuspendLayout();
this.flowPanel.SuspendLayout();
this.flowPanelLeft.SuspendLayout();
this.flowPanelRight.SuspendLayout();
this.SuspendLayout();
//
// btnClearCache
//
this.btnClearCache.Font = new System.Drawing.Font("Segoe UI", 9F);
this.btnClearCache.Location = new System.Drawing.Point(5, 135);
this.btnClearCache.Location = new System.Drawing.Point(5, 145);
this.btnClearCache.Margin = new System.Windows.Forms.Padding(5, 3, 3, 3);
this.btnClearCache.Name = "btnClearCache";
this.btnClearCache.Size = new System.Drawing.Size(143, 25);
this.btnClearCache.TabIndex = 3;
this.btnClearCache.TabIndex = 5;
this.btnClearCache.Text = "Clear Cache (...)";
this.btnClearCache.UseVisualStyleBackColor = true;
//
@ -147,7 +154,7 @@ private void InitializeComponent() {
0,
0});
this.numClearCacheThreshold.Name = "numClearCacheThreshold";
this.numClearCacheThreshold.Size = new System.Drawing.Size(89, 23);
this.numClearCacheThreshold.Size = new System.Drawing.Size(80, 23);
this.numClearCacheThreshold.TabIndex = 1;
this.numClearCacheThreshold.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.numClearCacheThreshold.TextSuffix = " MB";
@ -196,72 +203,119 @@ private void InitializeComponent() {
//
this.labelCache.AutoSize = true;
this.labelCache.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelCache.Location = new System.Drawing.Point(0, 112);
this.labelCache.Location = new System.Drawing.Point(0, 122);
this.labelCache.Margin = new System.Windows.Forms.Padding(0, 30, 0, 1);
this.labelCache.Name = "labelCache";
this.labelCache.Size = new System.Drawing.Size(123, 19);
this.labelCache.TabIndex = 2;
this.labelCache.TabIndex = 4;
this.labelCache.Text = "BROWSER CACHE";
//
// panelClearCacheAuto
//
this.panelClearCacheAuto.Controls.Add(this.checkClearCacheAuto);
this.panelClearCacheAuto.Controls.Add(this.numClearCacheThreshold);
this.panelClearCacheAuto.Location = new System.Drawing.Point(0, 163);
this.panelClearCacheAuto.Location = new System.Drawing.Point(0, 173);
this.panelClearCacheAuto.Margin = new System.Windows.Forms.Padding(0);
this.panelClearCacheAuto.Name = "panelClearCacheAuto";
this.panelClearCacheAuto.Size = new System.Drawing.Size(300, 28);
this.panelClearCacheAuto.TabIndex = 4;
this.panelClearCacheAuto.TabIndex = 6;
//
// panelConfiguration
//
this.panelConfiguration.Controls.Add(this.btnEditCSS);
this.panelConfiguration.Controls.Add(this.btnEditCefArgs);
this.panelConfiguration.Location = new System.Drawing.Point(0, 241);
this.panelConfiguration.Location = new System.Drawing.Point(0, 132);
this.panelConfiguration.Margin = new System.Windows.Forms.Padding(0);
this.panelConfiguration.Name = "panelConfiguration";
this.panelConfiguration.Size = new System.Drawing.Size(300, 31);
this.panelConfiguration.TabIndex = 6;
this.panelConfiguration.TabIndex = 3;
//
// labelConfiguration
//
this.labelConfiguration.AutoSize = true;
this.labelConfiguration.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelConfiguration.Location = new System.Drawing.Point(0, 221);
this.labelConfiguration.Location = new System.Drawing.Point(0, 112);
this.labelConfiguration.Margin = new System.Windows.Forms.Padding(0, 30, 0, 1);
this.labelConfiguration.Name = "labelConfiguration";
this.labelConfiguration.Size = new System.Drawing.Size(123, 19);
this.labelConfiguration.TabIndex = 5;
this.labelConfiguration.TabIndex = 2;
this.labelConfiguration.Text = "CONFIGURATION";
//
// flowPanel
// flowPanelLeft
//
this.flowPanel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
this.flowPanelLeft.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.flowPanel.Controls.Add(this.labelApp);
this.flowPanel.Controls.Add(this.panelAppButtons);
this.flowPanel.Controls.Add(this.labelCache);
this.flowPanel.Controls.Add(this.btnClearCache);
this.flowPanel.Controls.Add(this.panelClearCacheAuto);
this.flowPanel.Controls.Add(this.labelConfiguration);
this.flowPanel.Controls.Add(this.panelConfiguration);
this.flowPanel.Controls.Add(this.labelProxy);
this.flowPanel.Controls.Add(this.checkUseSystemProxyForAllConnections);
this.flowPanel.Controls.Add(this.labelDevTools);
this.flowPanel.Controls.Add(this.checkDevToolsInContextMenu);
this.flowPanel.Controls.Add(this.checkDevToolsWindowOnTop);
this.flowPanel.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowPanel.Location = new System.Drawing.Point(9, 9);
this.flowPanel.Name = "flowPanel";
this.flowPanel.Size = new System.Drawing.Size(300, 462);
this.flowPanel.TabIndex = 0;
this.flowPanel.WrapContents = false;
this.flowPanelLeft.Controls.Add(this.labelBrowserSettings);
this.flowPanelLeft.Controls.Add(this.checkHardwareAcceleration);
this.flowPanelLeft.Controls.Add(this.checkAutomaticallyDetectColorProfile);
this.flowPanelLeft.Controls.Add(this.checkTouchAdjustment);
this.flowPanelLeft.Controls.Add(this.labelCache);
this.flowPanelLeft.Controls.Add(this.btnClearCache);
this.flowPanelLeft.Controls.Add(this.panelClearCacheAuto);
this.flowPanelLeft.Controls.Add(this.labelProxy);
this.flowPanelLeft.Controls.Add(this.checkUseSystemProxyForAllConnections);
this.flowPanelLeft.Controls.Add(this.labelDevTools);
this.flowPanelLeft.Controls.Add(this.checkDevToolsInContextMenu);
this.flowPanelLeft.Controls.Add(this.checkDevToolsWindowOnTop);
this.flowPanelLeft.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowPanelLeft.Location = new System.Drawing.Point(9, 9);
this.flowPanelLeft.Name = "flowPanelLeft";
this.flowPanelLeft.Size = new System.Drawing.Size(300, 462);
this.flowPanelLeft.TabIndex = 0;
this.flowPanelLeft.WrapContents = false;
//
// labelBrowserSettings
//
this.labelBrowserSettings.AutoSize = true;
this.labelBrowserSettings.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelBrowserSettings.Location = new System.Drawing.Point(0, 0);
this.labelBrowserSettings.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1);
this.labelBrowserSettings.Name = "labelBrowserSettings";
this.labelBrowserSettings.Size = new System.Drawing.Size(143, 19);
this.labelBrowserSettings.TabIndex = 0;
this.labelBrowserSettings.Text = "BROWSER SETTINGS";
//
// checkHardwareAcceleration
//
this.checkHardwareAcceleration.AutoSize = true;
this.checkHardwareAcceleration.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkHardwareAcceleration.Location = new System.Drawing.Point(6, 23);
this.checkHardwareAcceleration.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkHardwareAcceleration.Name = "checkHardwareAcceleration";
this.checkHardwareAcceleration.Size = new System.Drawing.Size(146, 19);
this.checkHardwareAcceleration.TabIndex = 1;
this.checkHardwareAcceleration.Text = "Hardware Acceleration";
this.checkHardwareAcceleration.UseVisualStyleBackColor = true;
//
// checkAutomaticallyDetectColorProfile
//
this.checkAutomaticallyDetectColorProfile.AutoSize = true;
this.checkAutomaticallyDetectColorProfile.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkAutomaticallyDetectColorProfile.Location = new System.Drawing.Point(6, 47);
this.checkAutomaticallyDetectColorProfile.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkAutomaticallyDetectColorProfile.Name = "checkAutomaticallyDetectColorProfile";
this.checkAutomaticallyDetectColorProfile.Size = new System.Drawing.Size(206, 19);
this.checkAutomaticallyDetectColorProfile.TabIndex = 2;
this.checkAutomaticallyDetectColorProfile.Text = "Automatically Detect Color Profile";
this.checkAutomaticallyDetectColorProfile.UseVisualStyleBackColor = true;
//
// checkTouchAdjustment
//
this.checkTouchAdjustment.AutoSize = true;
this.checkTouchAdjustment.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkTouchAdjustment.Location = new System.Drawing.Point(6, 71);
this.checkTouchAdjustment.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkTouchAdjustment.Name = "checkTouchAdjustment";
this.checkTouchAdjustment.Size = new System.Drawing.Size(163, 19);
this.checkTouchAdjustment.TabIndex = 3;
this.checkTouchAdjustment.Text = "Touch Screen Adjustment";
this.checkTouchAdjustment.UseVisualStyleBackColor = true;
//
// labelProxy
//
this.labelProxy.AutoSize = true;
this.labelProxy.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelProxy.Location = new System.Drawing.Point(0, 302);
this.labelProxy.Location = new System.Drawing.Point(0, 231);
this.labelProxy.Margin = new System.Windows.Forms.Padding(0, 30, 0, 1);
this.labelProxy.Name = "labelProxy";
this.labelProxy.Size = new System.Drawing.Size(54, 19);
@ -272,7 +326,7 @@ private void InitializeComponent() {
//
this.checkUseSystemProxyForAllConnections.AutoSize = true;
this.checkUseSystemProxyForAllConnections.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkUseSystemProxyForAllConnections.Location = new System.Drawing.Point(6, 328);
this.checkUseSystemProxyForAllConnections.Location = new System.Drawing.Point(6, 257);
this.checkUseSystemProxyForAllConnections.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
this.checkUseSystemProxyForAllConnections.Name = "checkUseSystemProxyForAllConnections";
this.checkUseSystemProxyForAllConnections.Size = new System.Drawing.Size(223, 19);
@ -284,7 +338,7 @@ private void InitializeComponent() {
//
this.labelDevTools.AutoSize = true;
this.labelDevTools.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelDevTools.Location = new System.Drawing.Point(0, 379);
this.labelDevTools.Location = new System.Drawing.Point(0, 308);
this.labelDevTools.Margin = new System.Windows.Forms.Padding(0, 30, 0, 1);
this.labelDevTools.Name = "labelDevTools";
this.labelDevTools.Size = new System.Drawing.Size(156, 19);
@ -295,7 +349,7 @@ private void InitializeComponent() {
//
this.checkDevToolsInContextMenu.AutoSize = true;
this.checkDevToolsInContextMenu.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkDevToolsInContextMenu.Location = new System.Drawing.Point(6, 405);
this.checkDevToolsInContextMenu.Location = new System.Drawing.Point(6, 334);
this.checkDevToolsInContextMenu.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
this.checkDevToolsInContextMenu.Name = "checkDevToolsInContextMenu";
this.checkDevToolsInContextMenu.Size = new System.Drawing.Size(201, 19);
@ -307,7 +361,7 @@ private void InitializeComponent() {
//
this.checkDevToolsWindowOnTop.AutoSize = true;
this.checkDevToolsWindowOnTop.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkDevToolsWindowOnTop.Location = new System.Drawing.Point(6, 429);
this.checkDevToolsWindowOnTop.Location = new System.Drawing.Point(6, 358);
this.checkDevToolsWindowOnTop.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkDevToolsWindowOnTop.Name = "checkDevToolsWindowOnTop";
this.checkDevToolsWindowOnTop.Size = new System.Drawing.Size(168, 19);
@ -315,11 +369,39 @@ private void InitializeComponent() {
this.checkDevToolsWindowOnTop.Text = "Dev Tools Window On Top";
this.checkDevToolsWindowOnTop.UseVisualStyleBackColor = true;
//
// flowPanelRight
//
this.flowPanelRight.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.flowPanelRight.Controls.Add(this.labelApp);
this.flowPanelRight.Controls.Add(this.panelAppButtons);
this.flowPanelRight.Controls.Add(this.labelConfiguration);
this.flowPanelRight.Controls.Add(this.panelConfiguration);
this.flowPanelRight.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
this.flowPanelRight.Location = new System.Drawing.Point(322, 9);
this.flowPanelRight.Name = "flowPanelRight";
this.flowPanelRight.Size = new System.Drawing.Size(300, 462);
this.flowPanelRight.TabIndex = 1;
this.flowPanelRight.WrapContents = false;
//
// panelSeparator
//
this.panelSeparator.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.panelSeparator.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(200)))), ((int)(((byte)(200)))), ((int)(((byte)(200)))));
this.panelSeparator.Location = new System.Drawing.Point(312, 0);
this.panelSeparator.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0);
this.panelSeparator.Name = "panelSeparator";
this.panelSeparator.Size = new System.Drawing.Size(1, 480);
this.panelSeparator.TabIndex = 3;
//
// TabSettingsAdvanced
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.flowPanel);
this.Controls.Add(this.panelSeparator);
this.Controls.Add(this.flowPanelRight);
this.Controls.Add(this.flowPanelLeft);
this.Name = "TabSettingsAdvanced";
this.Size = new System.Drawing.Size(631, 480);
((System.ComponentModel.ISupportInitialize)(this.numClearCacheThreshold)).EndInit();
@ -327,8 +409,10 @@ private void InitializeComponent() {
this.panelClearCacheAuto.ResumeLayout(false);
this.panelClearCacheAuto.PerformLayout();
this.panelConfiguration.ResumeLayout(false);
this.flowPanel.ResumeLayout(false);
this.flowPanel.PerformLayout();
this.flowPanelLeft.ResumeLayout(false);
this.flowPanelLeft.PerformLayout();
this.flowPanelRight.ResumeLayout(false);
this.flowPanelRight.PerformLayout();
this.ResumeLayout(false);
}
@ -351,11 +435,17 @@ private void InitializeComponent() {
private System.Windows.Forms.Label labelConfiguration;
private Controls.NumericUpDownEx numClearCacheThreshold;
private System.Windows.Forms.CheckBox checkClearCacheAuto;
private System.Windows.Forms.FlowLayoutPanel flowPanel;
private System.Windows.Forms.FlowLayoutPanel flowPanelLeft;
private System.Windows.Forms.Label labelDevTools;
private System.Windows.Forms.CheckBox checkDevToolsInContextMenu;
private System.Windows.Forms.CheckBox checkDevToolsWindowOnTop;
private System.Windows.Forms.Label labelProxy;
private System.Windows.Forms.CheckBox checkUseSystemProxyForAllConnections;
private System.Windows.Forms.FlowLayoutPanel flowPanelRight;
private System.Windows.Forms.Label labelBrowserSettings;
private System.Windows.Forms.CheckBox checkTouchAdjustment;
private System.Windows.Forms.CheckBox checkAutomaticallyDetectColorProfile;
private System.Windows.Forms.CheckBox checkHardwareAcceleration;
private System.Windows.Forms.Panel panelSeparator;
}
}

View File

@ -25,6 +25,16 @@ public TabSettingsAdvanced(Action<string> reinjectBrowserCSS, Action openDevTool
toolTip.SetToolTip(btnRestart, "Restarts the program using the same command\r\nline arguments that were used at launch.");
toolTip.SetToolTip(btnRestartArgs, "Restarts the program with customizable\r\ncommand line arguments.");
// browser settings
toolTip.SetToolTip(checkTouchAdjustment, "Toggles Chromium touch screen adjustment.\r\nDisabled by default, because it is very imprecise with TweetDeck.");
toolTip.SetToolTip(checkAutomaticallyDetectColorProfile, "Automatically detects the color profile of your system.\r\nUses the sRGB profile if disabled.");
toolTip.SetToolTip(checkHardwareAcceleration, "Uses graphics card to improve performance.\r\nDisable if you experience visual glitches, or to save a small amount of RAM.");
checkTouchAdjustment.Checked = SysConfig.EnableTouchAdjustment;
checkAutomaticallyDetectColorProfile.Checked = SysConfig.EnableColorProfileDetection;
checkHardwareAcceleration.Checked = SysConfig.HardwareAcceleration;
// browser cache
toolTip.SetToolTip(btnClearCache, "Clearing cache will free up space taken by downloaded images and other resources.");
@ -65,6 +75,10 @@ public override void OnReady() {
btnRestart.Click += btnRestart_Click;
btnRestartArgs.Click += btnRestartArgs_Click;
checkTouchAdjustment.CheckedChanged += checkTouchAdjustment_CheckedChanged;
checkAutomaticallyDetectColorProfile.CheckedChanged += checkAutomaticallyDetectColorProfile_CheckedChanged;
checkHardwareAcceleration.CheckedChanged += checkHardwareAcceleration_CheckedChanged;
btnClearCache.Click += btnClearCache_Click;
checkClearCacheAuto.CheckedChanged += checkClearCacheAuto_CheckedChanged;
@ -106,6 +120,22 @@ private void btnRestartArgs_Click(object sender, EventArgs e) {
#endregion
#region Browser Settings
private void checkTouchAdjustment_CheckedChanged(object sender, EventArgs e) {
SysConfig.EnableTouchAdjustment = checkTouchAdjustment.Checked;
}
private void checkAutomaticallyDetectColorProfile_CheckedChanged(object sender, EventArgs e) {
SysConfig.EnableColorProfileDetection = checkAutomaticallyDetectColorProfile.Checked;
}
private void checkHardwareAcceleration_CheckedChanged(object sender, EventArgs e) {
SysConfig.HardwareAcceleration = checkHardwareAcceleration.Checked;
}
#endregion
#region Browser Cache
private void btnClearCache_Click(object sender, EventArgs e) {

View File

@ -34,18 +34,14 @@ private void InitializeComponent() {
this.trackBarZoom = new System.Windows.Forms.TrackBar();
this.labelZoom = new System.Windows.Forms.Label();
this.zoomUpdateTimer = new System.Windows.Forms.Timer(this.components);
this.labelUI = new System.Windows.Forms.Label();
this.panelZoom = new System.Windows.Forms.Panel();
this.checkAnimatedAvatars = new System.Windows.Forms.CheckBox();
this.labelUpdates = new System.Windows.Forms.Label();
this.flowPanelLeft = new System.Windows.Forms.FlowLayoutPanel();
this.labelUI = new System.Windows.Forms.Label();
this.checkFocusDmInput = new System.Windows.Forms.CheckBox();
this.checkKeepLikeFollowDialogsOpen = new System.Windows.Forms.CheckBox();
this.labelBrowserSettings = new System.Windows.Forms.Label();
this.checkSmoothScrolling = new System.Windows.Forms.CheckBox();
this.checkTouchAdjustment = new System.Windows.Forms.CheckBox();
this.checkAutomaticallyDetectColorProfile = new System.Windows.Forms.CheckBox();
this.checkHardwareAcceleration = new System.Windows.Forms.CheckBox();
this.labelBrowserPath = new System.Windows.Forms.Label();
this.comboBoxCustomBrowser = new System.Windows.Forms.ComboBox();
this.labelSearchEngine = new System.Windows.Forms.Label();
@ -91,11 +87,11 @@ private void InitializeComponent() {
//
this.checkUpdateNotifications.AutoSize = true;
this.checkUpdateNotifications.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkUpdateNotifications.Location = new System.Drawing.Point(6, 409);
this.checkUpdateNotifications.Location = new System.Drawing.Point(6, 307);
this.checkUpdateNotifications.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
this.checkUpdateNotifications.Name = "checkUpdateNotifications";
this.checkUpdateNotifications.Size = new System.Drawing.Size(182, 19);
this.checkUpdateNotifications.TabIndex = 15;
this.checkUpdateNotifications.TabIndex = 11;
this.checkUpdateNotifications.Text = "Check Updates Automatically";
this.checkUpdateNotifications.UseVisualStyleBackColor = true;
//
@ -103,12 +99,12 @@ private void InitializeComponent() {
//
this.btnCheckUpdates.AutoSize = true;
this.btnCheckUpdates.Font = new System.Drawing.Font("Segoe UI", 9F);
this.btnCheckUpdates.Location = new System.Drawing.Point(5, 433);
this.btnCheckUpdates.Location = new System.Drawing.Point(5, 331);
this.btnCheckUpdates.Margin = new System.Windows.Forms.Padding(5, 3, 3, 3);
this.btnCheckUpdates.Name = "btnCheckUpdates";
this.btnCheckUpdates.Padding = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.btnCheckUpdates.Size = new System.Drawing.Size(128, 25);
this.btnCheckUpdates.TabIndex = 16;
this.btnCheckUpdates.TabIndex = 12;
this.btnCheckUpdates.Text = "Check Updates Now";
this.btnCheckUpdates.UseVisualStyleBackColor = true;
//
@ -167,11 +163,11 @@ private void InitializeComponent() {
//
this.labelZoom.AutoSize = true;
this.labelZoom.Font = new System.Drawing.Font("Segoe UI Semibold", 9F, System.Drawing.FontStyle.Bold);
this.labelZoom.Location = new System.Drawing.Point(3, 323);
this.labelZoom.Location = new System.Drawing.Point(3, 203);
this.labelZoom.Margin = new System.Windows.Forms.Padding(3, 12, 3, 0);
this.labelZoom.Name = "labelZoom";
this.labelZoom.Size = new System.Drawing.Size(39, 15);
this.labelZoom.TabIndex = 12;
this.labelZoom.TabIndex = 8;
this.labelZoom.Text = "Zoom";
//
// zoomUpdateTimer
@ -179,26 +175,15 @@ private void InitializeComponent() {
this.zoomUpdateTimer.Interval = 250;
this.zoomUpdateTimer.Tick += new System.EventHandler(this.zoomUpdateTimer_Tick);
//
// labelUI
//
this.labelUI.AutoSize = true;
this.labelUI.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelUI.Location = new System.Drawing.Point(0, 0);
this.labelUI.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1);
this.labelUI.Name = "labelUI";
this.labelUI.Size = new System.Drawing.Size(118, 19);
this.labelUI.TabIndex = 0;
this.labelUI.Text = "USER INTERFACE";
//
// panelZoom
//
this.panelZoom.Controls.Add(this.trackBarZoom);
this.panelZoom.Controls.Add(this.labelZoomValue);
this.panelZoom.Location = new System.Drawing.Point(0, 339);
this.panelZoom.Location = new System.Drawing.Point(0, 219);
this.panelZoom.Margin = new System.Windows.Forms.Padding(0, 1, 0, 0);
this.panelZoom.Name = "panelZoom";
this.panelZoom.Size = new System.Drawing.Size(300, 35);
this.panelZoom.TabIndex = 13;
this.panelZoom.TabIndex = 9;
//
// checkAnimatedAvatars
//
@ -216,11 +201,11 @@ private void InitializeComponent() {
//
this.labelUpdates.AutoSize = true;
this.labelUpdates.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelUpdates.Location = new System.Drawing.Point(0, 383);
this.labelUpdates.Margin = new System.Windows.Forms.Padding(0, 7, 0, 1);
this.labelUpdates.Location = new System.Drawing.Point(0, 281);
this.labelUpdates.Margin = new System.Windows.Forms.Padding(0, 27, 0, 1);
this.labelUpdates.Name = "labelUpdates";
this.labelUpdates.Size = new System.Drawing.Size(69, 19);
this.labelUpdates.TabIndex = 14;
this.labelUpdates.TabIndex = 10;
this.labelUpdates.Text = "UPDATES";
//
// flowPanelLeft
@ -234,11 +219,7 @@ private void InitializeComponent() {
this.flowPanelLeft.Controls.Add(this.checkKeepLikeFollowDialogsOpen);
this.flowPanelLeft.Controls.Add(this.checkBestImageQuality);
this.flowPanelLeft.Controls.Add(this.checkAnimatedAvatars);
this.flowPanelLeft.Controls.Add(this.labelBrowserSettings);
this.flowPanelLeft.Controls.Add(this.checkSmoothScrolling);
this.flowPanelLeft.Controls.Add(this.checkTouchAdjustment);
this.flowPanelLeft.Controls.Add(this.checkAutomaticallyDetectColorProfile);
this.flowPanelLeft.Controls.Add(this.checkHardwareAcceleration);
this.flowPanelLeft.Controls.Add(this.labelZoom);
this.flowPanelLeft.Controls.Add(this.panelZoom);
this.flowPanelLeft.Controls.Add(this.labelUpdates);
@ -251,6 +232,17 @@ private void InitializeComponent() {
this.flowPanelLeft.TabIndex = 0;
this.flowPanelLeft.WrapContents = false;
//
// labelUI
//
this.labelUI.AutoSize = true;
this.labelUI.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelUI.Location = new System.Drawing.Point(0, 0);
this.labelUI.Margin = new System.Windows.Forms.Padding(0, 0, 0, 1);
this.labelUI.Name = "labelUI";
this.labelUI.Size = new System.Drawing.Size(118, 19);
this.labelUI.TabIndex = 0;
this.labelUI.Text = "USER INTERFACE";
//
// checkFocusDmInput
//
this.checkFocusDmInput.AutoSize = true;
@ -275,65 +267,18 @@ private void InitializeComponent() {
this.checkKeepLikeFollowDialogsOpen.Text = "Keep Like/Follow Dialogs Open";
this.checkKeepLikeFollowDialogsOpen.UseVisualStyleBackColor = true;
//
// labelBrowserSettings
//
this.labelBrowserSettings.AutoSize = true;
this.labelBrowserSettings.Font = new System.Drawing.Font("Segoe UI Semibold", 10.5F, System.Drawing.FontStyle.Bold);
this.labelBrowserSettings.Location = new System.Drawing.Point(0, 192);
this.labelBrowserSettings.Margin = new System.Windows.Forms.Padding(0, 25, 0, 1);
this.labelBrowserSettings.Name = "labelBrowserSettings";
this.labelBrowserSettings.Size = new System.Drawing.Size(143, 19);
this.labelBrowserSettings.TabIndex = 7;
this.labelBrowserSettings.Text = "BROWSER SETTINGS";
//
// checkSmoothScrolling
//
this.checkSmoothScrolling.AutoSize = true;
this.checkSmoothScrolling.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkSmoothScrolling.Location = new System.Drawing.Point(6, 218);
this.checkSmoothScrolling.Margin = new System.Windows.Forms.Padding(6, 6, 3, 2);
this.checkSmoothScrolling.Location = new System.Drawing.Point(6, 170);
this.checkSmoothScrolling.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkSmoothScrolling.Name = "checkSmoothScrolling";
this.checkSmoothScrolling.Size = new System.Drawing.Size(117, 19);
this.checkSmoothScrolling.TabIndex = 8;
this.checkSmoothScrolling.TabIndex = 7;
this.checkSmoothScrolling.Text = "Smooth Scrolling";
this.checkSmoothScrolling.UseVisualStyleBackColor = true;
//
// checkTouchAdjustment
//
this.checkTouchAdjustment.AutoSize = true;
this.checkTouchAdjustment.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkTouchAdjustment.Location = new System.Drawing.Point(6, 242);
this.checkTouchAdjustment.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkTouchAdjustment.Name = "checkTouchAdjustment";
this.checkTouchAdjustment.Size = new System.Drawing.Size(163, 19);
this.checkTouchAdjustment.TabIndex = 9;
this.checkTouchAdjustment.Text = "Touch Screen Adjustment";
this.checkTouchAdjustment.UseVisualStyleBackColor = true;
//
// checkAutomaticallyDetectColorProfile
//
this.checkAutomaticallyDetectColorProfile.AutoSize = true;
this.checkAutomaticallyDetectColorProfile.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkAutomaticallyDetectColorProfile.Location = new System.Drawing.Point(6, 266);
this.checkAutomaticallyDetectColorProfile.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkAutomaticallyDetectColorProfile.Name = "checkAutomaticallyDetectColorProfile";
this.checkAutomaticallyDetectColorProfile.Size = new System.Drawing.Size(206, 19);
this.checkAutomaticallyDetectColorProfile.TabIndex = 10;
this.checkAutomaticallyDetectColorProfile.Text = "Automatically Detect Color Profile";
this.checkAutomaticallyDetectColorProfile.UseVisualStyleBackColor = true;
//
// checkHardwareAcceleration
//
this.checkHardwareAcceleration.AutoSize = true;
this.checkHardwareAcceleration.Font = new System.Drawing.Font("Segoe UI", 9F);
this.checkHardwareAcceleration.Location = new System.Drawing.Point(6, 290);
this.checkHardwareAcceleration.Margin = new System.Windows.Forms.Padding(6, 3, 3, 2);
this.checkHardwareAcceleration.Name = "checkHardwareAcceleration";
this.checkHardwareAcceleration.Size = new System.Drawing.Size(146, 19);
this.checkHardwareAcceleration.TabIndex = 11;
this.checkHardwareAcceleration.Text = "Hardware Acceleration";
this.checkHardwareAcceleration.UseVisualStyleBackColor = true;
//
// labelBrowserPath
//
this.labelBrowserPath.AutoSize = true;
@ -401,7 +346,7 @@ private void InitializeComponent() {
this.flowPanelRight.Location = new System.Drawing.Point(322, 9);
this.flowPanelRight.Name = "flowPanelRight";
this.flowPanelRight.Size = new System.Drawing.Size(300, 462);
this.flowPanelRight.TabIndex = 1;
this.flowPanelRight.TabIndex = 2;
this.flowPanelRight.WrapContents = false;
//
// labelLocales
@ -583,7 +528,7 @@ private void InitializeComponent() {
this.panelSeparator.Margin = new System.Windows.Forms.Padding(0, 0, 6, 0);
this.panelSeparator.Name = "panelSeparator";
this.panelSeparator.Size = new System.Drawing.Size(1, 480);
this.panelSeparator.TabIndex = 2;
this.panelSeparator.TabIndex = 1;
//
// TabSettingsGeneral
//
@ -618,7 +563,6 @@ private void InitializeComponent() {
private System.Windows.Forms.Label labelZoomValue;
private System.Windows.Forms.TrackBar trackBarZoom;
private System.Windows.Forms.Timer zoomUpdateTimer;
private System.Windows.Forms.Label labelUI;
private System.Windows.Forms.Panel panelZoom;
private System.Windows.Forms.Label labelUpdates;
private System.Windows.Forms.CheckBox checkBestImageQuality;
@ -628,12 +572,9 @@ private void InitializeComponent() {
private System.Windows.Forms.CheckBox checkKeepLikeFollowDialogsOpen;
private System.Windows.Forms.Label labelBrowserPath;
private System.Windows.Forms.ComboBox comboBoxCustomBrowser;
private System.Windows.Forms.Label labelBrowserSettings;
private System.Windows.Forms.CheckBox checkSmoothScrolling;
private System.Windows.Forms.Label labelSearchEngine;
private System.Windows.Forms.ComboBox comboBoxSearchEngine;
private System.Windows.Forms.CheckBox checkTouchAdjustment;
private System.Windows.Forms.CheckBox checkAutomaticallyDetectColorProfile;
private System.Windows.Forms.FlowLayoutPanel flowPanelRight;
private System.Windows.Forms.Panel panelSeparator;
private System.Windows.Forms.Label labelLocales;
@ -642,7 +583,6 @@ private void InitializeComponent() {
private System.Windows.Forms.ComboBox comboBoxSpellCheckLanguage;
private System.Windows.Forms.Label labelTranslationTarget;
private System.Windows.Forms.ComboBox comboBoxTranslationTarget;
private System.Windows.Forms.CheckBox checkHardwareAcceleration;
private System.Windows.Forms.CheckBox checkFocusDmInput;
private System.Windows.Forms.Panel panelCustomBrowser;
private System.Windows.Forms.Button btnCustomBrowserChange;
@ -653,5 +593,6 @@ private void InitializeComponent() {
private System.Windows.Forms.Label labelExternalApplications;
private System.Windows.Forms.Label labelFirstDayOfWeek;
private System.Windows.Forms.ComboBox comboBoxFirstDayOfWeek;
private System.Windows.Forms.Label labelUI;
}
}

View File

@ -45,6 +45,7 @@ public TabSettingsGeneral(Action reloadColumns, UpdateChecker updates) {
toolTip.SetToolTip(checkKeepLikeFollowDialogsOpen, "Allows liking and following from multiple accounts at once,\r\ninstead of automatically closing the dialog after taking an action.");
toolTip.SetToolTip(checkBestImageQuality, "When right-clicking a tweet image, the context menu options\r\nwill use links to the original image size (:orig in the URL).");
toolTip.SetToolTip(checkAnimatedAvatars, "Some old Twitter avatars could be uploaded as animated GIFs.");
toolTip.SetToolTip(checkSmoothScrolling, "Toggles smooth mouse wheel scrolling.");
toolTip.SetToolTip(labelZoomValue, "Changes the zoom level.\r\nAlso affects notifications and screenshots.");
toolTip.SetToolTip(trackBarZoom, toolTip.GetToolTip(labelZoomValue));
@ -54,6 +55,7 @@ public TabSettingsGeneral(Action reloadColumns, UpdateChecker updates) {
checkKeepLikeFollowDialogsOpen.Checked = Config.KeepLikeFollowDialogsOpen;
checkBestImageQuality.Checked = Config.BestImageQuality;
checkAnimatedAvatars.Checked = Config.EnableAnimatedImages;
checkSmoothScrolling.Checked = Config.EnableSmoothScrolling;
trackBarZoom.SetValueSafe(Config.ZoomLevel);
labelZoomValue.Text = trackBarZoom.Value + "%";
@ -65,21 +67,12 @@ public TabSettingsGeneral(Action reloadColumns, UpdateChecker updates) {
checkUpdateNotifications.Checked = Config.EnableUpdateCheck;
// browser settings
// external applications
toolTip.SetToolTip(checkSmoothScrolling, "Toggles smooth mouse wheel scrolling.");
toolTip.SetToolTip(checkTouchAdjustment, "Toggles Chromium touch screen adjustment.\r\nDisabled by default, because it is very imprecise with TweetDeck.");
toolTip.SetToolTip(checkAutomaticallyDetectColorProfile, "Automatically detects the color profile of your system.\r\nUses the sRGB profile if disabled.");
toolTip.SetToolTip(checkHardwareAcceleration, "Uses graphics card to improve performance.\r\nDisable if you experience visual glitches, or to save a small amount of RAM.");
toolTip.SetToolTip(comboBoxCustomBrowser, "Sets the default browser for opening links.");
toolTip.SetToolTip(comboBoxCustomVideoPlayer, "Sets the default application for playing videos.");
toolTip.SetToolTip(comboBoxSearchEngine, "Sets the default website for opening searches.");
checkSmoothScrolling.Checked = Config.EnableSmoothScrolling;
checkTouchAdjustment.Checked = SysConfig.EnableTouchAdjustment;
checkAutomaticallyDetectColorProfile.Checked = SysConfig.EnableColorProfileDetection;
checkHardwareAcceleration.Checked = SysConfig.HardwareAcceleration;
foreach (WindowsUtils.Browser browserInfo in WindowsUtils.FindInstalledBrowsers()) {
comboBoxCustomBrowser.Items.Add(browserInfo);
}
@ -144,15 +137,12 @@ public override void OnReady() {
checkKeepLikeFollowDialogsOpen.CheckedChanged += checkKeepLikeFollowDialogsOpen_CheckedChanged;
checkBestImageQuality.CheckedChanged += checkBestImageQuality_CheckedChanged;
checkAnimatedAvatars.CheckedChanged += checkAnimatedAvatars_CheckedChanged;
checkSmoothScrolling.CheckedChanged += checkSmoothScrolling_CheckedChanged;
trackBarZoom.ValueChanged += trackBarZoom_ValueChanged;
checkUpdateNotifications.CheckedChanged += checkUpdateNotifications_CheckedChanged;
btnCheckUpdates.Click += btnCheckUpdates_Click;
checkSmoothScrolling.CheckedChanged += checkSmoothScrolling_CheckedChanged;
checkTouchAdjustment.CheckedChanged += checkTouchAdjustment_CheckedChanged;
checkAutomaticallyDetectColorProfile.CheckedChanged += checkAutomaticallyDetectColorProfile_CheckedChanged;
checkHardwareAcceleration.CheckedChanged += checkHardwareAcceleration_CheckedChanged;
comboBoxCustomBrowser.SelectedIndexChanged += comboBoxCustomBrowser_SelectedIndexChanged;
btnCustomBrowserChange.Click += btnCustomBrowserChange_Click;
comboBoxCustomVideoPlayer.SelectedIndexChanged += comboBoxCustomVideoPlayer_SelectedIndexChanged;
@ -196,6 +186,10 @@ private void checkAnimatedAvatars_CheckedChanged(object sender, EventArgs e) {
BrowserProcessHandler.UpdatePrefs().ContinueWith(task => reloadColumns());
}
private void checkSmoothScrolling_CheckedChanged(object sender, EventArgs e) {
Config.EnableSmoothScrolling = checkSmoothScrolling.Checked;
}
private void trackBarZoom_ValueChanged(object sender, EventArgs e) {
if (trackBarZoom.AlignValueToTick()) {
zoomUpdateTimer.Stop();
@ -240,23 +234,7 @@ private void updates_CheckFinished(object sender, UpdateCheckEventArgs e) {
#endregion
#region Browser Settings
private void checkSmoothScrolling_CheckedChanged(object sender, EventArgs e) {
Config.EnableSmoothScrolling = checkSmoothScrolling.Checked;
}
private void checkTouchAdjustment_CheckedChanged(object sender, EventArgs e) {
SysConfig.EnableTouchAdjustment = checkTouchAdjustment.Checked;
}
private void checkAutomaticallyDetectColorProfile_CheckedChanged(object sender, EventArgs e) {
SysConfig.EnableColorProfileDetection = checkAutomaticallyDetectColorProfile.Checked;
}
private void checkHardwareAcceleration_CheckedChanged(object sender, EventArgs e) {
SysConfig.HardwareAcceleration = checkHardwareAcceleration.Checked;
}
#region External Applications
private void UpdateBrowserChangeButton() {
btnCustomBrowserChange.Visible = comboBoxCustomBrowser.SelectedIndex == browserListIndexCustom;