mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Adjust Clock Color
- Adjust Layout - Add Clock/Date in Settings (data only)
This commit is contained in:
parent
5c2a88519b
commit
a8bdb34c55
4 changed files with 30 additions and 14 deletions
|
|
@ -1,4 +1,4 @@
|
|||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Drawing;
|
||||
|
|
@ -41,6 +41,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
public bool UseGlyphIcons { get; set; } = true;
|
||||
public bool UseAnimation { get; set; } = true;
|
||||
public bool UseSound { get; set; } = true;
|
||||
public bool UseClock { get; set; } = true;
|
||||
public bool UseDate { get; set; } = true;
|
||||
public bool FirstLaunch { get; set; } = true;
|
||||
|
||||
public int CustomExplorerIndex { get; set; } = 0;
|
||||
|
|
@ -220,4 +222,4 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
Light,
|
||||
Dark
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,8 +193,9 @@
|
|||
</TextBox.ContextMenu>
|
||||
</TextBox>
|
||||
<StackPanel x:Name="ClockPanel" Style="{DynamicResource ClockPanel}">
|
||||
<TextBlock x:Name="ClockBox" Style="{DynamicResource ClockBox}" />
|
||||
<TextBlock x:Name="DateBox" Style="{DynamicResource DateBox}" />
|
||||
<TextBlock x:Name="ClockBox" Style="{DynamicResource ClockBox}" />
|
||||
|
||||
</StackPanel>
|
||||
<Canvas Style="{DynamicResource SearchIconPosition}">
|
||||
<Image
|
||||
|
|
|
|||
|
|
@ -63,8 +63,23 @@ namespace Flow.Launcher
|
|||
}
|
||||
private void Timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
ClockBox.Text = System.DateTime.Now.ToString("tt hh:mm");
|
||||
DateBox.Text = System.DateTime.Now.ToString("MM/dd dddd");
|
||||
if (_settings.UseClock == true)
|
||||
{
|
||||
ClockBox.Text = System.DateTime.Now.ToString("tt hh:mm");
|
||||
}
|
||||
else if(_settings.UseClock == false)
|
||||
{
|
||||
ClockBox.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
if (_settings.UseDate == false)
|
||||
{
|
||||
DateBox.Text = System.DateTime.Now.ToString("MM/dd ddd");
|
||||
}
|
||||
else if (_settings.UseDate == true)
|
||||
{
|
||||
DateBox.Visibility = Visibility.Collapsed;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
private void OnCopy(object sender, ExecutedRoutedEventArgs e)
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@
|
|||
</Style>
|
||||
|
||||
<Style x:Key="BaseClockPanel" TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Orientation" Value="Horizontal" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Height" Value="Auto" />
|
||||
|
|
@ -89,15 +90,13 @@
|
|||
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="VerticalAlignment" Value="Bottom" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="Margin" Value="0,0,0,-5" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Margin" Value="10,0,0,0" />
|
||||
</Style>
|
||||
<Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
<Setter Property="VerticalAlignment" Value="Top" />
|
||||
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Margin" Value="0,0,0,0" />
|
||||
</Style>
|
||||
|
||||
|
|
@ -105,19 +104,19 @@
|
|||
x:Key="ClockBox"
|
||||
BasedOn="{StaticResource BaseClockBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#cc8ec8" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="DateBox"
|
||||
BasedOn="{StaticResource BaseDateBox}"
|
||||
TargetType="{x:Type TextBlock}">
|
||||
<Setter Property="Foreground" Value="#cc8ec8" />
|
||||
<Setter Property="Foreground" Value="#8f8f8f" />
|
||||
</Style>
|
||||
<Style
|
||||
x:Key="ClockPanel"
|
||||
BasedOn="{StaticResource BaseClockPanel}"
|
||||
TargetType="{x:Type StackPanel}">
|
||||
<Setter Property="Margin" Value="0,0,62,0" />
|
||||
<Setter Property="Margin" Value="0,0,66,0" />
|
||||
<Setter Property="Visibility" Value="Visible" />
|
||||
<Style.Triggers>
|
||||
<MultiDataTrigger>
|
||||
|
|
@ -149,7 +148,6 @@
|
|||
</MultiDataTrigger.ExitActions>
|
||||
|
||||
</MultiDataTrigger>
|
||||
<DataTrigger Binding="{Binding ElementName=QueryTextBox, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0" />
|
||||
|
||||
</Style.Triggers>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue