display fix on flayout buttons
continuous-integration/drone/push Build is passing Details

pull/56/head
Alexandre AGOSTINHO 2 years ago
parent e87ddf566a
commit 3f884f0c1c

@ -16,7 +16,7 @@
<!-- Research --> <!-- Research -->
<Label <Label
Text="Recherche de recettes :" FontSize="14" Text="Recherche de recettes :" FontSize="14"
Margin="20, 10, 15, 0"/> Margin="20, 0, 15, 0"/>
<SearchBar <SearchBar
Placeholder="Mots-clés (ex.: rapide, fromage)" Placeholder="Mots-clés (ex.: rapide, fromage)"
TextColor="Black" TextColor="Black"
@ -26,7 +26,7 @@
<!-- Direct research --> <!-- Direct research -->
<Button <Button
Text="Suggestions" Text="Suggestions" x:Name="suggestions_button"
ImageSource="home_icon.png" ImageSource="home_icon.png"
Style="{StaticResource button1}" Style="{StaticResource button1}"
Clicked="Suggestions_Clicked" Clicked="Suggestions_Clicked"

@ -14,7 +14,7 @@ namespace Views
public Home() public Home()
{ {
Master.User.LogIn("admin", ""); // Master.User.LogIn("pedrosamigos@hotmail.com", "pamigos");
_recipesDisplayed = Master.Recipe.GetAllRecipes(); _recipesDisplayed = Master.Recipe.GetAllRecipes();
if (Master.User.CurrentConnected is null) if (Master.User.CurrentConnected is null)
@ -26,8 +26,10 @@ namespace Views
InitializeComponent(); InitializeComponent();
BindingContext = this;
container_base.IsConnected = Master.User.CurrentConnected is not null; container_base.IsConnected = Master.User.CurrentConnected is not null;
suggestions_button.IsVisible = container_base.IsConnected;
BindingContext = this;
} }

@ -7,10 +7,10 @@
x:Name="fl" x:Name="fl"
BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray600}}"> BackgroundColor="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray600}}">
<Grid RowDefinitions="250, *, 100"> <Grid RowDefinitions="Auto, *, Auto">
<VerticalStackLayout Grid.Row="0"> <VerticalStackLayout Grid.Row="0">
<Grid RowDefinitions="auto, *"> <Grid RowDefinitions="Auto, *">
<!-- Return --> <!-- Return -->
<local:ReturnButton NeedReturn="{Binding NeedReturn, Source={x:Reference fl}}" Grid.Row="0" <local:ReturnButton NeedReturn="{Binding NeedReturn, Source={x:Reference fl}}" Grid.Row="0"
HorizontalOptions="Start" Padding="10, 10, 0, 0"/> HorizontalOptions="Start" Padding="10, 10, 0, 0"/>
@ -28,22 +28,29 @@
<!-- Connection button --> <!-- Connection button -->
<Button Text="Connection" ImageSource="login_icon.png" <Button Text="Connection" ImageSource="login_icon.png"
Style="{StaticResource button2}" Style="{StaticResource button2}"
Margin="15, 120" Margin="15, 50"
IsVisible="{Binding IsConnected, Converter={toolkit:InvertedBoolConverter}, Source={x:Reference fl}}" IsVisible="{Binding IsConnected, Converter={toolkit:InvertedBoolConverter}, Source={x:Reference fl}}"
Clicked="ConnectionButton_Clicked"/> Clicked="ConnectionButton_Clicked"/>
<!-- Display name --> <!-- Display name -->
<StackLayout BindingContext="{Binding ConnectedUser}" <FlexLayout
IsVisible="{Binding IsConnected, Source={x:Reference fl}}"> Margin="0, 10"
Wrap="Wrap"
AlignItems="Center"
HorizontalOptions="Center"
BindingContext="{Binding ConnectedUser}"
IsVisible="{Binding IsConnected, Source={x:Reference fl}}">
<Label Text="{Binding Name}" <Label Text="{Binding Name}"
HorizontalOptions="Center" Margin="0,15" HorizontalOptions="Center" Margin="2,0"
FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center" FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/> TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
<Label Text="{Binding Surname}" <Label Text="{Binding Surname}"
HorizontalOptions="Center" HorizontalOptions="Center" Margin="2,0"
FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center" FontSize="20" FontAttributes="Bold" HorizontalTextAlignment="Center"
TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/> TextColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}"/>
</StackLayout> </FlexLayout>
</VerticalStackLayout> </VerticalStackLayout>
@ -51,10 +58,12 @@
<ContentView <ContentView
VerticalOptions="Fill" VerticalOptions="Fill"
Grid.Row="1" Grid.Row="1"
Margin="0, 30"
Content="{Binding MyFlyoutContent, Source={x:Reference fl}}"/> Content="{Binding MyFlyoutContent, Source={x:Reference fl}}"/>
<VerticalStackLayout Grid.Row="2"> <VerticalStackLayout Grid.Row="2"
Margin="0, 20">
<!-- Footer --> <!-- Footer -->
<Button Text="Déconnection" ImageSource="logout_icon.png" <Button Text="Déconnection" ImageSource="logout_icon.png"
Style="{StaticResource button2}" Style="{StaticResource button2}"

Loading…
Cancel
Save