mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
slider styling
This commit is contained in:
parent
164d79898a
commit
1705a21f68
6 changed files with 19 additions and 8 deletions
|
@ -23,7 +23,14 @@ namespace Bit.Droid.Renderers
|
||||||
var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.slider_thumb, null);
|
var t = ResourcesCompat.GetDrawable(Resources, Resource.Drawable.slider_thumb, null);
|
||||||
if(t is GradientDrawable thumb)
|
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());
|
thumb.SetStroke(3, view.ThumbBorderColor.ToAndroid());
|
||||||
Control.SetThumb(thumb);
|
Control.SetThumb(thumb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -62,9 +62,9 @@
|
||||||
</Style>
|
</Style>
|
||||||
<Style TargetType="controls:ExtendedSlider">
|
<Style TargetType="controls:ExtendedSlider">
|
||||||
<Setter Property="MinimumTrackColor"
|
<Setter Property="MinimumTrackColor"
|
||||||
Value="{StaticResource SliderTrackColor}" />
|
Value="{StaticResource SliderTrackMinColor}" />
|
||||||
<Setter Property="MaximumTrackColor"
|
<Setter Property="MaximumTrackColor"
|
||||||
Value="{StaticResource SliderTrackColor}" />
|
Value="{StaticResource SliderTrackMaxColor}" />
|
||||||
<Setter Property="ThumbColor"
|
<Setter Property="ThumbColor"
|
||||||
Value="{StaticResource SliderThumbColor}" />
|
Value="{StaticResource SliderThumbColor}" />
|
||||||
<Setter Property="ThumbBorderColor"
|
<Setter Property="ThumbBorderColor"
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
|
|
||||||
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
|
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
|
||||||
<Color x:Key="SliderThumbBorderColor">#000000</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="ButtonTextColor">#000000</Color>
|
||||||
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
|
|
||||||
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
|
<Color x:Key="SliderThumbColor">#B9B9B9</Color>
|
||||||
<Color x:Key="SliderThumbBorderColor">#000000</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="ButtonTextColor">#000000</Color>
|
||||||
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
||||||
|
|
|
@ -29,9 +29,10 @@
|
||||||
<Color x:Key="ListHeaderTextColor">#3c8dbc</Color>
|
<Color x:Key="ListHeaderTextColor">#3c8dbc</Color>
|
||||||
<Color x:Key="ListHeaderBackgroundColor">#efeff4</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="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="ButtonTextColor">#000000</Color>
|
||||||
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
||||||
|
|
|
@ -31,7 +31,8 @@
|
||||||
|
|
||||||
<Color x:Key="SliderThumbColor">#e5e9f0</Color>
|
<Color x:Key="SliderThumbColor">#e5e9f0</Color>
|
||||||
<Color x:Key="SliderThumbBorderColor">#2e3440</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="ButtonTextColor">#000000</Color>
|
||||||
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
<Color x:Key="ButtonBackgroundColor">#dddddd</Color>
|
||||||
|
|
Loading…
Reference in a new issue