mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #2354 from onesounds/FixPreviewDragLine
Fix the issue resizable while preview turned off
This commit is contained in:
commit
d49fbd8f20
2 changed files with 36 additions and 1 deletions
|
|
@ -34,4 +34,38 @@ namespace Flow.Launcher.Converters
|
|||
|
||||
public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
|
||||
}
|
||||
|
||||
public class SplitterConverter : IValueConverter
|
||||
/* Prevents the dragging part of the preview area from working when preview is turned off. */
|
||||
{
|
||||
public object Convert(object value, System.Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (parameter != null)
|
||||
{
|
||||
if (value is true)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value is true)
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, System.Type targetType, object parameter, CultureInfo culture) => throw new System.InvalidOperationException();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
<converters:QuerySuggestionBoxConverter x:Key="QuerySuggestionBoxConverter" />
|
||||
<converters:BorderClipConverter x:Key="BorderClipConverter" />
|
||||
<converters:BoolToVisibilityConverter x:Key="BoolToVisibilityConverter" />
|
||||
<converters:SplitterConverter x:Key="SplitterConverter" />
|
||||
<converters:BoolToIMEConversionModeConverter x:Key="BoolToIMEConversionModeConverter" />
|
||||
<converters:BoolToIMEStateConverter x:Key="BoolToIMEStateConverter" />
|
||||
<converters:StringToKeyBindingConverter x:Key="StringToKeyBindingConverter" />
|
||||
|
|
@ -398,7 +399,7 @@
|
|||
</StackPanel>
|
||||
<GridSplitter
|
||||
Grid.Column="1"
|
||||
Width="5"
|
||||
Width="{Binding PreviewVisible, Converter={StaticResource SplitterConverter}}"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Stretch"
|
||||
Background="Transparent"
|
||||
|
|
|
|||
Loading…
Reference in a new issue