mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-06 06:46:04 +02:00
Fix reset feed/notification filters, fix print uploads being cropped still
This commit is contained in:
+10
-2
@@ -153,14 +153,22 @@ namespace VRCX
|
|||||||
var newHeight = image.Height;
|
var newHeight = image.Height;
|
||||||
var newWidth = image.Width;
|
var newWidth = image.Width;
|
||||||
if (image.Width < desiredWidth)
|
if (image.Width < desiredWidth)
|
||||||
|
{
|
||||||
|
var testHeight = (int)Math.Round(image.Height / (image.Width / (double)desiredWidth));
|
||||||
|
if (testHeight <= desiredHeight)
|
||||||
{
|
{
|
||||||
newWidth = desiredWidth;
|
newWidth = desiredWidth;
|
||||||
newHeight = (int)Math.Round(image.Height / (image.Width / (double)newWidth));
|
newHeight = testHeight;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (image.Height < desiredHeight)
|
if (image.Height < desiredHeight)
|
||||||
|
{
|
||||||
|
var testWidth = (int)Math.Round(image.Width / (image.Height / (double)desiredHeight));
|
||||||
|
if (testWidth <= desiredWidth)
|
||||||
{
|
{
|
||||||
newHeight = desiredHeight;
|
newHeight = desiredHeight;
|
||||||
newWidth = (int)Math.Round(image.Width / (image.Height / (double)newHeight));
|
newWidth = testWidth;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var resizedImage = new Bitmap(desiredWidth, desiredHeight);
|
var resizedImage = new Bitmap(desiredWidth, desiredHeight);
|
||||||
using var graphics1 = Graphics.FromImage(resizedImage);
|
using var graphics1 = Graphics.FromImage(resizedImage);
|
||||||
|
|||||||
@@ -583,14 +583,14 @@ export default class extends baseClass {
|
|||||||
this.sharedFeedFilters.noty = {
|
this.sharedFeedFilters.noty = {
|
||||||
...this.sharedFeedFiltersDefaults.noty
|
...this.sharedFeedFiltersDefaults.noty
|
||||||
};
|
};
|
||||||
await configRepository.setString('sharedFeedFilters', JSON.stringify(this.sharedFeedFiltersDefaults));
|
this.saveSharedFeedFilters();
|
||||||
},
|
},
|
||||||
|
|
||||||
async resetWristFeedFilters() {
|
async resetWristFeedFilters() {
|
||||||
this.sharedFeedFilters.wrist = {
|
this.sharedFeedFilters.wrist = {
|
||||||
...this.sharedFeedFiltersDefaults.wrist
|
...this.sharedFeedFiltersDefaults.wrist
|
||||||
};
|
};
|
||||||
await configRepository.setString('sharedFeedFilters', JSON.stringify(this.sharedFeedFiltersDefaults));
|
this.saveSharedFeedFilters();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user