Added dark theme compatible loading gif

This commit is contained in:
Jaex 2020-06-18 10:09:45 +03:00
parent 4470741b32
commit 442391b272
8 changed files with 37 additions and 7 deletions

View file

@ -2251,9 +2251,19 @@ internal static System.Drawing.Bitmap Loading {
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap LoadingSmall {
internal static System.Drawing.Bitmap LoadingSmallBlack {
get {
object obj = ResourceManager.GetObject("LoadingSmall", resourceCulture);
object obj = ResourceManager.GetObject("LoadingSmallBlack", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>
internal static System.Drawing.Bitmap LoadingSmallWhite {
get {
object obj = ResourceManager.GetObject("LoadingSmallWhite", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}

View file

@ -1193,9 +1193,6 @@ Would you like to download and install it?</value>
<data name="AmazonS3StorageClass_STANDARD_IA" xml:space="preserve">
<value>Amazon S3 Standard-Infrequent Access</value>
</data>
<data name="LoadingSmall" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingSmall.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="RandomNonAmbiguousAlphanumericCharRepeatUsingN" xml:space="preserve">
<value>Random non ambiguous alphanumeric char. Repeat using {n}</value>
</data>
@ -1250,4 +1247,10 @@ Would you like to download and install it?</value>
<data name="AmazonS3StorageClass_ONEZONE_IA" xml:space="preserve">
<value>Amazon S3 One Zone-Infrequent Access</value>
</data>
<data name="LoadingSmallBlack" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingSmallBlack.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="LoadingSmallWhite" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\LoadingSmallWhite.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View file

Before

Width:  |  Height:  |  Size: 847 B

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

View file

@ -1473,7 +1473,10 @@
<None Include="Resources\ShareX_Icon_White.ico" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\LoadingSmall.gif" />
<None Include="Resources\LoadingSmallBlack.gif" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\LoadingSmallWhite.gif" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View file

@ -38,7 +38,7 @@ private void InitializeComponent()
//
// pbLoading
//
this.pbLoading.Image = global::ShareX.HelpersLib.Properties.Resources.LoadingSmall;
this.pbLoading.Image = global::ShareX.HelpersLib.Properties.Resources.LoadingSmallBlack;
resources.ApplyResources(this.pbLoading, "pbLoading");
this.pbLoading.Name = "pbLoading";
this.pbLoading.TabStop = false;

View file

@ -60,6 +60,18 @@ public void CheckUpdate(UpdateChecker updateChecker)
}
}
public void UpdateLoadingImage()
{
if (ShareXResources.IsDarkTheme)
{
pbLoading.Image = Resources.LoadingSmallWhite;
}
else
{
pbLoading.Image = Resources.LoadingSmallBlack;
}
}
private void CheckingUpdate()
{
updateChecker.CheckUpdate();

View file

@ -61,6 +61,8 @@ public AboutForm()
#else
if (!Program.PortableApps)
{
uclUpdate.UpdateLoadingImage();
UpdateChecker updateChecker = Program.UpdateManager.CreateUpdateChecker();
uclUpdate.CheckUpdate(updateChecker);
}