mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-07-05 09:59:28 +02:00
Compare commits
2 Commits
copilot/fi
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
466bd0c0a5 | ||
|
|
8db30b7e46 |
@@ -129,8 +129,8 @@ public partial class ContentPageViewModel : PageViewModel, ICommandBarContext
|
||||
|
||||
UpdateDetails();
|
||||
|
||||
FetchContent();
|
||||
model.ItemsChanged += Model_ItemsChanged;
|
||||
FetchContent();
|
||||
|
||||
DoOnUiThread(
|
||||
() =>
|
||||
|
||||
@@ -44,9 +44,9 @@ public partial class ContentTreeViewModel(ITreeContent _tree, WeakReference<IPag
|
||||
UpdateProperty(nameof(Root));
|
||||
}
|
||||
|
||||
FetchContent();
|
||||
model.PropChanged += Model_PropChanged;
|
||||
model.ItemsChanged += Model_ItemsChanged;
|
||||
FetchContent();
|
||||
}
|
||||
|
||||
// Theoretically, we should unify this with the one in CommandPalettePageViewModelFactory
|
||||
|
||||
@@ -209,8 +209,8 @@ public sealed partial class DockBandViewModel : ExtensionObjectViewModel
|
||||
var list = command.Model.Unsafe as IListPage;
|
||||
if (list is not null)
|
||||
{
|
||||
InitializeFromList(list);
|
||||
list.ItemsChanged += HandleItemsChanged;
|
||||
InitializeFromList(list);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -957,8 +957,8 @@ public partial class ListViewModel : PageViewModel, IDisposable
|
||||
Filters?.InitializeProperties();
|
||||
UpdateProperty(nameof(Filters));
|
||||
|
||||
FetchItems(true);
|
||||
model.ItemsChanged += Model_ItemsChanged;
|
||||
FetchItems(true);
|
||||
}
|
||||
|
||||
private static IGridPropertiesViewModel? LoadGridPropertiesViewModel(IGridProperties? gridProperties)
|
||||
|
||||
@@ -22,7 +22,7 @@ internal sealed partial class ImageProvider : IImageProvider
|
||||
return RtbInlineImageFactory.Create(imageSource.ImageSource, new RtbInlineImageFactory.InlineImageOptions
|
||||
{
|
||||
DownscaleOnly = imageSource.Hints.DownscaleOnly ?? true,
|
||||
FitColumnWidth = imageSource.Hints.FitMode is null || imageSource.Hints.FitMode.Equals("fit", StringComparison.OrdinalIgnoreCase),
|
||||
FitColumnWidth = imageSource.Hints.FitMode == "fit",
|
||||
MaxWidthDip = imageSource.Hints.MaxPixelWidth,
|
||||
MaxHeightDip = imageSource.Hints.MaxPixelHeight,
|
||||
WidthDip = imageSource.Hints.DesiredPixelWidth,
|
||||
|
||||
@@ -154,8 +154,8 @@ internal sealed partial class SampleMarkdownImagesPage : ContentPage
|
||||
For URIs that support query parameters (file, http, ms-appx, ms-appdata), you can provide hints to control scaling
|
||||
|
||||
- `--x-cmdpal-fit`
|
||||
- `fit`: scale to fit the available space (default)
|
||||
- `none`: no automatic scaling, provides image as is
|
||||
- `none`: no automatic scaling, provides image as is (default)
|
||||
- `fit`: scale to fit the available space
|
||||
- `--x-cmdpal-upscale`
|
||||
- `true`: allow upscaling
|
||||
- `false`: downscale only (default)
|
||||
@@ -169,19 +169,18 @@ internal sealed partial class SampleMarkdownImagesPage : ContentPage
|
||||
## Examples
|
||||
|
||||
### No scaling
|
||||
ℹ️ This sample uses the source pixel size, so under non-100% DPI scaling the rendered size can differ from the image's natural visual size.
|
||||
```xml
|
||||

|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### Scale to fit (scaling down only by default)
|
||||
```xml
|
||||

|
||||

|
||||
```
|
||||
|
||||

|
||||

|
||||
|
||||
### Scale to fit (in both direction)
|
||||
```xml
|
||||
|
||||
Reference in New Issue
Block a user