mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
- Add LeftTop / RightTop Option
- Remove comment
This commit is contained in:
parent
0596c4cbeb
commit
00e8625a90
4 changed files with 37 additions and 5 deletions
|
|
@ -228,6 +228,8 @@ namespace Flow.Launcher.Infrastructure.UserSettings
|
|||
{
|
||||
RememberLastLaunchLocation,
|
||||
MouseScreenCenter,
|
||||
MouseScreenCenterTop
|
||||
MouseScreenCenterTop,
|
||||
MouseScreenLeftTop,
|
||||
MouseScreenRightTop
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,8 +36,10 @@
|
|||
<system:String x:Key="LauncherPosition">Launcher Position</system:String>
|
||||
<system:String x:Key="rememberLastLocation">Remember last launch location</system:String>
|
||||
<system:String x:Key="LauncherPositionRememberLastLaunchLocation">Remember Last Launch Location</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenCenter">Mouse Screen Center</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenCenterTop">Mouse Screen Center Top</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenCenter">Mouse Focused Screen Center</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenCenterTop">Mouse Focused Screen Center Top</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenLeftTop">Mouse Focused Screen Left Top</system:String>
|
||||
<system:String x:Key="LauncherPositionMouseScreenRightTop">Mouse Focused Screen Right Top</system:String>
|
||||
<system:String x:Key="language">Language</system:String>
|
||||
<system:String x:Key="lastQueryMode">Last Query Style</system:String>
|
||||
<system:String x:Key="lastQueryModeToolTip">Show/Hide previous results when Flow Launcher is reactivated.</system:String>
|
||||
|
|
|
|||
|
|
@ -239,6 +239,16 @@ namespace Flow.Launcher
|
|||
Left = WindowLeft();
|
||||
Top = 10;
|
||||
}
|
||||
else if (_settings.LauncherPosition == "MouseScreenLeftTop")
|
||||
{
|
||||
Left = 10;
|
||||
Top = 10;
|
||||
}
|
||||
else if (_settings.LauncherPosition == "MouseScreenRightTop")
|
||||
{
|
||||
Left = WindowRight();
|
||||
Top = 10;
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateNotifyIconText()
|
||||
|
|
@ -480,6 +490,16 @@ namespace Flow.Launcher
|
|||
Left = WindowLeft();
|
||||
Top = 10;
|
||||
}
|
||||
else if (_settings.LauncherPosition == "MouseScreenLeftTop")
|
||||
{
|
||||
Left = 10;
|
||||
Top = 10;
|
||||
}
|
||||
else if (_settings.LauncherPosition == "MouseScreenRightTop")
|
||||
{
|
||||
Left = WindowRight();
|
||||
Top = 10;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnLocationChanged(object sender, EventArgs e)
|
||||
|
|
@ -524,6 +544,15 @@ namespace Flow.Launcher
|
|||
return top;
|
||||
}
|
||||
|
||||
public double WindowRight()
|
||||
{
|
||||
var screen = Screen.FromPoint(System.Windows.Forms.Cursor.Position);
|
||||
var dip1 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.X, 0);
|
||||
var dip2 = WindowsInteropHelper.TransformPixelsToDIP(this, screen.WorkingArea.Width, 0);
|
||||
var left = (dip2.X - ActualWidth) - 10;
|
||||
return left;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register up and down key
|
||||
/// todo: any way to put this in xaml ?
|
||||
|
|
|
|||
|
|
@ -642,7 +642,7 @@
|
|||
<ComboBox
|
||||
x:Name="LauncherPosition"
|
||||
Grid.Column="2"
|
||||
MinWidth="180"
|
||||
MinWidth="220"
|
||||
Margin="0,0,18,0"
|
||||
VerticalAlignment="Center"
|
||||
DisplayMemberPath="Display"
|
||||
|
|
@ -651,7 +651,6 @@
|
|||
SelectedValue="{Binding Settings.LauncherPosition}"
|
||||
SelectedValuePath="Value"
|
||||
SelectionChanged="LauncherPositionSelectedIndexChanged" />
|
||||
<!--<CheckBox IsChecked="{Binding Settings.RememberLastLaunchLocation}" Style="{DynamicResource SideControlCheckBox}" />-->
|
||||
<TextBlock Style="{StaticResource Glyph}">
|
||||

|
||||
</TextBlock>
|
||||
|
|
|
|||
Loading…
Reference in a new issue