Fix not scrolling bug and formatting
MODIFY
WalletWasabi.Fluent/Controls/ScrollingTextBox.cs
WalletWasabi.Fluent/Controls/ScrollingTextBox.cs
@@ -32,14 +32,11 @@ namespace WalletWasabi.Fluent.Controls;
this.WhenAnyValue(x => x.Text)
.Subscribe(OnTextChanged);
- if (Clock is null)
- {
- Clock = new Clock();
- }
-
- Clock.Subscribe(Tick);
+ new Clock().Subscribe(Tick);
TextWrapping = TextWrapping.NoWrap;
+
+ AffectsRender<ScrollingTextBlock>(TextProperty);
}
private void OnTextChanged(string? obj)
@@ -159,20 +156,22 @@ namespace WalletWasabi.Fluent.Controls;
var nR = new Rect(offset, padding.Top, _textWidth, _textHeight);
var nC = new Rect(0, padding.Top, constraintsWidth, constraints.Height);
- if (nC.Intersects(nR))
+ if (!nC.Intersects(nR))
{
- using(context.PushPostTransform(Matrix.CreateTranslation(padding.Left, padding.Top)))
+ continue;
+ }
+
+ using (context.PushSetTransform(Matrix.CreateTranslation(nR.Left, nR.Top)))
{
TextLayout.Draw(context);
}
}
}
- }
else
{
_animate = false;
- using(context.PushPostTransform(Matrix.CreateTranslation(padding.Left, padding.Top)))
+ using (context.PushSetTransform(Matrix.CreateTranslation(padding.Left, padding.Top)))
{
TextLayout.Draw(context);
}

Fix not scrolling bug and formatting