1
0
Fork 0
mirror of https://github.com/Nioux/AideDeJeu.git synced 2025-10-29 14:35:45 +00:00

Icones bookmarks

This commit is contained in:
Yan Maniez 2018-09-19 13:47:22 +02:00
parent b578967f21
commit f8f43f049f
24 changed files with 196 additions and 41 deletions

View file

@ -224,5 +224,41 @@
<ItemGroup>
<AndroidResource Include="Resources\values\colors.xml" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\plain_arrow_down.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\plain_arrow_up.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\trash_can.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\plain_arrow_down.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\plain_arrow_up.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-hdpi\trash_can.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\plain_arrow_down.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\plain_arrow_up.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xhdpi\trash_can.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\plain_arrow_down.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\plain_arrow_up.png" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable-xxhdpi\trash_can.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

View file

@ -2219,26 +2219,26 @@ namespace AideDeJeu.Droid
// aapt resource value: 0x7f020053
public const int avd_hide_password = 2130837587;
// aapt resource value: 0x7f020118
public const int avd_hide_password_1 = 2130837784;
// aapt resource value: 0x7f02011b
public const int avd_hide_password_1 = 2130837787;
// aapt resource value: 0x7f020119
public const int avd_hide_password_2 = 2130837785;
// aapt resource value: 0x7f02011c
public const int avd_hide_password_2 = 2130837788;
// aapt resource value: 0x7f02011a
public const int avd_hide_password_3 = 2130837786;
// aapt resource value: 0x7f02011d
public const int avd_hide_password_3 = 2130837789;
// aapt resource value: 0x7f020054
public const int avd_show_password = 2130837588;
// aapt resource value: 0x7f02011b
public const int avd_show_password_1 = 2130837787;
// aapt resource value: 0x7f02011e
public const int avd_show_password_1 = 2130837790;
// aapt resource value: 0x7f02011c
public const int avd_show_password_2 = 2130837788;
// aapt resource value: 0x7f02011f
public const int avd_show_password_2 = 2130837791;
// aapt resource value: 0x7f02011d
public const int avd_show_password_3 = 2130837789;
// aapt resource value: 0x7f020120
public const int avd_show_password_3 = 2130837792;
// aapt resource value: 0x7f020055
public const int crystal_ball = 2130837589;
@ -2795,11 +2795,11 @@ namespace AideDeJeu.Droid
// aapt resource value: 0x7f02010d
public const int notification_icon_background = 2130837773;
// aapt resource value: 0x7f020116
public const int notification_template_icon_bg = 2130837782;
// aapt resource value: 0x7f020119
public const int notification_template_icon_bg = 2130837785;
// aapt resource value: 0x7f020117
public const int notification_template_icon_low_bg = 2130837783;
// aapt resource value: 0x7f02011a
public const int notification_template_icon_low_bg = 2130837786;
// aapt resource value: 0x7f02010e
public const int notification_tile_bg = 2130837774;
@ -2808,22 +2808,31 @@ namespace AideDeJeu.Droid
public const int notify_panel_notification_icon_bg = 2130837775;
// aapt resource value: 0x7f020110
public const int round_star = 2130837776;
public const int plain_arrow_down = 2130837776;
// aapt resource value: 0x7f020111
public const int settings_knobs = 2130837777;
public const int plain_arrow_up = 2130837777;
// aapt resource value: 0x7f020112
public const int spell_book = 2130837778;
public const int round_star = 2130837778;
// aapt resource value: 0x7f020113
public const int splash = 2130837779;
public const int settings_knobs = 2130837779;
// aapt resource value: 0x7f020114
public const int stars_stack = 2130837780;
public const int spell_book = 2130837780;
// aapt resource value: 0x7f020115
public const int wooden_sign = 2130837781;
public const int splash = 2130837781;
// aapt resource value: 0x7f020116
public const int stars_stack = 2130837782;
// aapt resource value: 0x7f020117
public const int trash_can = 2130837783;
// aapt resource value: 0x7f020118
public const int wooden_sign = 2130837784;
static Drawable()
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 933 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 722 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 741 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 875 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -69,21 +69,28 @@ namespace AideDeJeu.Tools
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
var level = value as int?;
if(level.HasValue)
try
{
int finallevel = level.Value;
int baselevel = 1;
if(int.TryParse(parameter as string, out baselevel))
var level = value as int?;
if (level.HasValue)
{
finallevel += baselevel;
}
finallevel = Math.Max(1, Math.Min(6, finallevel));
var heading = $"heading{finallevel}";
if (Application.Current.Resources.ContainsKey(heading))
{
return Application.Current.Resources[heading];
int finallevel = level.Value;
int baselevel = 1;
if (int.TryParse(parameter as string, out baselevel))
{
finallevel += baselevel;
}
finallevel = Math.Max(1, Math.Min(6, finallevel));
var heading = $"heading{finallevel}";
if (Application.Current.Resources.ContainsKey(heading))
{
return Application.Current.Resources[heading];
}
}
}
catch(Exception)
{
}
return Application.Current.Resources["paragraph"];
}

View file

@ -22,7 +22,7 @@
<Entry Grid.Column="0" Grid.Row="0" Style="{StaticResource heading1}" HorizontalOptions="FillAndExpand" />
<ListView Grid.Column="0" Grid.Row="1" x:Name="ItemsListView" SelectionMode="None" ItemsSource="{Binding BookmarkCollection}" VerticalOptions="FillAndExpand">
<ListView Grid.Column="0" Grid.Row="1" x:Name="ItemsListView" SelectionMode="None" ItemsSource="{Binding BookmarkCollection}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" >
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
@ -34,7 +34,7 @@
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="3" Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
<Button Grid.Column="0" Grid.Row="2" Text="Sypprimer" Command="{Binding BindingContext.RemoveItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
<Button Grid.Column="0" Grid.Row="2" Text="Supprimer" Command="{Binding BindingContext.RemoveItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
<Button Grid.Column="1" Grid.Row="2" Text="Monter" Command="{Binding BindingContext.MoveUpItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
<Button Grid.Column="2" Grid.Row="2" Text="Descendre" Command="{Binding BindingContext.MoveDownItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
</Grid>

View file

@ -9,6 +9,7 @@
<ContentPage.Resources>
<ResourceDictionary>
<tools:IntToBooleanConverter x:Key="IntToBooleanConverter" NonZeroValue="False" NullOrZeroValue="True" />
<tools:HeaderLevelToStyleConverter x:Key="HeaderLevelToStyleConverter" />
</ResourceDictionary>
</ContentPage.Resources>
<ContentPage.ToolbarItems>
@ -29,14 +30,40 @@
<Label Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" Margin="15,0,15,0" Style="{StaticResource heading3}" Text="Cette liste est vide, ajoutez des éléments à partir de la bibliothèque !" IsVisible="{Binding BookmarkCollection.Count, Converter={StaticResource IntToBooleanConverter}}" />
<ListView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ItemsListView" ItemsSource="{Binding BookmarkCollection}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
<ListView Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" x:Name="ItemsListView" SelectionMode="None" ItemsSource="{Binding BookmarkCollection}" VerticalOptions="FillAndExpand" HasUnevenRows="true" CachingStrategy="RecycleElement" SelectedItem="{Binding SelectedItem}" ItemTapped="ItemsListView_ItemTapped">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Padding="10" Orientation="Vertical">
<Label Text="{Binding Name}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="16" />
<Label Text="{Binding Link}" LineBreakMode="WordWrap" Style="{DynamicResource heading3}" FontSize="12" />
</StackLayout>
<Grid Padding="10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding Name}" LineBreakMode="WordWrap" TextColor="{StaticResource HDBlue}" Style="{Binding NameLevel,Converter={StaticResource HeaderLevelToStyleConverter}, ConverterParameter=1}" />
<Image Grid.Column="1" Source="trash_can.png" WidthRequest="32" HeightRequest="32">
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding BindingContext.RemoveItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
</Image.GestureRecognizers>
</Image>
<Image Grid.Column="2" Source="plain_arrow_up.png" WidthRequest="32" HeightRequest="2">
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding BindingContext.MoveUpItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
</Image.GestureRecognizers>
</Image>
<Image Grid.Column="3" Source="plain_arrow_down.png" WidthRequest="32" HeightRequest="32">
<Image.GestureRecognizers>
<TapGestureRecognizer Command="{Binding BindingContext.MoveDownItemCommand, Source={x:Reference This}}" CommandParameter="{Binding}" />
</Image.GestureRecognizers>
</Image>
</Grid>
<!--<StackLayout Padding="10" Orientation="Vertical">
<Label Text="{Binding Name}" LineBreakMode="WordWrap" TextColor="{StaticResource HDBlue}" Style="{Binding NameLevel,Converter={StaticResource HeaderLevelToStyleConverter}, ConverterParameter=1}" />
--><!--<Label Text="{Binding Link}" LineBreakMode="WordWrap" TextColor="{StaticResource HDLightGrey}" Style="{Binding NameLevel,Converter={StaticResource HeaderLevelToStyleConverter}, ConverterParameter=4}" />--><!--
</StackLayout>-->
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>

View file

@ -1,4 +1,6 @@
goto nouveau
call convertone.bat crystal_ball.png crystal-ball.svg
call convertone.bat funnel.png funnel.svg
@ -13,4 +15,11 @@ call convertone.bat stars_stack.png stars-stack.svg
call convertone.bat wooden_sign.png wooden-sign.svg
:nouveau
call convertone.bat plain_arrow_down.png plain-arrow-down.svg
call convertone.bat plain_arrow_up.png plain-arrow-up.svg
call convertone.bat trash_can.png trash-can.svg
pause

View file

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#ffffff" fill-opacity="0"></path><g class="" style="touch-action: none;" transform="translate(0,0)"><path d="M130.81 21.785v245.95H43.84L256 489.382l212.158-221.644H381.19V21.786H130.81z" fill="#000000" fill-opacity="1"></path></g></svg>

After

Width:  |  Height:  |  Size: 368 B

View file

@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
style="height: 512px; width: 512px;"
viewBox="0 0 512 512"
version="1.1"
id="svg8"
sodipodi:docname="plain-arrow-up.svg"
inkscape:version="0.92.3 (2405546, 2018-03-11)">
<metadata
id="metadata14">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<defs
id="defs12" />
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="756"
inkscape:window-height="505"
id="namedview10"
showgrid="false"
inkscape:zoom="0.4609375"
inkscape:cx="256"
inkscape:cy="256"
inkscape:window-x="0"
inkscape:window-y="312"
inkscape:window-maximized="0"
inkscape:current-layer="svg8" />
<path
d="M0 0h512v512H0z"
fill="#ffffff"
fill-opacity="0"
id="path2" />
<g
class=""
transform="matrix(1,0,0,-1,0,511.167)"
id="g6">
<path
d="m 130.81,21.785 v 245.95 H 43.84 L 256,489.382 468.158,267.738 H 381.19 V 21.786 H 130.81 Z"
id="path4"
inkscape:connector-curvature="0"
style="fill:#000000;fill-opacity:1" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

1
Data/Icons/trash-can.svg Normal file
View file

@ -0,0 +1 @@
<svg style="height: 512px; width: 512px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 0h512v512H0z" fill="#ffffff" fill-opacity="0"></path><g class="" style="touch-action: none;" transform="translate(0,0)"><path d="M199 103v50h-78v30h270v-30h-78v-50H199zm18 18h78v32h-78v-32zm-79.002 80l30.106 286h175.794l30.104-286H137.998zm62.338 13.38l.64 8.98 16 224 .643 8.976-17.956 1.283-.64-8.98-16-224-.643-8.976 17.956-1.283zm111.328 0l17.955 1.284-.643 8.977-16 224-.64 8.98-17.956-1.284.643-8.977 16-224 .64-8.98zM247 215h18v242h-18V215z" fill="#000000" fill-opacity="1"></path></g></svg>

After

Width:  |  Height:  |  Size: 609 B