FEATURE-758: Found some settings UI real-estate which made it possible to add the (editor) icon size to the UI. Unfortunately this needs a translation.

This commit is contained in:
RKrom 2014-11-04 22:45:02 +01:00
commit 1da7d028a0
3 changed files with 56 additions and 1 deletions

View file

@ -94,6 +94,10 @@ namespace Greenshot {
this.fullscreen_hotkeyControl = new GreenshotPlugin.Controls.HotkeyControl(); this.fullscreen_hotkeyControl = new GreenshotPlugin.Controls.HotkeyControl();
this.tab_capture = new GreenshotPlugin.Controls.GreenshotTabPage(); this.tab_capture = new GreenshotPlugin.Controls.GreenshotTabPage();
this.groupbox_editor = new GreenshotPlugin.Controls.GreenshotGroupBox(); this.groupbox_editor = new GreenshotPlugin.Controls.GreenshotGroupBox();
this.xLabel = new System.Windows.Forms.Label();
this.text_icon_width = new System.Windows.Forms.TextBox();
this.text_icon_height = new System.Windows.Forms.TextBox();
this.label_icon_size = new GreenshotPlugin.Controls.GreenshotLabel();
this.checkbox_editor_match_capture_size = new GreenshotPlugin.Controls.GreenshotCheckBox(); this.checkbox_editor_match_capture_size = new GreenshotPlugin.Controls.GreenshotCheckBox();
this.groupbox_iecapture = new GreenshotPlugin.Controls.GreenshotGroupBox(); this.groupbox_iecapture = new GreenshotPlugin.Controls.GreenshotGroupBox();
this.checkbox_ie_capture = new GreenshotPlugin.Controls.GreenshotCheckBox(); this.checkbox_ie_capture = new GreenshotPlugin.Controls.GreenshotCheckBox();
@ -626,14 +630,48 @@ namespace Greenshot {
// //
// groupbox_editor // groupbox_editor
// //
this.groupbox_editor.Controls.Add(this.xLabel);
this.groupbox_editor.Controls.Add(this.text_icon_width);
this.groupbox_editor.Controls.Add(this.text_icon_height);
this.groupbox_editor.Controls.Add(this.label_icon_size);
this.groupbox_editor.Controls.Add(this.checkbox_editor_match_capture_size); this.groupbox_editor.Controls.Add(this.checkbox_editor_match_capture_size);
this.groupbox_editor.LanguageKey = "settings_editor"; this.groupbox_editor.LanguageKey = "settings_editor";
this.groupbox_editor.Location = new System.Drawing.Point(4, 277); this.groupbox_editor.Location = new System.Drawing.Point(4, 277);
this.groupbox_editor.Name = "groupbox_editor"; this.groupbox_editor.Name = "groupbox_editor";
this.groupbox_editor.Size = new System.Drawing.Size(416, 50); this.groupbox_editor.Size = new System.Drawing.Size(416, 71);
this.groupbox_editor.TabIndex = 27; this.groupbox_editor.TabIndex = 27;
this.groupbox_editor.TabStop = false; this.groupbox_editor.TabStop = false;
// //
// xLabel
//
this.xLabel.Location = new System.Drawing.Point(358, 45);
this.xLabel.Name = "xLabel";
this.xLabel.Size = new System.Drawing.Size(10, 16);
this.xLabel.TabIndex = 14;
this.xLabel.Text = "X";
//
// text_icon_width
//
this.text_icon_width.Location = new System.Drawing.Point(318, 42);
this.text_icon_width.Name = "text_icon_width";
this.text_icon_width.Size = new System.Drawing.Size(36, 20);
this.text_icon_width.TabIndex = 12;
//
// text_icon_height
//
this.text_icon_height.Location = new System.Drawing.Point(374, 42);
this.text_icon_height.Name = "text_icon_height";
this.text_icon_height.Size = new System.Drawing.Size(36, 20);
this.text_icon_height.TabIndex = 13;
//
// label_icon_size
//
this.label_icon_size.LanguageKey = "settings_iconsize";
this.label_icon_size.Location = new System.Drawing.Point(3, 44);
this.label_icon_size.Name = "label_icon_size";
this.label_icon_size.Size = new System.Drawing.Size(309, 16);
this.label_icon_size.TabIndex = 6;
//
// checkbox_editor_match_capture_size // checkbox_editor_match_capture_size
// //
this.checkbox_editor_match_capture_size.LanguageKey = "editor_match_capture_size"; this.checkbox_editor_match_capture_size.LanguageKey = "editor_match_capture_size";
@ -1393,5 +1431,9 @@ namespace Greenshot {
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowRotate; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowRotate;
private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowCenter; private GreenshotPlugin.Controls.GreenshotCheckBox checkboxAllowCenter;
private GreenshotPlugin.Controls.GreenshotCheckBox checkbox_zoomer; private GreenshotPlugin.Controls.GreenshotCheckBox checkbox_zoomer;
private GreenshotPlugin.Controls.GreenshotLabel label_icon_size;
private System.Windows.Forms.Label xLabel;
private System.Windows.Forms.TextBox text_icon_width;
private System.Windows.Forms.TextBox text_icon_height;
} }
} }

View file

@ -18,6 +18,7 @@
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>. * along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
@ -43,6 +44,7 @@ namespace Greenshot {
/// </summary> /// </summary>
public partial class SettingsForm : BaseForm { public partial class SettingsForm : BaseForm {
private static ILog LOG = LogManager.GetLogger(typeof(SettingsForm)); private static ILog LOG = LogManager.GetLogger(typeof(SettingsForm));
private static EditorConfiguration editorConfiguration = IniConfig.GetIniSection<EditorConfiguration>();
private readonly ToolTip _toolTip = new ToolTip(); private readonly ToolTip _toolTip = new ToolTip();
private bool _inHotkey; private bool _inHotkey;
@ -366,6 +368,8 @@ namespace Greenshot {
numericUpDown_daysbetweencheck.Value = coreConfiguration.UpdateCheckInterval; numericUpDown_daysbetweencheck.Value = coreConfiguration.UpdateCheckInterval;
numericUpDown_daysbetweencheck.Enabled = !coreConfiguration.Values["UpdateCheckInterval"].IsFixed; numericUpDown_daysbetweencheck.Enabled = !coreConfiguration.Values["UpdateCheckInterval"].IsFixed;
text_icon_width.Text = editorConfiguration.ButtonIconSize.Width.ToString(CultureInfo.InvariantCulture);
text_icon_height.Text = editorConfiguration.ButtonIconSize.Height.ToString(CultureInfo.InvariantCulture);
CheckDestinationSettings(); CheckDestinationSettings();
} }
@ -410,6 +414,14 @@ namespace Greenshot {
coreConfiguration.DWMBackgroundColor = colorButton_window_background.SelectedColor; coreConfiguration.DWMBackgroundColor = colorButton_window_background.SelectedColor;
coreConfiguration.UpdateCheckInterval = (int)numericUpDown_daysbetweencheck.Value; coreConfiguration.UpdateCheckInterval = (int)numericUpDown_daysbetweencheck.Value;
int iconWidth;
if (int.TryParse(text_icon_width.Text, out iconWidth)) {
editorConfiguration.ButtonIconSize.Width = iconWidth;
}
int iconHeight;
if (int.TryParse(text_icon_height.Text, out iconHeight)) {
editorConfiguration.ButtonIconSize.Height = iconHeight;
}
try { try {
if (checkbox_autostartshortcut.Checked) { if (checkbox_autostartshortcut.Checked) {
// It's checked, so we set the RunUser if the RunAll isn't set. // It's checked, so we set the RunUser if the RunAll isn't set.

View file

@ -307,6 +307,7 @@ All Greenshot features still work directly from the tray icon context menu witho
<resource name="editor_resize_aspectratio">Maintain aspect ratio</resource> <resource name="editor_resize_aspectratio">Maintain aspect ratio</resource>
<resource name="editor_resize_width">Width</resource> <resource name="editor_resize_width">Width</resource>
<resource name="editor_resize_height">Height</resource> <resource name="editor_resize_height">Height</resource>
<resource name="settings_iconsize">UI icon size</resource>
</resources> </resources>
</language> </language>