Change Clock Style

This commit is contained in:
DB p 2022-11-20 16:09:16 +09:00
parent 32e0833bcb
commit b88d7f746b
3 changed files with 33 additions and 19 deletions

View file

@ -248,13 +248,15 @@
IsHitTestVisible="False" IsHitTestVisible="False"
Style="{DynamicResource ClockPanel}"> Style="{DynamicResource ClockPanel}">
<TextBlock <TextBlock
Style="{DynamicResource DateBox}" x:Name="ClockBox"
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock
Style="{DynamicResource ClockBox}" Style="{DynamicResource ClockBox}"
Text="{Binding ClockText}" Text="{Binding ClockText}"
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" /> Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock
x:Name="DateBox"
Style="{DynamicResource DateBox}"
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel> </StackPanel>
<Canvas Style="{DynamicResource SearchIconPosition}"> <Canvas Style="{DynamicResource SearchIconPosition}">

View file

@ -1823,15 +1823,18 @@
</Border> </Border>
<StackPanel <StackPanel
x:Name="ClockPanel" x:Name="ClockPanel"
IsHitTestVisible="False"
Style="{DynamicResource ClockPanel}"> Style="{DynamicResource ClockPanel}">
<TextBlock <TextBlock
Style="{DynamicResource DateBox}" x:Name="ClockBox"
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock
Style="{DynamicResource ClockBox}" Style="{DynamicResource ClockBox}"
Text="{Binding ClockText}" Text="{Binding ClockText}"
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" /> Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" />
<TextBlock
x:Name="DateBox"
Style="{DynamicResource DateBox}"
Text="{Binding DateText}"
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel> </StackPanel>
<Canvas Style="{DynamicResource SearchIconPosition}"> <Canvas Style="{DynamicResource SearchIconPosition}">
<Path <Path
@ -2180,13 +2183,12 @@
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontSize="14"
ItemsSource="{Binding TimeFormatList}" ItemsSource="{Binding TimeFormatList}"
SelectedItem="{Binding TimeFormat}"> SelectedItem="{Binding TimeFormat}" />
</ComboBox>
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding UseClock, Mode=TwoWay}" IsOn="{Binding UseClock, Mode=TwoWay}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" OnContent="{DynamicResource enable}"
Style="{DynamicResource SideToggleSwitch}"/> Style="{DynamicResource SideToggleSwitch}" />
</StackPanel> </StackPanel>
<TextBlock Style="{StaticResource Glyph}"> <TextBlock Style="{StaticResource Glyph}">
&#xec92; &#xec92;
@ -2217,13 +2219,12 @@
VerticalAlignment="Center" VerticalAlignment="Center"
FontSize="14" FontSize="14"
ItemsSource="{Binding DateFormatList}" ItemsSource="{Binding DateFormatList}"
SelectedItem="{Binding DateFormat}"> SelectedItem="{Binding DateFormat}" />
</ComboBox>
<ui:ToggleSwitch <ui:ToggleSwitch
IsOn="{Binding UseDate, Mode=TwoWay}" IsOn="{Binding UseDate, Mode=TwoWay}"
OffContent="{DynamicResource disable}" OffContent="{DynamicResource disable}"
OnContent="{DynamicResource enable}" OnContent="{DynamicResource enable}"
Style="{DynamicResource SideToggleSwitch}"/> Style="{DynamicResource SideToggleSwitch}" />
</StackPanel> </StackPanel>
<TextBlock Style="{StaticResource Glyph}"> <TextBlock Style="{StaticResource Glyph}">
&#xe787; &#xe787;

View file

@ -3,7 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib" xmlns:system="clr-namespace:System;assembly=mscorlib"
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure"> xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure">
<!-- Further font customisations are dynamically loaded in Theme.cs --> <!-- Further font customisations are dynamically loaded in Theme.cs -->
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}"> <Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
<Setter Property="BorderThickness" Value="0" /> <Setter Property="BorderThickness" Value="0" />
@ -90,18 +90,28 @@
<Setter Property="Visibility" Value="Collapsed" /> <Setter Property="Visibility" Value="Collapsed" />
</Style> </Style>
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}"> <Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="22" /> <Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#8f8f8f" /> <Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,2,0" /> <Setter Property="Margin" Value="0,0,0,0" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
</DataTrigger>
</Style.Triggers>
</Style> </Style>
<Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}"> <Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
<Setter Property="FontSize" Value="16" /> <Setter Property="FontSize" Value="18" />
<Setter Property="Foreground" Value="#8f8f8f" /> <Setter Property="Foreground" Value="#8f8f8f" />
<Setter Property="HorizontalAlignment" Value="Right" /> <Setter Property="HorizontalAlignment" Value="Right" />
<Setter Property="VerticalAlignment" Value="Center" /> <Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="0,0,10,0" /> <Setter Property="Margin" Value="0,0,0,0" />
<Style.Triggers>
<DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
<Setter Property="FontSize" Value="14" />
</DataTrigger>
</Style.Triggers>
</Style> </Style>
<Style <Style
@ -120,6 +130,7 @@
x:Key="ClockPanel" x:Key="ClockPanel"
BasedOn="{StaticResource BaseClockPanel}" BasedOn="{StaticResource BaseClockPanel}"
TargetType="{x:Type StackPanel}"> TargetType="{x:Type StackPanel}">
<Setter Property="Orientation" Value="Vertical" />
<Setter Property="Margin" Value="0,0,66,0" /> <Setter Property="Margin" Value="0,0,66,0" />
<Setter Property="Visibility" Value="Visible" /> <Setter Property="Visibility" Value="Visible" />
<Style.Triggers> <Style.Triggers>