Fix window height reset issue

This commit is contained in:
VictoriousRaptor 2024-05-25 23:55:41 +08:00
parent 5a0f4ac459
commit de94f3950f
3 changed files with 9 additions and 7 deletions

View file

@ -27,8 +27,6 @@ using DataObject = System.Windows.DataObject;
using System.Windows.Media;
using System.Windows.Interop;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Windows.Media.Media3D;
namespace Flow.Launcher
{
@ -108,10 +106,12 @@ namespace Flow.Launcher
}
return IntPtr.Zero;
}
private void OnResizeBegin()
{
}
private void OnResizeEnd()
{
int shadowMargin = 0;
@ -131,7 +131,8 @@ namespace Flow.Launcher
_settings.WindowSize = Width;
FlowMainWindow.SizeToContent = SizeToContent.Height;
}
private void OnCopy(object sender, ExecutedRoutedEventArgs e)
private void OnCopy(object sender, ExecutedRoutedEventArgs e)
{
var result = _viewModel.Results.SelectedItem?.Result;
if (QueryTextBox.SelectionLength == 0 && result != null)

View file

@ -493,6 +493,6 @@ public partial class SettingsPaneThemeViewModel : BaseModel
Settings.ResultSubItemFontSize = 13;
Settings.ItemHeightSize = 58;
Settings.WindowHeightSize = 42;
WindowHeightSize = 42;
}
}

View file

@ -255,7 +255,8 @@
Width="140"
Margin="8"
HorizontalAlignment="Center"
Content="{DynamicResource resetCustomize}" Click="Reset_Click" />
Click="Reset_Click"
Content="{DynamicResource resetCustomize}" />
</StackPanel>
</ScrollViewer>
@ -286,8 +287,8 @@
<Border Grid.Row="0">
<TextBox
x:Name="QueryTextBox"
Height="{Binding WindowHeightSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
FontSize="{Binding queryBoxFontSize, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Height="{Binding WindowHeightSize, Mode=TwoWay}"
FontSize="{Binding queryBoxFontSize, Mode=TwoWay}"
IsHitTestVisible="False"
IsReadOnly="True"
Style="{DynamicResource QueryBoxStyle}"