mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
revert displaying current time in date/time format dropdown
This commit is contained in:
parent
4940449b41
commit
51dc61376e
2 changed files with 14 additions and 25 deletions
|
|
@ -44,7 +44,6 @@
|
|||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||
<converters:TextConverter x:Key="TextConverter" />
|
||||
<converters:TranlationConverter x:Key="TranlationConverter" />
|
||||
<converters:DateTimeFormatToNowConverter x:Key="DateTimeFormatToNowConverter"></converters:DateTimeFormatToNowConverter>
|
||||
<CollectionViewSource x:Key="SortedFonts" Source="{Binding Source={x:Static Fonts.SystemFontFamilies}}">
|
||||
<CollectionViewSource.SortDescriptions>
|
||||
<scm:SortDescription PropertyName="Source" />
|
||||
|
|
@ -2181,12 +2180,7 @@
|
|||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding TimeFormatList}"
|
||||
SelectedIndex="{Binding TimeFormat}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource DateTimeFormatToNowConverter}}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
SelectedItem="{Binding TimeFormat}">
|
||||
</ComboBox>
|
||||
<ui:ToggleSwitch
|
||||
IsOn="{Binding UseClock, Mode=TwoWay}"
|
||||
|
|
@ -2223,12 +2217,7 @@
|
|||
VerticalAlignment="Center"
|
||||
FontSize="14"
|
||||
ItemsSource="{Binding DateFormatList}"
|
||||
SelectedIndex="{Binding DateFormat}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<TextBlock Text="{Binding Converter={StaticResource DateTimeFormatToNowConverter}}"/>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
SelectedItem="{Binding DateFormat}">
|
||||
</ComboBox>
|
||||
<ui:ToggleSwitch
|
||||
IsOn="{Binding UseDate, Mode=TwoWay}"
|
||||
|
|
|
|||
|
|
@ -47,6 +47,14 @@ namespace Flow.Launcher.ViewModel
|
|||
case nameof(Settings.WindowSize):
|
||||
OnPropertyChanged(nameof(WindowWidthSize));
|
||||
break;
|
||||
case nameof(Settings.UseDate):
|
||||
case nameof(Settings.DateFormat):
|
||||
OnPropertyChanged(nameof(DateText));
|
||||
break;
|
||||
case nameof(Settings.UseClock):
|
||||
case nameof(Settings.TimeFormat):
|
||||
OnPropertyChanged(nameof(ClockText));
|
||||
break;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -483,26 +491,18 @@ namespace Flow.Launcher.ViewModel
|
|||
public string TimeFormat
|
||||
{
|
||||
get { return Settings.TimeFormat; }
|
||||
set
|
||||
{
|
||||
Settings.TimeFormat = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
set { Settings.TimeFormat = value; }
|
||||
}
|
||||
|
||||
public string DateFormat
|
||||
{
|
||||
get { return Settings.DateFormat; }
|
||||
set
|
||||
{
|
||||
Settings.DateFormat = value;
|
||||
OnPropertyChanged();
|
||||
}
|
||||
set { Settings.DateFormat = value; }
|
||||
}
|
||||
|
||||
public string ClockText { get; private set; }
|
||||
public string ClockText => DateTime.Now.ToString(TimeFormat);
|
||||
|
||||
public string DateText { get; private set; }
|
||||
public string DateText => DateTime.Now.ToString(DateFormat);
|
||||
|
||||
|
||||
public double WindowWidthSize
|
||||
|
|
|
|||
Loading…
Reference in a new issue