Skip to content

Commit 763cab8

Browse files
committed
Revert "- Add clock in query bar (sublime theme only)"
This reverts commit c74a2db.
1 parent c74a2db commit 763cab8

File tree

5 files changed

+3
-95
lines changed

5 files changed

+3
-95
lines changed

Flow.Launcher/MainWindow.xaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,6 @@
9696
</ContextMenu>
9797
</TextBox.ContextMenu>
9898
</TextBox>
99-
<StackPanel x:Name="ClockPanel" Style="{DynamicResource ClockPanel}">
100-
<TextBlock x:Name="ClockBox" Style="{DynamicResource ClockBox}"></TextBlock>
101-
<TextBlock x:Name="DateBox" Style="{DynamicResource DateBox}"></TextBlock>
102-
</StackPanel>
10399
<Canvas Style="{DynamicResource SearchIconPosition}">
104100
<Path Data="{DynamicResource SearchIconImg}" Style="{DynamicResource SearchIconStyle}" Margin="0" Stretch="Fill"/>
105101
</Canvas>

Flow.Launcher/MainWindow.xaml.cs

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
using Flow.Launcher.Helper;
1212
using Flow.Launcher.Infrastructure.UserSettings;
1313
using Flow.Launcher.ViewModel;
14-
using System.Windows.Threading;
15-
using System.Globalization;
1614
using Application = System.Windows.Application;
1715
using Screen = System.Windows.Forms.Screen;
1816
using ContextMenuStrip = System.Windows.Forms.ContextMenuStrip;
@@ -33,37 +31,22 @@ public partial class MainWindow
3331
private Settings _settings;
3432
private NotifyIcon _notifyIcon;
3533
private MainViewModel _viewModel;
34+
3635
#endregion
3736

3837
public MainWindow(Settings settings, MainViewModel mainVM)
3938
{
4039
DataContext = mainVM;
4140
_viewModel = mainVM;
4241
_settings = settings;
43-
44-
DispatcherTimer timer = new DispatcherTimer();
45-
timer.Interval = new TimeSpan(0, 0, 1);
46-
timer.Tick += Timer_Tick;
47-
timer.Start();
4842
InitializeComponent();
4943
}
5044

5145
public MainWindow()
5246
{
53-
5447
InitializeComponent();
55-
56-
57-
}
58-
59-
private void Timer_Tick(object sender, EventArgs e)
60-
{
61-
ClockBox.Text = System.DateTime.Now.ToString("tt hh:mm");
62-
DateBox.Text = System.DateTime.Now.ToString("ddd MM/dd", CultureInfo.InvariantCulture);
63-
6448
}
6549

66-
6750
private async void OnClosing(object sender, CancelEventArgs e)
6851
{
6952
_notifyIcon.Visible = false;

Flow.Launcher/SettingWindow.xaml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -586,10 +586,7 @@
586586
<Canvas Style="{DynamicResource SearchIconPosition}">
587587
<Path Data="{DynamicResource SearchIconImg}" Style="{DynamicResource SearchIconStyle}" Margin="0" Stretch="Fill"/>
588588
</Canvas>
589-
<StackPanel x:Name="ClockPanel" Style="{DynamicResource ClockPanel}">
590-
<TextBlock x:Name="ClockBox" Style="{DynamicResource ClockBox}"></TextBlock>
591-
<TextBlock x:Name="DateBox" Style="{DynamicResource DateBox}"></TextBlock>
592-
</StackPanel>
589+
593590
<Border Margin="0 0 0 0" Grid.Row="1">
594591
<Rectangle Width="Auto" HorizontalAlignment="Stretch" Style="{DynamicResource SeparatorStyle}" Visibility="visible"/>
595592
</Border>

Flow.Launcher/Themes/Base.xaml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -270,28 +270,6 @@
270270
<Setter Property="HorizontalAlignment" Value="Right" />
271271
</Style>
272272

273-
<Style x:Key="BaseClockPanel" TargetType="{x:Type StackPanel}">
274-
<Setter Property="HorizontalAlignment" Value="Right" />
275-
<Setter Property="VerticalAlignment" Value="Center" />
276-
<Setter Property="Height" Value="Auto" />
277-
<Setter Property="Margin" Value="0 0 14 0" />
278-
<Setter Property="Visibility" Value="Collapsed" />
279-
</Style>
280-
<Style x:Key="BaseClockBox" TargetType="{x:Type TextBlock}">
281-
<Setter Property="FontSize" Value="20" />
282-
<Setter Property="Foreground" Value="#8f8f8f" />
283-
<Setter Property="VerticalAlignment" Value="Bottom" />
284-
<Setter Property="HorizontalAlignment" Value="Right" />
285-
<Setter Property="Margin" Value="0 0 0 -5" />
286-
</Style>
287-
<Style x:Key="BaseDateBox" TargetType="{x:Type TextBlock}">
288-
<Setter Property="FontSize" Value="14" />
289-
<Setter Property="Foreground" Value="#8f8f8f" />
290-
<Setter Property="VerticalAlignment" Value="Top" />
291-
<Setter Property="HorizontalAlignment" Value="Right" />
292-
<Setter Property="Margin" Value="0 0 0 0" />
293-
</Style>
294-
295273
<!--for classic themes-->
296274
<Style x:Key="SearchIconStyle" TargetType="{x:Type Path}">
297275
<Setter Property="Fill" Value="#555555" />
@@ -315,12 +293,5 @@
315293
<Setter Property="Foreground" Value="#8f8f8f" />
316294
<Setter Property="Opacity" Value="0.5" />
317295
</Style>
318-
319-
<Style x:Key="ClockBox" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseClockBox}">
320-
</Style>
321-
<Style x:Key="DateBox" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseDateBox}">
322-
</Style>
323-
<Style x:Key="ClockPanel" TargetType="{x:Type StackPanel}" BasedOn="{StaticResource BaseClockPanel}">
324-
</Style>
325296
</ResourceDictionary>
326297

Flow.Launcher/Themes/Sublime.xaml

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<Setter Property="Cursor" Value="Arrow" />
6060
<Setter Property="Foreground" Value="#cc8ec8" />
6161
</Style>
62-
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3C454E</SolidColorBrush>
62+
<SolidColorBrush x:Key="ItemSelectedBackgroundColor">#3c454e</SolidColorBrush>
6363
<Style x:Key="ItemImageSelectedStyle" BasedOn="{StaticResource BaseItemImageSelectedStyle}" TargetType="{x:Type Image}" >
6464
<Setter Property="Cursor" Value="Arrow" />
6565
</Style>
@@ -100,44 +100,5 @@
100100
<Setter Property="Fill" Value="#3c454e" />
101101
<Setter Property="Width" Value="32" />
102102
<Setter Property="Height" Value="32" />
103-
<Setter Property="Visibility" Value="Collapsed" />
104-
</Style>
105-
106-
<Style x:Key="ClockBox" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseClockBox}">
107-
<Setter Property="Foreground" Value="#cc8ec8" />
108-
</Style>
109-
<Style x:Key="DateBox" TargetType="{x:Type TextBlock}" BasedOn="{StaticResource BaseDateBox}">
110-
<Setter Property="Foreground" Value="#cc8ec8" />
111-
</Style>
112-
<Style x:Key="ClockPanel" TargetType="{x:Type StackPanel}" BasedOn="{StaticResource BaseClockPanel}">
113-
<Setter Property="Visibility" Value="Visible" />
114-
<Style.Triggers>
115-
<DataTrigger Binding="{Binding ElementName=QueryTextBox, UpdateSourceTrigger=PropertyChanged, Path=Text.Length}" Value="0">
116-
117-
<DataTrigger.EnterActions>
118-
<BeginStoryboard>
119-
<Storyboard>
120-
<DoubleAnimation
121-
Storyboard.TargetProperty="Opacity"
122-
From="0.0" To="1.0" Duration="0:0:0.2"
123-
/>
124-
</Storyboard>
125-
</BeginStoryboard>
126-
</DataTrigger.EnterActions>
127-
<DataTrigger.ExitActions>
128-
<BeginStoryboard>
129-
<Storyboard>
130-
<DoubleAnimation
131-
Storyboard.TargetProperty="Opacity"
132-
From="1.0" To="0.0" Duration="0:0:0.2"
133-
/>
134-
</Storyboard>
135-
</BeginStoryboard>
136-
</DataTrigger.ExitActions>
137-
138-
</DataTrigger>
139-
140-
</Style.Triggers>
141-
142103
</Style>
143104
</ResourceDictionary>

0 commit comments

Comments
 (0)