1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

slider styling

This commit is contained in:
Kyle Spearrin 2019-06-22 09:45:54 -04:00
parent 164d79898a
commit 1705a21f68
6 changed files with 19 additions and 8 deletions

View File

@ -23,7 +23,14 @@ namespace Bit.Droid.Renderers
var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.slider_thumb, null);
if(t is GradientDrawable thumb)
{
thumb.SetColor(view.ThumbColor.ToAndroid());
if(view.ThumbColor == Color.Default)
{
thumb.SetColor(Color.White.ToAndroid());
}
else
{
thumb.SetColor(view.ThumbColor.ToAndroid());
}
thumb.SetStroke(3, view.ThumbBorderColor.ToAndroid());
Control.SetThumb(thumb);
}

View File

@ -62,9 +62,9 @@
</Style>
<Style TargetType="controls:ExtendedSlider">
<Setter Property="MinimumTrackColor"
Value="{StaticResource SliderTrackColor}" />
Value="{StaticResource SliderTrackMinColor}" />
<Setter Property="MaximumTrackColor"
Value="{StaticResource SliderTrackColor}" />
Value="{StaticResource SliderTrackMaxColor}" />
<Setter Property="ThumbColor"
Value="{StaticResource SliderThumbColor}" />
<Setter Property="ThumbBorderColor"

View File

@ -31,7 +31,8 @@
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
<Color x:Key="SliderThumbBorderColor">#000000</Color>
<Color x:Key="SliderTrackColor">#52bdfb</Color>
<Color x:Key="SliderTrackMinColor">#52bdfb</Color>
<Color x:Key="SliderTrackMaxColor">#52bdfb</Color>
<Color x:Key="ButtonTextColor">#000000</Color>
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>

View File

@ -31,7 +31,8 @@
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
<Color x:Key="SliderThumbBorderColor">#000000</Color>
<Color x:Key="SliderTrackColor">#52bdfb</Color>
<Color x:Key="SliderTrackMinColor">#52bdfb</Color>
<Color x:Key="SliderTrackMaxColor">#52bdfb</Color>
<Color x:Key="ButtonTextColor">#000000</Color>
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>

View File

@ -29,9 +29,10 @@
<Color x:Key="ListHeaderTextColor">#3c8dbc</Color>
<Color x:Key="ListHeaderBackgroundColor">#efeff4</Color>
<Color x:Key="SliderThumbColor">#ffffff</Color>
<Color x:Key="SliderThumbColor">Default</Color>
<Color x:Key="SliderThumbBorderColor">#b5b5b5</Color>
<Color x:Key="SliderTrackColor">#dddddd</Color>
<Color x:Key="SliderTrackMinColor">#3c8dbc</Color>
<Color x:Key="SliderTrackMaxColor">#dddddd</Color>
<Color x:Key="ButtonTextColor">#000000</Color>
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>

View File

@ -31,7 +31,8 @@
<Color x:Key="SliderThumbColor">#e5e9f0</Color>
<Color x:Key="SliderThumbBorderColor">#2e3440</Color>
<Color x:Key="SliderTrackColor">#81a1c1</Color>
<Color x:Key="SliderTrackMinColor">#81a1c1</Color>
<Color x:Key="SliderTrackMaxColor">#81a1c1</Color>
<Color x:Key="ButtonTextColor">#000000</Color>
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>