NiyaShy / XB1ControllerBatteryIndicator

A tray application that shows a battery indicator for an Xbox-ish controller and gives a notification when the battery level drops to (almost) empty.
GNU General Public License v2.0
730 stars 52 forks source link

Battery Level Popup #52

Closed Friday-The13-rus closed 4 years ago

Friday-The13-rus commented 4 years ago

Found that #46 idea sounds brilliant and would like to provide the implementation. изображение Includes implementation of the popup and settings window. On the settings window display duration, position and size, colors and font can be changed based on personal preferences. изображение Added a couple of items in context menu that allow to enable/disable popup and toast message. And additional setting to display popup in any time regardless of battery level using XBox button.

I translated text in the popup to all supported languages (because of it is almost the same as message in the toast), but new context menu items and the settings window are translated only to English and Russian.

The pull request contains a lot of code, but the biggest part is for the settings window.

MorbidEden commented 4 years ago

This implementation is excellent. Great work. I only found one issue: when powering off the controller with the "Show Popup on pressing XBox button" option enabled, holding down the XBox button prompts the popup to show repeatedly as if it is "flickering." Otherwise, this is great.

Friday-The13-rus commented 4 years ago

@MorbidEden thanks. I thought about it. Changed event for displaying the pop up from press to release the button.

NiyaShy commented 4 years ago

Consider my jaw dropped 😮 This looks really nice and like a great implementation. BUT: Haven't written it down anywhere yet (or enforced it through github), but pushing such rather big changes directly to the master branch is a big no-no. The testing branch is there for a reason so new features can be tried out without messing up the main code. I know that I've allowed it in the past, but that will change.

Friday-The13-rus commented 4 years ago

I got your point. Not sure that the testing branch is up to date, but I will update target branch.

NiyaShy commented 4 years ago

It currently is slightly behind, but only by 2 translations that recently got added. So nothing game breaking. Thanks for changing it, I'll see that those conflicts get resolved so it can be merged. And ofc thanks a bunch for coding this 😃

MorbidEden commented 4 years ago

@Friday-The13-rus Seems to be working perfectly now. Thank you for your work.

@NiyaShy Thank you for all of your work on this, as well. I've been using this for a couple of years and it's quite essential for QoL.

NiyaShy commented 4 years ago

Hm... From the reported 6 conflicts the first 5 were harmless (simple additions). But the ViewModel might become a nut to crack due to the changes rolodato submitted with #39. I'll have to check if I can resolve the overlapping changes without breaking anything...

Friday-The13-rus commented 4 years ago

Merged with features in the testing, including #39

NiyaShy commented 4 years ago

Thanks, that saved me a bit of a headache 😉 Conflict resolution on Github isn't very helpful, and my VS is currently a bit "messed up" due to experiments with migrating to .net core...

MorbidEden commented 4 years ago

@NiyaShy I have a very vanilla install of VS Community 2019 16.8.2 with only ".NET desktop development" and "Desktop development with C++" if you need testing help.

blackhorse088 commented 3 years ago

This is so amazing! Can't wait to try it out!

A note here got my attention, are the X button unique to each controller? Which means, if Controller 2 pressed it, it shows Controller 2 status? And what about Gamebar? Trying to help avoiding any conflictions.

If any graphical assistance needed, of any kind, let me know! Will be glad to help :) Thank you Friday-The13-rus, NiyaShy and everyone for this amazing work!

NiyaShy commented 3 years ago

Just tried it out: controller 2 works as intended. image Game bar on the other hand... is dominant and grabs the XB button for itself, so the popup doesn't show up. So it's either game bar or the info popup, not both. Thanks for thinking about that, I never would have paid any attention since disabling game bar was one of the first things for me after setting up Win10...