-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
42 changed files
with
492 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Collections.ObjectModel; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
|
||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
using Wpf.Ui.Controls; | ||
|
||
namespace Corathing.Organizer.ViewModels; | ||
|
||
/// <summary> | ||
/// Extended <see cref="System.Windows.Controls.MenuItem"/> with <see cref="SymbolRegular"/> properties. | ||
/// </summary> | ||
public class MenuItem : System.Windows.Controls.MenuItem | ||
{ | ||
static MenuItem() | ||
{ | ||
IconProperty.OverrideMetadata(typeof(MenuItem), new FrameworkPropertyMetadata(null)); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets displayed <see cref="IconElement"/>. | ||
/// </summary> | ||
[System.Diagnostics.CodeAnalysis.SuppressMessage( | ||
"WpfAnalyzers.DependencyProperty", | ||
"WPF0012:CLR property type should match registered type", | ||
Justification = "seems harmless" | ||
)] | ||
public new IconElement Icon | ||
{ | ||
get => (IconElement)GetValue(IconProperty); | ||
set => SetValue(IconProperty, value); | ||
} | ||
} | ||
|
||
public partial class MainViewModel : ObservableObject | ||
{ | ||
|
||
[ObservableProperty] | ||
private ObservableCollection<MenuItem> _trayMenuItems = []; | ||
|
||
public MainViewModel() | ||
{ | ||
|
||
TrayMenuItems = [new() { Header = "Home", Tag = "tray_home" }]; | ||
} | ||
} |
40 changes: 0 additions & 40 deletions
40
src/Shared/Corathing.Contracts/Attributes/WidgetContextEntryAttribute.cs
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
src/Shared/Corathing.Contracts/Entries/CoraWidgetGenerationInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Corathing.Contracts.Entries; | ||
|
||
public class CoraWidgetGenerationInfo | ||
{ | ||
public string Name { get; set; } | ||
public string Description { get; set; } | ||
public string MenuPath { get; set; } | ||
public int MenuOrder { get; set; } | ||
} |
Oops, something went wrong.