Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/crutkas/white space #10

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
more and more and more white space :)
  • Loading branch information
crutkas committed Aug 29, 2024
commit e929fe896786e1ad0cf94cedb0b73d65b1d0e5d2
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ public IListItem[] TopLevelCommands()
];
}

/ /listItem.Subtitle = "Bookmark";
// listItem.Subtitle = "Bookmark";
if (action is AddBookmarkPage) { }
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public FormPage()
// yep it's this dumb
var foreground = settings.GetColorValue(UIColorType.Foreground);
var lightTheme = foreground.R < 128;
Renderer.HostConfig = AdaptiveHostConfig.FromJsonString(lightTheme? LightHostConfig : DarkHostConfig).HostConfig;
Renderer.HostConfig = AdaptiveHostConfig.FromJsonString(lightTheme ? LightHostConfig : DarkHostConfig).HostConfig;

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,35 @@ namespace DeveloperCommandPalette;
public sealed class ListItemViewModel : INotifyPropertyChanged, IDisposable
{
private readonly DispatcherQueue DispatcherQueue;

internal IListItem ListItem { get; init; }

internal string Title { get; private set; }

internal string Subtitle { get; private set; }

internal string Icon { get; private set; }

internal Lazy<DetailsViewModel?> _Details;

internal DetailsViewModel? Details => _Details.Value;

internal IFallbackHandler? FallbackHandler => this.ListItem.FallbackHandler;

public event PropertyChangedEventHandler? PropertyChanged;

internal ICommand DefaultAction => ListItem.Command;

internal bool CanInvoke => DefaultAction != null && DefaultAction is IInvokableCommand or IPage;

internal IconElement IcoElement => Microsoft.Terminal.UI.IconPathConverter.IconMUX(Icon);

private IEnumerable<ICommandContextItem> contextActions => ListItem.MoreCommands == null ? [] : ListItem.MoreCommands.Where(i => i is ICommandContextItem).Select(i=> (ICommandContextItem)i);
private IEnumerable<ICommandContextItem> contextActions => ListItem.MoreCommands == null ? [] : ListItem.MoreCommands.Where(i => i is ICommandContextItem).Select(i => (ICommandContextItem)i);

internal bool HasMoreCommands => contextActions.Any();

internal TagViewModel[] Tags = [];

internal bool HasTags => Tags.Length > 0;

internal IList<ContextItemViewModel> ContextActions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ internal string Query
//
// instead run the query once when the action query changes, and store the
// results.
public IListItem[] Items => itemsToEnumerate.Where(i => i!= null).ToArray();
public IListItem[] Items => itemsToEnumerate.Where(i => i != null).ToArray();


public FilteredListSection(MainViewModel viewModel)
Expand Down