Fix launcher height (#3013)

* Added height for searchbox

* Updated top calculation for launcher window
This commit is contained in:
Divyansh Srivastava 2020-05-14 13:52:48 -07:00 committed by GitHub
parent 48215c1eae
commit b1ed7227d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -42,7 +42,9 @@
<Border.Effect>
<DropShadowEffect BlurRadius="16" Opacity="0.8" ShadowDepth="0" />
</Border.Effect>
<local:LauncherControl x:Name="SearchBox" />
<local:LauncherControl
x:Name="SearchBox"
Height="60"/>
</Border>
<Border
x:Name="ListBoxBorder"

View file

@ -265,8 +265,7 @@ namespace PowerLauncher
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
var dpi1 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Y);
var dpi2 = WindowsInteropHelper.TransformPixelsToDIP(this, 0, screen.WorkingArea.Height);
var totalHeight = this.SearchBoxBorder.Margin.Top + this.SearchBoxBorder.Margin.Bottom + this.SearchBox.Height + this.ListBoxBorder.Margin.Top + this.ListBoxBorder.Margin.Bottom + MAX_LIST_HEIGHT;
var top = (dpi2.Y - totalHeight) / 4 + dpi1.Y;
var top = (dpi2.Y - this.SearchBox.Height) / 4 + dpi1.Y;
return top;
}