mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
* Removing background accent. It causes eye to target ones differently due to shading differences * forcing radius * Update DashboardPage.xaml * Remove unused accent color from modules listing --------- Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
69 lines
1.8 KiB
C#
69 lines
1.8 KiB
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.Collections.ObjectModel;
|
|
using System.ComponentModel;
|
|
using System.Runtime.CompilerServices;
|
|
using ManagedCommon;
|
|
using Microsoft.UI;
|
|
using Windows.UI;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
|
{
|
|
public class DashboardListItem : INotifyPropertyChanged
|
|
{
|
|
private bool _visible;
|
|
private bool _isEnabled;
|
|
|
|
public string Label { get; set; }
|
|
|
|
public string Icon { get; set; }
|
|
|
|
public string ToolTip { get; set; }
|
|
|
|
public ModuleType Tag { get; set; }
|
|
|
|
public bool IsLocked { get; set; }
|
|
|
|
public bool IsEnabled
|
|
{
|
|
get => _isEnabled;
|
|
set
|
|
{
|
|
if (_isEnabled != value)
|
|
{
|
|
_isEnabled = value;
|
|
OnPropertyChanged();
|
|
EnabledChangedCallback?.Invoke(this);
|
|
}
|
|
}
|
|
}
|
|
|
|
public Action<DashboardListItem> EnabledChangedCallback { get; set; }
|
|
|
|
public bool Visible
|
|
{
|
|
get => _visible;
|
|
set
|
|
{
|
|
if (_visible != value)
|
|
{
|
|
_visible = value;
|
|
OnPropertyChanged();
|
|
}
|
|
}
|
|
}
|
|
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
|
|
private void OnPropertyChanged([CallerMemberName] string propertyName = null)
|
|
{
|
|
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
|
}
|
|
|
|
public ObservableCollection<DashboardModuleItem> DashboardModuleItems { get; set; } = new ObservableCollection<DashboardModuleItem>();
|
|
}
|
|
}
|