Skip to content

Conversation

@onesounds
Copy link
Contributor

@onesounds onesounds commented Sep 7, 2022

image

  • Remember Last Position (Default)
  • Mouse Screen Center (same old thing)
  • Mouse Screen Center Top (New)
  • Mouse Screen Left Top
  • Mouse Screen Right Top
  • Position Reset on Tray (Turning off any one while using multiple monitors causes a location problem.)

Features

  • Change RememberLastPosition(bool) to LauncherPosition(string)
  • It is difficult to respond to screen rotation, so I think the function of always positioning it at the top will help.

Test Case

  • When you move the window outside the screen and press Reset Position, the window must be visible to the user.
  • Each function shall be aligned in a certain position regardless of the monitor resolution.

What to do later

  • The ability to check the number of monitors and then open them at a specific monitor location. (ex> Monior 2 Screen Center)

@onesounds onesounds added the enhancement New feature or request label Sep 7, 2022
@onesounds onesounds self-assigned this Sep 7, 2022
@onesounds
Copy link
Contributor Author

onesounds commented Oct 3, 2022

This pr should merge after clock PR merged.
It was separated from the clock pr.

private void InitializePosition()
{
if (_settings.RememberLastLaunchLocation)
if (_settings.LauncherPosition == "RememberLastLaunchLocation")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should use a switch for this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied it.

return top;
}

public double WindowRight()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for Right (screen) position. it using in top-right option.

public LauncherPositions Value { get; set; }
}

public List<LauncherPosition> LauncherPositions
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is clever, we may use this structure for all the combobox. Probably we want to cache this result? But that may break some behavior when changing language.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just copied and pasted the existing structure. 😋

- Change String to enum.
- Remove duplicated code.
Comment on lines 192 to 204
Left = WindowLeft();
Top = WindowTop();
break;
case LauncherPositions.MouseScreenCenterTop:
Left = WindowLeft();
Top = 10;
break;
case LauncherPositions.MouseScreenLeftTop:
Left = 10;
Top = 10;
break;
case LauncherPositions.MouseScreenRightTop:
Left = WindowRight();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to change name of all three method here.

pluginFilterTxb.Focus();
}

private void LauncherPositionSelectedIndexChanged(object sender, SelectionChangedEventArgs e)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this method for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know either. It seems like a code that VS automatically makes. When I'm making something, I sometimes see this blank code.

@jjw24
Copy link
Member

jjw24 commented Oct 18, 2022

@taooceros @onesounds could we merge dev in please.

@onesounds
Copy link
Contributor Author

  • I confirmed the positioning problem from QuickSizeAdjust feature. (It touched positioning when Adjust Size)
  • Fixed conflicts and issues
  • Position Reset has small wrong positioning. (Positioning timing issue.)
  • I'll fix this part more and merge it.

@jjw24
Copy link
Member

jjw24 commented Oct 19, 2022

@onesounds let me know when pr is good to go again.

@jjw24
Copy link
Member

jjw24 commented Oct 19, 2022

One thing from my testing prior to your recent merge Dev commits @onesounds, was that on a fresh install, the query window starts up on the top left corner. I wonder if we should have Mouse focused screen center as a default instead?

@jjw24 jjw24 added the review in progress Indicates that a review is in progress for this PR label Oct 19, 2022
@jjw24 jjw24 added this to the 1.10.0 milestone Oct 19, 2022
@onesounds
Copy link
Contributor Author

onesounds commented Oct 19, 2022

One thing from my testing prior to your recent merge Dev commits @onesounds, was that on a fresh install, the query window starts up on the top left corner. I wonder if we should have Mouse focused screen center as a default instead?

I'll check. I think remember last position should default and it should be center when fresh install. anyway I noticed little bugs. I'll mention to you when I think it's OK to review

@jjw24
Copy link
Member

jjw24 commented Oct 19, 2022

I think remember last position should default and it should be center when fresh install

This will have the query window stay on the same monitor screen when dual or more monitors are in use, wouldn't the mouse focus option be better for people who use multiple monitors (especially if they are new to flow and don't know you can change those options yet)?

@onesounds
Copy link
Contributor Author

onesounds commented Oct 19, 2022

I think remember last position should default and it should be center when fresh install

This will have the query window stay on the same monitor screen when dual or more monitors are in use, wouldn't the mouse focus option be better for people who use multiple monitors (especially if they are new to flow and don't know you can change those options yet)?

Well... OK. I think you are right too. default will be 'mouse focused screen center'.

@onesounds
Copy link
Contributor Author

onesounds commented Oct 19, 2022

OK done.

  • Renamed positioning function (Before: WindowLeft, WindowTop, WindowRight / After: HorizonCenter, VerticalCenter, HorizonRight)
    • I named by what output value.
  • Fix Position Reset Feature (I added task time for positioning.)
  • Fix Last Launch Position (Before : it has trouble when exit, and re run.)
  • Changed the Default to 'Mouse Focused Center'

Test Cases

  • It should operate as Mouse Focus Center on initial execution. The default settings must be the same.
  • Move the window out of the screen and return to the center of the screen when position reset is pressed in the tray.
  • When the program is turned on and off in the Last Remember Position state, it should be turned on in the position before turning it off.
  • The lastrememberposition must operate normally on the dual monitor.
  • Each setting must behave as described in the description.
  • Each setting must shall operate independently "Hide when focus out" and "animation" state.
  • Quick Adjust Hotkey should works well without positioning effect.

@onesounds onesounds requested a review from jjw24 October 19, 2022 10:39
Copy link
Member

@jjw24 jjw24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@jjw24 jjw24 removed the review in progress Indicates that a review is in progress for this PR label Oct 20, 2022
@jjw24 jjw24 changed the title Position Setting Search window's position settings Oct 20, 2022
@jjw24 jjw24 enabled auto-merge October 20, 2022 10:47
@jjw24 jjw24 merged commit b80b3ed into Flow-Launcher:dev Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants