Added watermark to history form search textbox

This commit is contained in:
Jaex 2021-08-10 00:06:56 +03:00
parent b70537d510
commit df818c040f
4 changed files with 17 additions and 0 deletions

View file

@ -74,6 +74,8 @@ public HistoryForm(string historyPath, HistorySettings settings, Action<string>
scHistoryItemInfo.SplitterWidth = 7; // Because of bug must be assigned here again
scHistoryItemInfo.Panel2Collapsed = true;
tstbSearch.TextBox.HandleCreated += (sender, e) => tstbSearch.TextBox.SetWatermark(Resources.HistoryForm_Search_Watermark, true);
if (Settings.RememberSearchText)
{
tstbSearch.Text = Settings.SearchText;

View file

@ -25,6 +25,7 @@
using Manina.Windows.Forms;
using ShareX.HelpersLib;
using ShareX.HistoryLib.Properties;
using System;
using System.Collections.Generic;
using System.Drawing;
@ -75,6 +76,8 @@ public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Actio
defaultTitle = Text;
tstbSearch.TextBox.HandleCreated += (sender, e) => tstbSearch.TextBox.SetWatermark(Resources.HistoryForm_Search_Watermark, true);
if (Settings.RememberSearchText)
{
tstbSearch.Text = Settings.SearchText;

View file

@ -109,6 +109,15 @@ internal class Resources {
}
}
/// <summary>
/// Looks up a localized string similar to File name, window title, process name etc..
/// </summary>
internal static string HistoryForm_Search_Watermark {
get {
return ResourceManager.GetString("HistoryForm_Search_Watermark", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Filtered: {0}.
/// </summary>

View file

@ -250,4 +250,7 @@
<data name="layout-header-3-mix" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\layout-header-3-mix.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="HistoryForm_Search_Watermark" xml:space="preserve">
<value>File name, window title, process name etc.</value>
</data>
</root>