mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-01-14 07:06:15 +08:00
Improve UI: Refine Recycle Bin icon display #1610
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Plugin;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
@@ -28,26 +29,18 @@ public partial class CLSIDInfoPanel : UserControl
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public void DisplayInfo(string path)
|
||||
public void DisplayInfo(string path, ContextObject context)
|
||||
{
|
||||
switch (path.ToUpper())
|
||||
Content = path.ToUpper() switch
|
||||
{
|
||||
case CLSIDRegister.RecycleBin:
|
||||
Content = new RecycleBinPanel();
|
||||
break;
|
||||
|
||||
case CLSIDRegister.ThisPC:
|
||||
Content = new ThisPCPanel();
|
||||
break;
|
||||
|
||||
default:
|
||||
Content = new TextBlock()
|
||||
{
|
||||
Text = $"Unsupported for {path}",
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
};
|
||||
break;
|
||||
}
|
||||
CLSIDRegister.RecycleBin => new RecycleBinPanel(context),
|
||||
CLSIDRegister.ThisPC => new ThisPCPanel(context),
|
||||
_ => new TextBlock()
|
||||
{
|
||||
Text = $"Unsupported for {path}",
|
||||
HorizontalAlignment = HorizontalAlignment.Center,
|
||||
VerticalAlignment = VerticalAlignment.Center,
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user