aussig / BGS-Tally

A tool to track and report your Background Simulation (BGS) and Thargoid War (TW) activity in Elite Dangerous, implemented as an EDMC plugin. BGS Tally counts all the work you do for any faction, in any system.
https://discord.gg/YDNVtjPnnm
MIT License
30 stars 9 forks source link

Update cmdrs.py - Improved UX for the delete button #234

Closed GLWine closed 3 months ago

GLWine commented 3 months ago

The delete button now becomes red only if one or more elements are selected, otherwise it remains grayed out and unclickable.

GLWine commented 3 months ago

Looks good, but doesn't handle the case when the user CTRL-clicks the selected row, to deselect all. It should revert back to the system colours in that case:

self.delete_button.configure(bg="SystemButtonFace", fg="black")

I thought so too, but I didn't know how to reset it, however is there something similar to SystemButonFace for FG too? For he is also not black, but a shade of grey

GLWine commented 3 months ago

I'll check if this code works correctly

self.delete_button.configure(bg="SystemButtonFace", fg="SystemButtonText")

If it works, post the change

aussig commented 3 months ago

I'll check if this code works correctly

self.delete_button.configure(bg="SystemButtonFace", fg="SystemButtonText")

Ah that looks good, I didn't know there was a default for FG too - better than black, I agree.

GLWine commented 3 months ago

It seems to work... I honestly didn't think it was possible to select with control... I'm used to clicking on an empty part canceling the selection...