mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Add info bar if blocked elements present in Svg (#1620)
* Added logic to check for blocked elements * Added unit tests * Fix warnings from msi solution
This commit is contained in:
@@ -15,6 +15,7 @@ using System.Xml.Linq;
|
||||
using Common;
|
||||
using Common.Utilities;
|
||||
using PreviewHandlerCommon;
|
||||
using SvgPreviewHandler.Utilities;
|
||||
|
||||
namespace SvgPreviewHandler
|
||||
{
|
||||
@@ -58,6 +59,13 @@ namespace SvgPreviewHandler
|
||||
}
|
||||
}
|
||||
|
||||
// Add a info bar on top of the Preview if any blocked element is present.
|
||||
if (SvgPreviewHandlerHelper.CheckBlockedElements(svgData))
|
||||
{
|
||||
this.infoBarAdded = true;
|
||||
this.AddTextBoxControl(Resource.BlockedElementInfoText);
|
||||
}
|
||||
|
||||
this.AddBrowserControl(svgData);
|
||||
this.Resize += this.FormResized;
|
||||
base.DoPreview(dataSource);
|
||||
|
||||
Reference in New Issue
Block a user