mirror of
https://github.com/bitwarden/android.git
synced 2024-12-24 18:08:26 +03:00
totp text color changes with DynamicResource
This commit is contained in:
parent
dc0f9847c6
commit
a01f9c7351
3 changed files with 22 additions and 1 deletions
|
@ -110,10 +110,12 @@
|
|||
Grid.Column="0" />
|
||||
<Label
|
||||
Text="{Binding TotpSec, Mode=OneWay}"
|
||||
Style="{DynamicResource textTotp}"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Grid.RowSpan="2"
|
||||
HorizontalOptions="End"
|
||||
HorizontalTextAlignment="End"
|
||||
VerticalOptions="CenterAndExpand"/>
|
||||
<controls:FaButton StyleClass="box-row-button, box-row-button-platform"
|
||||
Text=""
|
||||
|
|
|
@ -72,7 +72,11 @@ namespace Bit.App.Pages
|
|||
public bool TotpLow
|
||||
{
|
||||
get => _totpLow;
|
||||
set => SetProperty(ref _totpLow, value);
|
||||
set
|
||||
{
|
||||
SetProperty(ref _totpLow, value);
|
||||
Page.Resources["textTotp"] = Application.Current.Resources[value ? "text-danger" : "text-default"];
|
||||
}
|
||||
}
|
||||
|
||||
public async Task LoadAsync()
|
||||
|
|
|
@ -11,6 +11,21 @@
|
|||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TextColor}" />
|
||||
</Style>
|
||||
<Style TargetType="Label"
|
||||
x:Key="text-default">
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource TextColor}" />
|
||||
</Style>
|
||||
<Style TargetType="Label"
|
||||
x:Key="text-danger">
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource DangerColor}" />
|
||||
</Style>
|
||||
<Style TargetType="Label"
|
||||
x:Key="text-success">
|
||||
<Setter Property="TextColor"
|
||||
Value="{StaticResource SuccessColor}" />
|
||||
</Style>
|
||||
|
||||
<!-- List -->
|
||||
<Style TargetType="ListView"
|
||||
|
|
Loading…
Reference in a new issue