Build ohne Warnungen, Kalendersymbol unter Linux sichtbar
#155: Die 15 Build-Warnungen sind beseitigt, keine davon war ein echter Fehler. - CS8848 (DashboardWindow): Klammern um "as string" vor dem switch; die Auswertung war schon richtig, jetzt ist sie auch eindeutig lesbar - CS8602 (PdfExporter): Style "Normal" legt MigraDoc immer an - 13x CS8618: Felder, die nur der parameterlose XAML-Konstruktor offen laesst #50: Fluent zeichnet das Kalenderblatt im CalendarDatePicker als 0,5-px-Rahmen. Unter Linux (Skalierung 1,0) fiel er weg, uebrig blieben Tageszahl und Punkt. Eigener Style mit Kalenderblatt aus ganzen Pixeln. Auf der VM in beiden Farbschemata geprueft; der Kalender klappt weiterhin auf. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -181,13 +181,34 @@
|
||||
einer 1px-Linie. Fluent bringt gerundete, gefüllte Flächen mit – deshalb hier
|
||||
flächendeckend zurückgesetzt. -->
|
||||
|
||||
<!-- Zum Kalenderknopf des CalendarDatePicker (Befund B-9 des Linux-Sichttests, wo statt
|
||||
eines Kalendersymbols eine "26" stand): Das ist NICHT unsere Formatvorlage. Am
|
||||
28.08.2026 auf der Linux-VM nachgemessen - die Zahl ist das heutige Datum (am 26.08.
|
||||
eine "26", am 28.08. eine "28"), und sie bleibt unveraendert, wenn man diese
|
||||
Vorlage per ":not(#PART_Button)" vom Knopf fernhaelt oder das Farbschema wechselt.
|
||||
Avalonia zeichnet dort die heutige Tageszahl in ein Kalenderblatt; unter Linux fehlt
|
||||
der Blatt-Glyph, uebrig bleibt ein Punkt. Rein kosmetisch, siehe Bugtracker-Item #50. -->
|
||||
<!-- Kalenderknopf des CalendarDatePicker (#50). Fluent zeichnet dort ein Kalenderblatt aus
|
||||
einem Rahmen mit 0,5 px Linienstaerke, darin die heutige Tageszahl und einen Punkt. Unter
|
||||
Linux (Skalierung 1,0) faellt der Halbpixel-Rahmen weg - uebrig blieben "26" und ein
|
||||
Punkt, was wie ein kaputtes Symbol aussah (Befund B-9, 26.08.2026, auf der VM nachgemessen).
|
||||
Ersetzt durch ein Kalenderblatt aus ganzen Pixeln, ohne Tageszahl: Das Symbol soll nur
|
||||
sagen "hier klappt ein Kalender auf". Farbe folgt dem Vordergrund des Knopfs und damit
|
||||
dem Farbschema. -->
|
||||
<Style Selector="CalendarDatePicker /template/ Button#PART_Button">
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Border Background="Transparent" Width="20" Height="24">
|
||||
<Grid Width="16" Height="15" RowDefinitions="4,*">
|
||||
<Border Grid.RowSpan="2" BorderThickness="1" BorderBrush="{TemplateBinding Foreground}" />
|
||||
<Border Grid.Row="0" Background="{TemplateBinding Foreground}" />
|
||||
<UniformGrid Grid.Row="1" Rows="2" Columns="3" Margin="3,2,3,3">
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
<Rectangle Width="2" Height="2" Fill="{TemplateBinding Foreground}" />
|
||||
</UniformGrid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="FontFamily" Value="{DynamicResource AppFontHeading}" />
|
||||
|
||||
@@ -125,7 +125,7 @@ namespace PolyTrader.App.Avalonia.Views
|
||||
int accId = (this.FindControl<ComboBox>("cbAccount")!.SelectedItem as FilterAccount)?.Id ?? -1;
|
||||
string module = this.FindControl<ComboBox>("cbModule")!.SelectedItem as string ?? "Alle Module";
|
||||
string mode = this.FindControl<ComboBox>("cbMode")!.SelectedItem as string ?? "Alle";
|
||||
int? days = this.FindControl<ComboBox>("cbRange")!.SelectedItem as string switch
|
||||
int? days = (this.FindControl<ComboBox>("cbRange")!.SelectedItem as string) switch
|
||||
{
|
||||
"7 Tage" => 7,
|
||||
"30 Tage" => 30,
|
||||
|
||||
@@ -40,9 +40,11 @@ namespace PolyTrader.App.Avalonia.Views
|
||||
/// </summary>
|
||||
public partial class LauncherWindow : UserControl
|
||||
{
|
||||
private readonly IModuleUiHost _uiHost;
|
||||
private readonly IServiceProvider _services;
|
||||
private readonly TradingState _state;
|
||||
// "= null!": Der parameterlose Konstruktor gibt es nur für den XAML-Lader und Previewer; im Betrieb
|
||||
// setzt der Konstruktor mit Diensten alle drei. Beseitigt drei der 15 Build-Warnungen (#155).
|
||||
private readonly IModuleUiHost _uiHost = null!;
|
||||
private readonly IServiceProvider _services = null!;
|
||||
private readonly TradingState _state = null!;
|
||||
private readonly DispatcherTimer _statusTimer = new() { Interval = TimeSpan.FromSeconds(1) };
|
||||
private readonly ObservableCollection<ViewTile> _windowButtons = new();
|
||||
private readonly ObservableCollection<AccountOverviewRow> _accountRows = new();
|
||||
|
||||
@@ -24,11 +24,13 @@ namespace PolyTrader.App.Avalonia.Views.Modules
|
||||
private readonly ObservableCollection<CopyOpenTradeRow> _openTrades = new();
|
||||
private readonly ObservableCollection<CopyClosedTradeRow> _closedTrades = new();
|
||||
|
||||
private readonly TradingState _state;
|
||||
private readonly CopyTradingState _copyState;
|
||||
private readonly ITrackedTraderRepository _traderRepo;
|
||||
private readonly ICopyTradingAccountSettingsRepository _settingsRepo;
|
||||
private readonly ICopyTradeLogRepository _tradeLog;
|
||||
// "= null!": Der parameterlose Konstruktor gibt es nur für den XAML-Lader und Previewer; im Betrieb
|
||||
// setzt der Konstruktor mit Diensten alle Felder (#155).
|
||||
private readonly TradingState _state = null!;
|
||||
private readonly CopyTradingState _copyState = null!;
|
||||
private readonly ITrackedTraderRepository _traderRepo = null!;
|
||||
private readonly ICopyTradingAccountSettingsRepository _settingsRepo = null!;
|
||||
private readonly ICopyTradeLogRepository _tradeLog = null!;
|
||||
|
||||
private List<CopyClosedTradeRow> _closedBase = new();
|
||||
private bool _loading;
|
||||
|
||||
@@ -21,11 +21,13 @@ namespace PolyTrader.App.Avalonia.Views.Modules
|
||||
private readonly ObservableCollection<RfPosition> _positions = new();
|
||||
private readonly ObservableCollection<RfClosedTrade> _history = new();
|
||||
|
||||
private readonly TradingState _state;
|
||||
private readonly IRfCandidateRepository _candidateRepo;
|
||||
private readonly IRfPositionRepository _positionRepo;
|
||||
private readonly IRfClosedTradeRepository _closedRepo;
|
||||
private readonly IRfSettingsRepository _settingsRepo;
|
||||
// "= null!": Der parameterlose Konstruktor gibt es nur für den XAML-Lader und Previewer; im Betrieb
|
||||
// setzt der Konstruktor mit Diensten alle Felder (#155).
|
||||
private readonly TradingState _state = null!;
|
||||
private readonly IRfCandidateRepository _candidateRepo = null!;
|
||||
private readonly IRfPositionRepository _positionRepo = null!;
|
||||
private readonly IRfClosedTradeRepository _closedRepo = null!;
|
||||
private readonly IRfSettingsRepository _settingsRepo = null!;
|
||||
|
||||
private RfSettings? _currentSettings;
|
||||
|
||||
|
||||
@@ -34,7 +34,8 @@ namespace PolyTrader.Modules.Accounting.Logic
|
||||
|
||||
var doc = new Document();
|
||||
doc.Info.Title = "Buchhalterische Abrechnung";
|
||||
var style = doc.Styles["Normal"];
|
||||
// "Normal" legt MigraDoc mit jedem Document selbst an - der Indexer ist nur als nullable deklariert.
|
||||
var style = doc.Styles["Normal"]!;
|
||||
// Wunschschrift; der Resolver weicht auf eine verfügbare aus, wenn es sie nicht gibt
|
||||
// (auf Linux z.B. DejaVu Sans).
|
||||
style.Font.Name = "Segoe UI";
|
||||
|
||||
Reference in New Issue
Block a user