Skip to content

Commit

Permalink
Prevent showing private memory usage on macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
hamster620 committed Oct 23, 2021
1 parent 2f60508 commit dd0b7d2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion PixelViewer/Controls/SessionControl.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
<StackPanel Orientation="Horizontal" VerticalAlignment="Center">
<TextBlock Classes="StatusBar_TextBlock" Text="{Binding RenderedImagesMemoryUsage, Converter={x:Static asConverters:FileSizeConverter.Default}}" ToolTip.Placement="Left" ToolTip.Tip="{DynamicResource String/SessionControl.RenderedImagesMemoryUsage}"/>
<TextBlock Classes="StatusBar_TextBlock" Text="{Binding TotalRenderedImagesMemoryUsage, Converter={x:Static asConverters:FileSizeConverter.Default}, StringFormat={}/{0}}" ToolTip.Placement="Left" ToolTip.Tip="{DynamicResource String/SessionControl.TotalRenderedImagesMemoryUsage}"/>
<TextBlock Classes="StatusBar_TextBlock" Text="{Binding Source={x:Static app:App.Current}, Path=ProcessInfo.PrivateMemoryUsage, Converter={x:Static asConverters:FileSizeConverter.Default}, StringFormat={}/{0}}}" ToolTip.Placement="Left" ToolTip.Tip="{DynamicResource String/SessionControl.PrivateMemoryUsage}"/>
<TextBlock Classes="StatusBar_TextBlock" IsVisible="{Binding $parent[UserControl].IsNotMacOS}" Text="{Binding Source={x:Static app:App.Current}, Path=ProcessInfo.PrivateMemoryUsage, Converter={x:Static asConverters:FileSizeConverter.Default}, StringFormat={}/{0}}}" ToolTip.Placement="Left" ToolTip.Tip="{DynamicResource String/SessionControl.PrivateMemoryUsage}"/>
</StackPanel>
</Panel>

Expand Down
3 changes: 3 additions & 0 deletions PixelViewer/Controls/SessionControl.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@ void CopyFilePath()
public double EffectiveRenderedImageScale { get => this.GetValue<double>(EffectiveRenderedImageScaleProperty); }


bool IsNotMacOS { get; } = !CarinaStudio.Platform.IsMacOS;


// Move to specific frame.
async void MoveToSpecificFrame()
{
Expand Down

0 comments on commit dd0b7d2

Please sign in to comment.