Skip to content

Commit b88d7f7

Browse files
committed
Change Clock Style
1 parent 32e0833 commit b88d7f7

File tree

3 files changed

+33
-19
lines changed

3 files changed

+33
-19
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,13 +248,15 @@
248248
IsHitTestVisible="False"
249249
Style="{DynamicResource ClockPanel}">
250250
<TextBlock
251-
Style="{DynamicResource DateBox}"
252-
Text="{Binding DateText}"
253-
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
254-
<TextBlock
251+
x:Name="ClockBox"
255252
Style="{DynamicResource ClockBox}"
256253
Text="{Binding ClockText}"
257254
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" />
255+
<TextBlock
256+
x:Name="DateBox"
257+
Style="{DynamicResource DateBox}"
258+
Text="{Binding DateText}"
259+
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
258260
</StackPanel>
259261

260262
<Canvas Style="{DynamicResource SearchIconPosition}">

Flow.Launcher/SettingWindow.xaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,15 +1823,18 @@
18231823
</Border>
18241824
<StackPanel
18251825
x:Name="ClockPanel"
1826+
IsHitTestVisible="False"
18261827
Style="{DynamicResource ClockPanel}">
18271828
<TextBlock
1828-
Style="{DynamicResource DateBox}"
1829-
Text="{Binding DateText}"
1830-
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
1831-
<TextBlock
1829+
x:Name="ClockBox"
18321830
Style="{DynamicResource ClockBox}"
18331831
Text="{Binding ClockText}"
18341832
Visibility="{Binding Settings.UseClock, Converter={StaticResource BooleanToVisibilityConverter}}" />
1833+
<TextBlock
1834+
x:Name="DateBox"
1835+
Style="{DynamicResource DateBox}"
1836+
Text="{Binding DateText}"
1837+
Visibility="{Binding Settings.UseDate, Converter={StaticResource BooleanToVisibilityConverter}}" />
18351838
</StackPanel>
18361839
<Canvas Style="{DynamicResource SearchIconPosition}">
18371840
<Path
@@ -2180,13 +2183,12 @@
21802183
VerticalAlignment="Center"
21812184
FontSize="14"
21822185
ItemsSource="{Binding TimeFormatList}"
2183-
SelectedItem="{Binding TimeFormat}">
2184-
</ComboBox>
2186+
SelectedItem="{Binding TimeFormat}" />
21852187
<ui:ToggleSwitch
21862188
IsOn="{Binding UseClock, Mode=TwoWay}"
21872189
OffContent="{DynamicResource disable}"
21882190
OnContent="{DynamicResource enable}"
2189-
Style="{DynamicResource SideToggleSwitch}"/>
2191+
Style="{DynamicResource SideToggleSwitch}" />
21902192
</StackPanel>
21912193
<TextBlock Style="{StaticResource Glyph}">
21922194
&#xec92;
@@ -2217,13 +2219,12 @@
22172219
VerticalAlignment="Center"
22182220
FontSize="14"
22192221
ItemsSource="{Binding DateFormatList}"
2220-
SelectedItem="{Binding DateFormat}">
2221-
</ComboBox>
2222+
SelectedItem="{Binding DateFormat}" />
22222223
<ui:ToggleSwitch
22232224
IsOn="{Binding UseDate, Mode=TwoWay}"
22242225
OffContent="{DynamicResource disable}"
22252226
OnContent="{DynamicResource enable}"
2226-
Style="{DynamicResource SideToggleSwitch}"/>
2227+
Style="{DynamicResource SideToggleSwitch}" />
22272228
</StackPanel>
22282229
<TextBlock Style="{StaticResource Glyph}">
22292230
&#xe787;

Flow.Launcher/Themes/Base.xaml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:system="clr-namespace:System;assembly=mscorlib"
55
xmlns:userSettings="clr-namespace:Flow.Launcher.Infrastructure.UserSettings;assembly=Flow.Launcher.Infrastructure">
6-
6+
77
<!-- Further font customisations are dynamically loaded in Theme.cs -->
88
<Style x:Key="BaseQueryBoxStyle" TargetType="{x:Type TextBox}">
99
<Setter Property="BorderThickness" Value="0" />
@@ -90,18 +90,28 @@
9090
<Setter Property="Visibility" Value="Collapsed" />
9191
</Style>
9292
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
93-
<Setter Property="FontSize" Value="22" />
93+
<Setter Property="FontSize" Value="18" />
9494
<Setter Property="Foreground" Value="#8f8f8f" />
9595
<Setter Property="HorizontalAlignment" Value="Right" />
9696
<Setter Property="VerticalAlignment" Value="Center" />
97-
<Setter Property="Margin" Value="0,0,2,0" />
97+
<Setter Property="Margin" Value="0,0,0,0" />
98+
<Style.Triggers>
99+
<DataTrigger Binding="{Binding ElementName=DateBox, Path=Visibility}" Value="Visible">
100+
<Setter Property="FontSize" Value="14" />
101+
</DataTrigger>
102+
</Style.Triggers>
98103
</Style>
99104
<Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
100-
<Setter Property="FontSize" Value="16" />
105+
<Setter Property="FontSize" Value="18" />
101106
<Setter Property="Foreground" Value="#8f8f8f" />
102107
<Setter Property="HorizontalAlignment" Value="Right" />
103108
<Setter Property="VerticalAlignment" Value="Center" />
104-
<Setter Property="Margin" Value="0,0,10,0" />
109+
<Setter Property="Margin" Value="0,0,0,0" />
110+
<Style.Triggers>
111+
<DataTrigger Binding="{Binding ElementName=ClockBox, Path=Visibility}" Value="Visible">
112+
<Setter Property="FontSize" Value="14" />
113+
</DataTrigger>
114+
</Style.Triggers>
105115
</Style>
106116

107117
<Style
@@ -120,6 +130,7 @@
120130
x:Key="ClockPanel"
121131
BasedOn="{StaticResource BaseClockPanel}"
122132
TargetType="{x:Type StackPanel}">
133+
<Setter Property="Orientation" Value="Vertical" />
123134
<Setter Property="Margin" Value="0,0,66,0" />
124135
<Setter Property="Visibility" Value="Visible" />
125136
<Style.Triggers>

0 commit comments

Comments
 (0)