Layout and Push Fix
This commit is contained in:
+80
-106
@@ -8,132 +8,106 @@
|
||||
Title="Jahr"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
|
||||
<Grid Padding="16"
|
||||
RowSpacing="16"
|
||||
RowDefinitions="Auto,Auto,*">
|
||||
<Grid RowDefinitions="Auto,Auto,*"
|
||||
Padding="16"
|
||||
RowSpacing="12">
|
||||
|
||||
<Grid Grid.Row="0"
|
||||
ColumnDefinitions="Auto,*,Auto"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="◀"
|
||||
Command="{Binding PreviousYearCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*,Auto"
|
||||
VerticalOptions="Center">
|
||||
<Button Text="←"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding PreviousYearCommand}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="{Binding HeaderText}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
Text="{Binding HeaderText}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Text="→"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding NextYearCommand}" />
|
||||
Text="▶"
|
||||
Command="{Binding NextYearCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1"
|
||||
ColumnDefinitions="*,*"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="Heute"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding TodayCommand}" />
|
||||
Command="{Binding TodayCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Export"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding ExportPdfCommand}" />
|
||||
Command="{Binding ExportPdfCommand}"
|
||||
Style="{StaticResource PrimaryButtonStyle}" />
|
||||
</Grid>
|
||||
|
||||
<CollectionView Grid.Row="2"
|
||||
ItemsSource="{Binding Months}"
|
||||
SelectionMode="None"
|
||||
VerticalOptions="Fill"
|
||||
HorizontalOptions="Fill"
|
||||
ItemSizingStrategy="MeasureAllItems">
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthSectionViewModel">
|
||||
<Border Padding="12"
|
||||
Margin="0,0,0,12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="10">
|
||||
<Label Text="{Binding Title}"
|
||||
FontSize="18"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<ScrollView Grid.Row="2">
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Months}"
|
||||
Spacing="14">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthSectionViewModel">
|
||||
<Border Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 12"
|
||||
Padding="10">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="{Binding Title}"
|
||||
FontSize="18"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
||||
ColumnSpacing="4">
|
||||
<Label Text="Mo" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
||||
ColumnSpacing="4">
|
||||
<Label Text="Mo" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="1" Text="Di" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="2" Text="Mi" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="3" Text="Do" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="4" Text="Fr" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="5" Text="Sa" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
<Label Grid.Column="6" Text="So" HorizontalTextAlignment="Center" FontSize="11" TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<CollectionView ItemsSource="{Binding Cells}"
|
||||
SelectionMode="None"
|
||||
ItemSizingStrategy="MeasureFirstItem">
|
||||
<CollectionView.ItemsLayout>
|
||||
<GridItemsLayout Orientation="Vertical"
|
||||
Span="7" />
|
||||
</CollectionView.ItemsLayout>
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
|
||||
<Border Margin="2"
|
||||
Padding="4"
|
||||
WidthRequest="46"
|
||||
HeightRequest="46"
|
||||
Stroke="{Binding BorderColor}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}"
|
||||
StrokeShape="RoundRectangle 8">
|
||||
<Border.Triggers>
|
||||
<DataTrigger TargetType="Border"
|
||||
Binding="{Binding IsPlaceholder}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="StrokeThickness" Value="0" />
|
||||
</DataTrigger>
|
||||
</Border.Triggers>
|
||||
<CollectionView ItemsSource="{Binding Cells}"
|
||||
SelectionMode="None">
|
||||
<CollectionView.ItemsLayout>
|
||||
<GridItemsLayout Orientation="Vertical"
|
||||
Span="7"
|
||||
VerticalItemSpacing="4"
|
||||
HorizontalItemSpacing="4" />
|
||||
</CollectionView.ItemsLayout>
|
||||
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:YearViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:YearViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
<CollectionView.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:MonthCellViewModel">
|
||||
<Border Stroke="{Binding BorderColor}"
|
||||
BackgroundColor="{Binding BackgroundColor}"
|
||||
StrokeShape="RoundRectangle 8"
|
||||
Padding="3"
|
||||
MinimumHeightRequest="30">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
<Grid RowDefinitions="Auto,*">
|
||||
<Label Text="{Binding DayNumberText}"
|
||||
IsVisible="{Binding ShowDayNumber}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="11"
|
||||
FontAttributes="Bold"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="{Binding TextColor}" />
|
||||
|
||||
<Border Grid.Row="1"
|
||||
IsVisible="{Binding ShowAverage}"
|
||||
Margin="0,4,0,0"
|
||||
Padding="2"
|
||||
StrokeThickness="0"
|
||||
StrokeShape="RoundRectangle 5"
|
||||
BackgroundColor="{Binding StateColor}">
|
||||
<Label Text="{Binding AverageStateText}"
|
||||
FontSize="9"
|
||||
LineBreakMode="TailTruncation"
|
||||
MaxLines="1"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="White" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</CollectionView.ItemTemplate>
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user