app: burn-up window charts, estimated days, full breakdown, one tooltip
agent-review agent review: fail
agent-review agent review: fail
From developer feedback on the redesign: - Week use per day draws estimated days hatched beside measured ones. - Limit history becomes a burn-up chart per window instance: even-pace diagonal, used line without point markers, forecast to the reset, the previous instance faintly, and a strip of past peaks with their real start and end. - The breakdown has its detail columns back, sorts by any column and expands "Other" to every row. - One tooltip component, a title and a label/value grid, for every chart and table. Also the review notes of #7: dated forecasts, the real span of the recent rate, keyboard focus, distinct settings names, a wheel that no longer changes selections, and version 1.1.0. Refs #5, #7
This commit is contained in:
@@ -54,27 +54,35 @@ public static class Ui
|
||||
presenter.Bind(ContentPresenter.FontWeightProperty, button.GetObservable(TemplatedControl.FontWeightProperty));
|
||||
var border = new Border { Child = presenter, Padding = new Thickness(8, 6), CornerRadius = new CornerRadius(4) };
|
||||
border.Bind(Border.BackgroundProperty, button.GetObservable(TemplatedControl.BackgroundProperty));
|
||||
border.BorderThickness = new Thickness(1); border.Bind(Border.BorderBrushProperty, button.GetObservable(TemplatedControl.BorderBrushProperty));
|
||||
return border;
|
||||
})));
|
||||
window.Styles.Add(segments);
|
||||
var focusSegment = new Style(s => s.OfType<ToggleButton>().Class("segment").Class(":focus-visible"));
|
||||
focusSegment.Setters.Add(new Setter(TemplatedControl.BorderBrushProperty, new DynamicResourceExtension("Ink"))); window.Styles.Add(focusSegment);
|
||||
var selected = new Style(s => s.OfType<ToggleButton>().Class("segment").Class(":checked"));
|
||||
selected.Setters.Add(new Setter(TemplatedControl.BackgroundProperty, new DynamicResourceExtension("Selection")));
|
||||
selected.Setters.Add(new Setter(TemplatedControl.FontWeightProperty, FontWeight.SemiBold)); window.Styles.Add(selected);
|
||||
var checks = new Style(s => s.OfType<CheckBox>());
|
||||
checks.Setters.Add(new Setter(TemplatedControl.TemplateProperty, new FuncControlTemplate<CheckBox>((check, _) =>
|
||||
var checks = new Style(s => s.OfType<NeutralCheckBox>());
|
||||
checks.Setters.Add(new Setter(TemplatedControl.BorderBrushProperty, Brushes.Transparent));
|
||||
checks.Setters.Add(new Setter(TemplatedControl.TemplateProperty, new FuncControlTemplate<NeutralCheckBox>((check, _) =>
|
||||
{
|
||||
var glyph = Text("✓", 14); glyph.Name = "NeutralCheckGlyph"; glyph.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
var box = new Border { Name = "NeutralCheckSurface", Child = glyph, Width = 20, Height = 20, CornerRadius = new CornerRadius(4),
|
||||
BorderThickness = new Thickness(1), VerticalAlignment = VerticalAlignment.Center };
|
||||
box.Bind(Border.BackgroundProperty, box.GetResourceObservable("Selection")); box.Bind(Border.BorderBrushProperty, box.GetResourceObservable("Axis"));
|
||||
glyph.IsVisible = check.IsChecked == true; check.IsCheckedChanged += (_, _) => glyph.IsVisible = check.IsChecked == true;
|
||||
glyph.Bind(Visual.IsVisibleProperty, check.GetObservable(NeutralCheckBox.MarkVisibleProperty));
|
||||
var label = new ContentPresenter { Margin = new Thickness(8, 0, 0, 0), VerticalAlignment = VerticalAlignment.Center };
|
||||
label.Bind(ContentPresenter.ContentProperty, check.GetObservable(ContentControl.ContentProperty));
|
||||
label.Bind(ContentPresenter.ForegroundProperty, label.GetResourceObservable("Ink"));
|
||||
var grid = new Grid { ColumnDefinitions = new ColumnDefinitions("20,*"), MinHeight = 32 };
|
||||
grid.Children.Add(box); Grid.SetColumn(label, 1); grid.Children.Add(label); return grid;
|
||||
grid.Children.Add(box); Grid.SetColumn(label, 1); grid.Children.Add(label);
|
||||
var focus = new Border { Child = grid, BorderThickness = new Thickness(1), CornerRadius = new CornerRadius(4) };
|
||||
focus.Bind(Border.BorderBrushProperty, check.GetObservable(TemplatedControl.BorderBrushProperty)); return focus;
|
||||
})));
|
||||
window.Styles.Add(checks);
|
||||
var focusCheck = new Style(s => s.OfType<NeutralCheckBox>().Class(":focus-visible"));
|
||||
focusCheck.Setters.Add(new Setter(TemplatedControl.BorderBrushProperty, new DynamicResourceExtension("Ink"))); window.Styles.Add(focusCheck);
|
||||
}
|
||||
// Explicit palettes keep every remaining Fluent control independent of the OS accent.
|
||||
public static FluentTheme NeutralTheme()
|
||||
|
||||
Reference in New Issue
Block a user