From 2f961ef4168b139ac02b40ce505d18d40d7fb76b Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Sun, 10 Jul 2022 10:34:48 +0200 Subject: [PATCH] Changed action to toolbar-like style --- .../Components/SectionTree.Designer.cs | 27 ++++++++++++++----- .../UI WinForms/Components/SectionTree.resx | 3 +++ 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/I18N Commander/UI WinForms/Components/SectionTree.Designer.cs b/I18N Commander/UI WinForms/Components/SectionTree.Designer.cs index 9cf2bb7..39d41b2 100644 --- a/I18N Commander/UI WinForms/Components/SectionTree.Designer.cs +++ b/I18N Commander/UI WinForms/Components/SectionTree.Designer.cs @@ -28,11 +28,13 @@ /// private void InitializeComponent() { + this.components = new System.ComponentModel.Container(); this.tableLayout = new System.Windows.Forms.TableLayoutPanel(); this.flowLayoutBottom = new System.Windows.Forms.FlowLayoutPanel(); this.buttonAdd = new System.Windows.Forms.Button(); this.buttonRemove = new System.Windows.Forms.Button(); this.treeView = new System.Windows.Forms.TreeView(); + this.toolTip = new System.Windows.Forms.ToolTip(this.components); this.tableLayout.SuspendLayout(); this.flowLayoutBottom.SuspendLayout(); this.SuspendLayout(); @@ -67,14 +69,15 @@ // buttonAdd // this.buttonAdd.AutoSize = true; + this.buttonAdd.FlatAppearance.BorderSize = 0; + this.buttonAdd.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonAdd.Image = global::UI_WinForms.Resources.Icons.icons8_add_folder_512; - this.buttonAdd.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; this.buttonAdd.Location = new System.Drawing.Point(3, 3); this.buttonAdd.Name = "buttonAdd"; - this.buttonAdd.Size = new System.Drawing.Size(138, 60); + this.buttonAdd.Size = new System.Drawing.Size(60, 60); this.buttonAdd.TabIndex = 0; - this.buttonAdd.Text = "Add"; this.buttonAdd.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.buttonAdd, "Add section"); this.buttonAdd.UseVisualStyleBackColor = true; this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); // @@ -82,14 +85,15 @@ // this.buttonRemove.AutoSize = true; this.buttonRemove.Enabled = false; + this.buttonRemove.FlatAppearance.BorderSize = 0; + this.buttonRemove.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonRemove.Image = global::UI_WinForms.Resources.Icons.icons8_delete_folder_512; - this.buttonRemove.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; - this.buttonRemove.Location = new System.Drawing.Point(147, 3); + this.buttonRemove.Location = new System.Drawing.Point(69, 3); this.buttonRemove.Name = "buttonRemove"; - this.buttonRemove.Size = new System.Drawing.Size(138, 60); + this.buttonRemove.Size = new System.Drawing.Size(60, 60); this.buttonRemove.TabIndex = 1; - this.buttonRemove.Text = "Remove"; this.buttonRemove.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText; + this.toolTip.SetToolTip(this.buttonRemove, "Removes the selected section"); this.buttonRemove.UseVisualStyleBackColor = true; this.buttonRemove.Click += new System.EventHandler(this.buttonRemove_Click); // @@ -105,6 +109,14 @@ this.treeView.TabIndex = 1; this.treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(this.treeView_NodeMouseClick); // + // toolTip + // + this.toolTip.AutoPopDelay = 30000; + this.toolTip.InitialDelay = 500; + this.toolTip.ReshowDelay = 100; + this.toolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info; + this.toolTip.ToolTipTitle = "Help"; + // // SectionTree // this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F); @@ -127,5 +139,6 @@ private Button buttonAdd; private Button buttonRemove; private TreeView treeView; + private ToolTip toolTip; } } diff --git a/I18N Commander/UI WinForms/Components/SectionTree.resx b/I18N Commander/UI WinForms/Components/SectionTree.resx index b5ae26c..99de901 100644 --- a/I18N Commander/UI WinForms/Components/SectionTree.resx +++ b/I18N Commander/UI WinForms/Components/SectionTree.resx @@ -57,4 +57,7 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + 17, 17 + \ No newline at end of file