mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
[FZ Editor] Added resolution to monitor (#10567)
* Added resolution * Added resolution * Fontsize fix Co-authored-by: Niels Laute <niels9001@hotmail.com>
This commit is contained in:
@@ -84,6 +84,9 @@
|
|||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ToolTip>
|
</ToolTip>
|
||||||
</Border.ToolTip>
|
</Border.ToolTip>
|
||||||
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
||||||
|
|
||||||
|
|
||||||
<TextBlock Name="IndexText"
|
<TextBlock Name="IndexText"
|
||||||
TextTrimming="CharacterEllipsis"
|
TextTrimming="CharacterEllipsis"
|
||||||
Text="{Binding Index}"
|
Text="{Binding Index}"
|
||||||
@@ -93,6 +96,17 @@
|
|||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
Foreground="{DynamicResource PrimaryForegroundBrush}" />
|
||||||
|
<TextBlock Name="ResolutionText"
|
||||||
|
TextTrimming="CharacterEllipsis"
|
||||||
|
Text="{Binding Dimensions}"
|
||||||
|
Grid.Row="0"
|
||||||
|
Margin="0,0,0,0"
|
||||||
|
FontSize="11"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Foreground="{DynamicResource SecondaryForegroundBrush}" />
|
||||||
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
<DataTemplate.Triggers>
|
<DataTemplate.Triggers>
|
||||||
<DataTrigger Binding="{Binding Selected}"
|
<DataTrigger Binding="{Binding Selected}"
|
||||||
@@ -100,6 +114,10 @@
|
|||||||
<Setter TargetName="IndexText"
|
<Setter TargetName="IndexText"
|
||||||
Property="Foreground"
|
Property="Foreground"
|
||||||
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
||||||
|
<Setter TargetName="ResolutionText"
|
||||||
|
Property="Foreground"
|
||||||
|
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
||||||
|
|
||||||
<Setter TargetName="MonitorItem"
|
<Setter TargetName="MonitorItem"
|
||||||
Property="BorderBrush"
|
Property="BorderBrush"
|
||||||
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
Value="{DynamicResource SystemControlBackgroundAccentBrush}" />
|
||||||
@@ -329,7 +347,6 @@
|
|||||||
<local1:MonitorViewModel x:Name="monitorViewModel" />
|
<local1:MonitorViewModel x:Name="monitorViewModel" />
|
||||||
</ScrollViewer.DataContext>
|
</ScrollViewer.DataContext>
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|
||||||
<ItemsControl x:Name="MainWindowItemControl"
|
<ItemsControl x:Name="MainWindowItemControl"
|
||||||
TabIndex="0"
|
TabIndex="0"
|
||||||
ItemTemplate="{StaticResource MonitorItemTemplate}"
|
ItemTemplate="{StaticResource MonitorItemTemplate}"
|
||||||
@@ -342,7 +359,6 @@
|
|||||||
Margin="8, 0, 8, 16" />
|
Margin="8, 0, 8, 16" />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ItemsControl.ItemsPanel>
|
</ItemsControl.ItemsPanel>
|
||||||
|
|
||||||
</ItemsControl>
|
</ItemsControl>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ namespace FancyZonesEditor.ViewModels
|
|||||||
|
|
||||||
double maxMultiplier = MaxPreviewDisplaySize / maxDimension;
|
double maxMultiplier = MaxPreviewDisplaySize / maxDimension;
|
||||||
double minMultiplier = MinPreviewDisplaySize / minDimension;
|
double minMultiplier = MinPreviewDisplaySize / minDimension;
|
||||||
DesktopPreviewMultiplier = (minMultiplier + maxMultiplier) / 3.5;
|
DesktopPreviewMultiplier = (minMultiplier + maxMultiplier) / 2.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void RaisePropertyChanged(string propertyName)
|
private void RaisePropertyChanged(string propertyName)
|
||||||
|
|||||||
Reference in New Issue
Block a user