Skip to content

Commit 9242547

Browse files
authored
Merge pull request #1579 from onesounds/FixPreviewClick
Fix Theme Preview area
2 parents 748e7f1 + 0298f17 commit 9242547

File tree

3 files changed

+29
-13
lines changed

3 files changed

+29
-13
lines changed

Flow.Launcher/Languages/en.xaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,14 @@
116116
<system:String x:Key="browserMoreThemes">Theme Gallery</system:String>
117117
<system:String x:Key="howToCreateTheme">How to create a theme</system:String>
118118
<system:String x:Key="hiThere">Hi There</system:String>
119+
<system:String x:Key="SampleTitleExplorer">Explorer</system:String>
120+
<system:String x:Key="SampleSubTitleExplorer">Search for files, folders and file contents</system:String>
121+
<system:String x:Key="SampleTitleWebSearch">WebSearch</system:String>
122+
<system:String x:Key="SampleSubTitleWebSearch">Search the web with different search engine support</system:String>
123+
<system:String x:Key="SampleTitleProgram">Program</system:String>
124+
<system:String x:Key="SampleSubTitleProgram">Launch programs as admin or a different user</system:String>
125+
<system:String x:Key="SampleTitleProcessKiller">ProcessKiller</system:String>
126+
<system:String x:Key="SampleSubTitleProcessKiller">Terminate unwanted processes</system:String>
119127
<system:String x:Key="queryBoxFont">Query Box Font</system:String>
120128
<system:String x:Key="resultItemFont">Result Item Font</system:String>
121129
<system:String x:Key="windowMode">Window Mode</system:String>

Flow.Launcher/SettingWindow.xaml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -443,10 +443,9 @@
443443
Margin="2,2,2,0"
444444
Panel.ZIndex="1"
445445
Background="Transparent"
446-
IsItemsHost="true"
446+
IsItemsHost="true"
447447
LastChildFill="False" />
448-
<Border
449-
Grid.Column="1">
448+
<Border Grid.Column="1">
450449
<ContentPresenter Grid.Column="1" ContentSource="SelectedContent" />
451450
</Border>
452451
</Grid>
@@ -1779,7 +1778,12 @@
17791778
HorizontalAlignment="Center"
17801779
VerticalAlignment="Center"
17811780
Orientation="Horizontal">
1782-
<Border Width="{Binding WindowWidthSize}" Style="{DynamicResource WindowBorderStyle}">
1781+
<Border
1782+
Width="{Binding WindowWidthSize}"
1783+
Margin="0"
1784+
SnapsToDevicePixels="True"
1785+
Style="{DynamicResource WindowBorderStyle}"
1786+
UseLayoutRounding="True">
17831787
<Border Style="{DynamicResource WindowRadius}">
17841788
<Border.Clip>
17851789
<MultiBinding Converter="{StaticResource BorderClipConverter}">
@@ -1797,6 +1801,7 @@
17971801
<Border Grid.Row="0">
17981802
<TextBox
17991803
x:Name="QueryTextBox"
1804+
IsHitTestVisible="False"
18001805
IsReadOnly="True"
18011806
Style="{DynamicResource QueryBoxStyle}"
18021807
Text="{DynamicResource hiThere}" />
@@ -1834,7 +1839,10 @@
18341839
</Border>
18351840

18361841
<ContentControl Grid.Row="2">
1837-
<flowlauncher:ResultListBox DataContext="{Binding PreviewResults, Mode=OneTime}" Visibility="Visible" />
1842+
<flowlauncher:ResultListBox
1843+
DataContext="{Binding PreviewResults, Mode=OneTime}"
1844+
IsHitTestVisible="False"
1845+
Visibility="Visible" />
18381846
</ContentControl>
18391847

18401848
</Grid>

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -609,26 +609,26 @@ public ResultsViewModel PreviewResults
609609
{
610610
new Result
611611
{
612-
Title = "Explorer",
613-
SubTitle = "Search for files, folders and file contents",
612+
Title = InternationalizationManager.Instance.GetTranslation("SampleTitleExplorer"),
613+
SubTitle = InternationalizationManager.Instance.GetTranslation("SampleSubTitleExplorer"),
614614
IcoPath = Path.Combine(Constant.ProgramDirectory, @"Plugins\Flow.Launcher.Plugin.Explorer\Images\explorer.png")
615615
},
616616
new Result
617617
{
618-
Title = "WebSearch",
619-
SubTitle = "Search the web with different search engine support",
618+
Title = InternationalizationManager.Instance.GetTranslation("SampleTitleWebSearch"),
619+
SubTitle = InternationalizationManager.Instance.GetTranslation("SampleSubTitleWebSearch"),
620620
IcoPath = Path.Combine(Constant.ProgramDirectory, @"Plugins\Flow.Launcher.Plugin.WebSearch\Images\web_search.png")
621621
},
622622
new Result
623623
{
624-
Title = "Program",
625-
SubTitle = "Launch programs as admin or a different user",
624+
Title = InternationalizationManager.Instance.GetTranslation("SampleTitleProgram"),
625+
SubTitle = InternationalizationManager.Instance.GetTranslation("SampleSubTitleProgram"),
626626
IcoPath = Path.Combine(Constant.ProgramDirectory, @"Plugins\Flow.Launcher.Plugin.Program\Images\program.png")
627627
},
628628
new Result
629629
{
630-
Title = "ProcessKiller",
631-
SubTitle = "Terminate unwanted processes",
630+
Title = InternationalizationManager.Instance.GetTranslation("SampleTitleProcessKiller"),
631+
SubTitle = InternationalizationManager.Instance.GetTranslation("SampleSubTitleProcessKiller"),
632632
IcoPath = Path.Combine(Constant.ProgramDirectory, @"Plugins\Flow.Launcher.Plugin.ProcessKiller\Images\app.png")
633633
}
634634
};

0 commit comments

Comments
 (0)