Skip to content
This repository was archived by the owner on Feb 15, 2022. It is now read-only.

Commit 684ca52

Browse files
author
Jumar Macato
committed
update stuff
1 parent 047ffee commit 684ca52

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.vscode/launch.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"request": "launch",
1111
"preLaunchTask": "build",
1212
// If you have changed target frameworks, make sure to update the program path.
13-
"program": "${workspaceFolder}/Synfonia.Gui/bin/Debug/netcoreapp3.0/Synfonia.Gui.dll",
13+
"program": "${workspaceFolder}/Synfonia.Gui/bin/Debug/netcoreapp3.1/Synfonia.Gui.dll",
1414
"args": [],
1515
"cwd": "${workspaceFolder}",
1616
"enableStepFiltering": false,

Synfonia.Gui/Controls/ScrollingTextBlock.cs

+6-3
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public override void Render(DrawingContext context)
136136

137137
var constraints = this.Bounds.Deflate(Padding);
138138
var constraintsWidth = constraints.Width;
139-
139+
140140
_isConstrained = _textWidth >= constraintsWidth;
141141

142142
if (_isConstrained & !_waiting)
@@ -154,13 +154,16 @@ public override void Render(DrawingContext context)
154154
var nC = new Rect(0, padding.Top, constraintsWidth, constraints.Height);
155155

156156
if (nC.Intersects(nR))
157-
TextLayout.Draw(context, new Point(offset, padding.Top));
157+
using (context.PushPostTransform(Matrix.CreateTranslation(offset, padding.Top)))
158+
TextLayout.Draw(context);
158159
}
159160
}
160161
else
161162
{
162163
_animate = false;
163-
TextLayout.Draw(context, new Point(padding.Left, padding.Top));
164+
165+
using (context.PushPostTransform(Matrix.CreateTranslation(padding.Left, padding.Top)))
166+
TextLayout.Draw(context);
164167
}
165168
}
166169
}

Synfonia.Gui/Synfonia.Gui.csproj

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<OutputType>WinExe</OutputType>
4-
<TargetFramework>netcoreapp3.0</TargetFramework>
4+
<TargetFramework>netcoreapp3.1</TargetFramework>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
</PropertyGroup>
77
<ItemGroup>
@@ -20,7 +20,6 @@
2020
<PackageReference Include="Avalonia.Xaml.Behaviors" Version="0.10.0-preview5" />
2121
<PackageReference Include="DynamicData" Version="*" />
2222
<PackageReference Include="Nito.AsyncEx.Coordination" Version="*" />
23-
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
2423
<ProjectReference Include="..\Synfonia.Backend\Synfonia.Backend.csproj" />
2524
</ItemGroup>
2625
</Project>

Synfonia.Gui/Views/CollectionExplorerView.xaml

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
d:DesignWidth="800" d:DesignHeight="450" x:Class="Synfonia.Views.CollectionExplorerView">
1111

1212
<Panel MinWidth="100" MinHeight="100" Margin="0 0 0 100">
13+
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center">Right click here to scan your music library.</TextBlock>
1314
<ScrollViewer Name="scroller" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
1415
<ItemsRepeater Name="repeater" Background="Transparent" Items="{Binding Albums}" Margin="40 0">
1516
<ItemsRepeater.ContextMenu>

0 commit comments

Comments
 (0)