mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Modified strings and added BoolNegationConverter
This commit is contained in:
parent
c06fdb9134
commit
f30c6fc577
3 changed files with 40 additions and 15 deletions
23
Flow.Launcher/Converters/BoolNegationConverter.cs
Normal file
23
Flow.Launcher/Converters/BoolNegationConverter.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
using System;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Windows.Data;
|
||||||
|
|
||||||
|
namespace Flow.Launcher.Converters
|
||||||
|
{
|
||||||
|
public class BoolNegationConverter : IValueConverter
|
||||||
|
{
|
||||||
|
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (value is bool b)
|
||||||
|
return !b;
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
{
|
||||||
|
if (value is bool b)
|
||||||
|
return !b;
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -131,8 +131,8 @@
|
||||||
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
|
<system:String x:Key="historyResultsForHomePage">Show History Results in Home Page</system:String>
|
||||||
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
|
<system:String x:Key="historyResultsCountForHomePage">Maximum History Results Shown in Home Page</system:String>
|
||||||
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
|
<system:String x:Key="homeToggleBoxToolTip">This can only be edited if plugin supports Home feature and Home Page is enabled.</system:String>
|
||||||
<system:String x:Key="showAtTopmost">Show Search Window at Topmost</system:String>
|
<system:String x:Key="showAtTopmost">Keep on top</system:String>
|
||||||
<system:String x:Key="showAtTopmostToolTip">Show search window above other windows</system:String>
|
<system:String x:Key="showAtTopmostToolTip">Keeps the search window on top even after it loses focus.</system:String>
|
||||||
|
|
||||||
<!-- Setting Plugin -->
|
<!-- Setting Plugin -->
|
||||||
<system:String x:Key="searchplugin">Search Plugin</system:String>
|
<system:String x:Key="searchplugin">Search Plugin</system:String>
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<ui:Page.Resources>
|
<ui:Page.Resources>
|
||||||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||||
|
<converters:BoolNegationConverter x:Key="BoolNegationConverter" />
|
||||||
</ui:Page.Resources>
|
</ui:Page.Resources>
|
||||||
<ScrollViewer
|
<ScrollViewer
|
||||||
Margin="0"
|
Margin="0"
|
||||||
|
|
@ -63,12 +64,23 @@
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0">
|
<cc:ExCard Title="{DynamicResource hideFlowLauncherWhenLoseFocus}" Margin="0 14 0 0">
|
||||||
<ui:ToggleSwitch
|
<cc:ExCard.SideContent>
|
||||||
|
<ui:ToggleSwitch
|
||||||
IsOn="{Binding Settings.HideWhenDeactivated}"
|
IsOn="{Binding Settings.HideWhenDeactivated}"
|
||||||
OffContent="{DynamicResource disable}"
|
OffContent="{DynamicResource disable}"
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</cc:Card>
|
</cc:ExCard.SideContent>
|
||||||
|
<cc:Card
|
||||||
|
Title="{DynamicResource showAtTopmost}"
|
||||||
|
Type="InsideFit"
|
||||||
|
Sub="{DynamicResource showAtTopmostToolTip}">
|
||||||
|
<ui:ToggleSwitch
|
||||||
|
IsOn="{Binding Settings.ShowAtTopmost}"
|
||||||
|
OffContent="{DynamicResource disable}"
|
||||||
|
OnContent="{DynamicResource enable}" IsEnabled="{Binding Settings.HideWhenDeactivated, Converter={StaticResource BoolNegationConverter}}"/>
|
||||||
|
</cc:Card>
|
||||||
|
</cc:ExCard>
|
||||||
|
|
||||||
<cc:Card Title="{DynamicResource hideNotifyIcon}" Sub="{DynamicResource hideNotifyIconToolTip}">
|
<cc:Card Title="{DynamicResource hideNotifyIcon}" Sub="{DynamicResource hideNotifyIconToolTip}">
|
||||||
<ui:ToggleSwitch
|
<ui:ToggleSwitch
|
||||||
|
|
@ -77,16 +89,6 @@
|
||||||
OnContent="{DynamicResource enable}" />
|
OnContent="{DynamicResource enable}" />
|
||||||
</cc:Card>
|
</cc:Card>
|
||||||
|
|
||||||
<cc:Card
|
|
||||||
Title="{DynamicResource showAtTopmost}"
|
|
||||||
Margin="0 14 0 0"
|
|
||||||
Icon=""
|
|
||||||
Sub="{DynamicResource showAtTopmostToolTip}">
|
|
||||||
<ui:ToggleSwitch
|
|
||||||
IsOn="{Binding Settings.ShowAtTopmost}"
|
|
||||||
OffContent="{DynamicResource disable}"
|
|
||||||
OnContent="{DynamicResource enable}" />
|
|
||||||
</cc:Card>
|
|
||||||
|
|
||||||
<cc:CardGroup Margin="0 14 0 0">
|
<cc:CardGroup Margin="0 14 0 0">
|
||||||
<cc:Card Title="{DynamicResource SearchWindowPosition}" Icon="">
|
<cc:Card Title="{DynamicResource SearchWindowPosition}" Icon="">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue