mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Fixed LED UI rendering perf
This commit is contained in:
1 parent
b3e035cfb3
commit
dcf206dbaf
2 files changed
+33
-8
No files matched your search
@@ -8,20 +8,22 @@
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance rgbDevice:RgbLedViewModel}"
|
||||
d:DesignHeight="450" d:DesignWidth="800">
|
||||
<Border Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Border.Background>
|
||||
<Grid Width="{Binding Width}" Height="{Binding Height}">
|
||||
<Grid.Background>
|
||||
<ImageBrush AlignmentX="Center" AlignmentY="Center"
|
||||
Stretch="Fill"
|
||||
ImageSource="{Binding Led.Image}" />
|
||||
</Border.Background>
|
||||
</Grid.Background>
|
||||
|
||||
<Path Data="{Binding DisplayGeometry}" ClipToBounds="False" StrokeThickness="2">
|
||||
<Path.Fill>
|
||||
<SolidColorBrush Color="{Binding DisplayColor}" Opacity="0.25" />
|
||||
</Path.Fill>
|
||||
<!-- TODO: Causes big perf degradation because it makes the entire path recalculate its size -->
|
||||
<Path.Stroke>
|
||||
<SolidColorBrush Color="{Binding DisplayColor}" />
|
||||
</Path.Stroke>
|
||||
</Path>
|
||||
</Border>
|
||||
<Path Data="{Binding StrokeGeometry}" ClipToBounds="False" StrokeThickness="2">
|
||||
<Path.Fill>
|
||||
<SolidColorBrush Color="{Binding DisplayColor}" />
|
||||
</Path.Fill>
|
||||
</Path>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
Reference in new issue
Block a user