Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shortcuts to adjust width size, number of results shown and game mode #1369

Merged
merged 17 commits into from
Oct 17, 2022

Conversation

onesounds
Copy link
Contributor

@onesounds onesounds commented Sep 7, 2022

image

  • Quick Adjust Width Size by Ctrl + Plus/Minus in query box.
  • Quick Adjust Max Result Shown by Ctrl + [ , Ctrl + ] in query box.
  • Add Tooltip
  • Adjustment adhere to maximum and minimum allowed
  • Ctrl + F12 to change to Game Mode

@onesounds onesounds added the kind/ui related to UI, icons, themes, etc label Sep 7, 2022
@onesounds onesounds self-assigned this Sep 7, 2022
@onesounds
Copy link
Contributor Author

  • Add Ctrl+F12 to Toggle Game Mode.

@onesounds
Copy link
Contributor Author

I changed it because it was more intuitive to change it like this.

  • Plus Minus : Max Result
  • square brackets : Width

if (specialKeyState.CtrlPressed)
{

_settings.WindowSize = _settings.WindowSize + 100;
Copy link
Member

Choose a reason for hiding this comment

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

I am curious why does this work. I suspect we need to set the property in the viewmodel to trigger change?

@taooceros
Copy link
Member

@onesounds please take a look on my latest change

@onesounds
Copy link
Contributor Author

@onesounds please take a look on my latest change

It's well organized and the code works well.

@onesounds
Copy link
Contributor Author

but why the build faild?

@Garulf
Copy link
Member

Garulf commented Sep 21, 2022

Are we still using Ctrl+ Arrow keys?
If so this may interfere with normal text box shortcuts.

@taooceros
Copy link
Member

Are we still using Ctrl+ Arrow keys?
If so this may interfere with normal text box shortcuts.

I remove them.

@jjw24 jjw24 added review in progress Indicates that a review is in progress for this PR enhancement New feature or request labels Oct 5, 2022
@jjw24 jjw24 added this to the 1.10.0 milestone Oct 5, 2022
@jjw24
Copy link
Member

jjw24 commented Oct 10, 2022

  1. When you use the shortcut for expanding or shrinking the query window width, the new width doesn't seem to get reflected back in the settings window.
  2. Expanding the width of the query window using the shortcut does not respect the maximum width in the Settings, consequently you can keep expanding the width forever
  3. Using the shortcut to expand the result list doesn't respect the maximum allowed results displayed, consequently can keep expanding forever.

@onesounds
Copy link
Contributor Author

  1. When you use the shortcut for expanding or shrinking the query window width, the new width doesn't seem to get reflected back in the settings window.
  2. Expanding the width of the query window using the shortcut does not respect the maximum width in the Settings, consequently you can keep expanding the width forever
  3. Using the shortcut to expand the result list doesn't respect the maximum allowed results displayed, consequently can keep expanding forever.

Fixed

@onesounds
Copy link
Contributor Author

Need to make sure the subtitle sentence is appropriate. @Garulf

@jjw24 jjw24 changed the title Quick Adjust Width Size by Ctrl + Plus/Minus Quick shortcut to adjust width size and number of results shown Oct 14, 2022
@jjw24 jjw24 changed the title Quick shortcut to adjust width size and number of results shown Shortcuts to adjust width size, number of results shown and game mode Oct 14, 2022

namespace Flow.Launcher.ViewModel
{
public class MainViewModel : BaseModel, ISavable
public partial class MainViewModel : BaseModel, ISavable
Copy link
Member

Choose a reason for hiding this comment

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

@taooceros why is this changed to partial class?

Copy link
Member

Choose a reason for hiding this comment

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

Because I would like to use the mvvm toolkit to simplify the code of creating RelayCommand, which requires partial to generate additional code.

"version": "6.0.100",
"rollForward": "latestFeature"
"version": "6.0.*",
"rollForward": "latestPatch"
Copy link
Member

Choose a reason for hiding this comment

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

@taooceros what's this change for?

Copy link
Member

Choose a reason for hiding this comment

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

Oh it shouldn't be there (I am testing different version of dotnet and see which one can help with the bug. However it is not needed because workaround is found)...Though it makes sense to apply the latest patch since that generally includes some security fixes.

Comment on lines +118 to +127

<Target Name="RemoveDuplicateAnalyzers" BeforeTargets="CoreCompile">
<!-- Work around https://github.com/dotnet/wpf/issues/6792 -->

<ItemGroup>
<FilteredAnalyzer Include="@(Analyzer->Distinct())" />
<Analyzer Remove="@(Analyzer)" />
<Analyzer Include="@(FilteredAnalyzer)" />
</ItemGroup>
</Target>
Copy link
Member

Choose a reason for hiding this comment

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

@taooceros What's this change for us specifically?

@jjw24
Copy link
Member

jjw24 commented Oct 14, 2022

Need to make sure the subtitle sentence is appropriate. @Garulf

Updated the wording, hopefully ok.

@taooceros
Copy link
Member

@taooceros What's this change for us specifically?

I couldn't reply directly. This is a workaround for source generator. Details here dotnet/wpf#6792.

If that's being fixed, we can remove it.

@taooceros
Copy link
Member

taooceros commented Oct 14, 2022

@taooceros What's this change for us specifically?

I couldn't reply directly. This is a workaround for source generator. Details here dotnet/wpf#6792.

If that's being fixed, we can remove it.

I think it is fixed (in 6.0.400+). However it seems that appveyor hasn't got the latest image. Let's wait a while later.

@jjw24 jjw24 removed the review in progress Indicates that a review is in progress for this PR label Oct 17, 2022
@jjw24 jjw24 merged commit 35a5aec into Flow-Launcher:dev Oct 17, 2022
@VictoriousRaptor
Copy link
Contributor

Technically it's Ctrl + "=" and Ctrl + "-".

@jjw24
Copy link
Member

jjw24 commented Oct 17, 2022

👍 #1480

@onesounds
Copy link
Contributor Author

@jjw24 @VictoriousRaptor

You guys are too programmers. Why don't you consider the average user?
This is my intended to make it easier for the general user to memorize hotkey.
I changed the shortcut once in the middle for this PR.

+:increase count.
-: decrease count.
[ : decrease size
] : increase size

It is a key chosen so that it can be intuitively understood.

"Technically it's Ctrl + "=" and Ctrl + "-"." <- This can be talked about. This is because it is not a strong suggestion.
"OK I changed it" <- NOoooooooo

image

Photoshop.
They are not idiots who don't even know the keycode.

image
memopad

image
firefox

I have never seen a case of writing = and - instead of + and - when matching these shortcuts. What stupid program writes shortcuts like this? flow launcher? 😂

@jjw24
Copy link
Member

jjw24 commented Oct 18, 2022

Lol looking at those screenshots, realised I never paid much attention to how those shortcuts are described, makes sense. Let's revert it back.

@VictoriousRaptor
Copy link
Contributor

In fact I found it when was looking at my keyboard and realized that + needs a shift combined to input. And I opened powertoys,tried adding some hotykeys, found that they use "=" to describe that key. And I thought every software use "=". Really never paid attention to that.

@onesounds
Copy link
Contributor Author

good. You guys sins are forgiven.

@VictoriousRaptor
Copy link
Contributor

So maybe for a single key, = is correct but for pairs like our new shortcut, + and - is a more user friendly choice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/ui related to UI, icons, themes, etc
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants