Skip to content
This repository has been archived by the owner on Jan 4, 2024. It is now read-only.

UI rework and auto hide/show based on mouse position. #18

Merged
merged 15 commits into from Jan 4, 2023

Conversation

madninjaskillz
Copy link
Contributor

Will automatically show the clock elements if the mouse is in the clock area, hiding 5 seconds after leaving that area.
Should be DPI aware, but I am only able to test on a single screen (in theory the code is sound for multiscreen - untested)

I have also completely reworked the UI. I was struggling to get JCS Toggle to behave even a bit nicely and really wanted to add config for the new feature. I have themed it Win11 style since that makes sense to me. Not my neatest code but its been a hot minute since I did winforms.

image

@jmalarcon
Copy link
Owner

Looks very nice! Thanks for the PR.

I'm travelling right now but I check all the proposed changes ASAP and come back to you.

@jmalarcon jmalarcon added the enhancement New feature or request label Dec 13, 2022
@jmalarcon
Copy link
Owner

I've quick-tested your PR and it looks really nice. I'll be off for a few days so, in the meantime, would you be so kind to take care of a few of things I've seen so far, and add them to the PR so that it is polished?:

  • The Exit button doesn't work while the date/time is hidden.
  • In small screens the windows is too tall. For example, in my laptop (Full-HD, 14'') Windows sets the screen zoom to 125%, so the lower part gets slightly cut. Would you be so kind to make them a little bit shorter so that they fit in 1020px max (1000 or less ideal)?
  • The contrast ratio between the disabled buttons text and the background is too low, so it's difficult to read for a conventional person, but impossible for a color blind person. Can you raise it making the text clearer?
  • Support Dark/Light theme when starting the app. Although I like very much your new UI (far better than mine!) I think it should support the user's preference regarding the Dark/Light theme for apps. It's pretty straight forward to know.
  • Change the cursor type to a hand (Hand) for the enabled buttons (default cursor for the disabled ones) to make clear that they are clickable.
  • The Date/Time "bar" which is always disabled since it's something we want to always hide, should be the first element, at the top. Apart from that, the slider is always bigger than the rest, getting out of the window (at least in my laptop's screen, Full-HD with 125%):

image

Most of they are pretty straightforward and I'm off for several days, so I'd be really happy if you could take care of them. Now that you've contributed it's probably not a lot to ask for 😉

Thanks a lot again!

make ui resizable and adjust to size
reduce bar size to make fit better on screens < 1080p
fix quit button
@madninjaskillz
Copy link
Contributor Author

Should be all sorted now. Things done:

  • Exit button now ACTUALLY closes.
  • I've slightly adjusted the size of the bars to make it fit better on "lower" resolutions (i tested on my 4k screen at 250% which should be equivilent to 1080p at 125% in theory)
  • I've also made the UI resizable (and maximizable) and to make sure the UI adapts to window size along with vertical scroll if window isnt big enough to show all elements so should cover all screens.
  • Themes supported. Should be trivial to adjust colours if they are not to your liking (also easy to add further themes)
  • Hand icon for the button bars - with update not getting it if its disabled.
  • Brute force fixed the one toggle that decided to be massive (despite it being the same properties as all the others)
  • Reordered the options as requested.

image

image

@jmalarcon
Copy link
Owner

Hi @madninjaskillz

I'm back. Thanks a lot for the additions!

I've downloaded the changes and have fixed several issues still present, such as:

  • Changed the colors for the light theme so that it uses the system defined colors from the SystemColors enum, to be amore natural Light theme.
  • Enhanced the contrast ratio for disabled panels in the dark mode to enhance accessibility.
  • Changed the manual list of panels to a dynamic one so that in the future if more are added, there'll no need to manually add them anywhere (as long as they are children of the main container panel (pnlCheckBoxes).
  • Refactored method to get current theme (Light/dark) from system (added a new ThemeHelper class in the Theme.cs file to be able to reuse it in other windows such as the about form, although I didn't change it yet).
  • Changed the way the hovering over date/time area works to enable or disable it only when the date/time is shown/hide manually. I didn't like the fact the turning on this check automatically hides the date/time since disabling it didn't show it again and was not coherent with the rest of the app workings. Now it works like the rest of options. Changed the names for clearer ones.
  • Save the status of the "Show on hover" option between runs, like the rest of checkboxes.
  • Disable panels with options while the date/time is hidden, and enable then again while is visible.
  • Cursor as a hand on enabled slider images.
  • Toggling stealth mode doesn't change the enabled/disabled mode of the elements, as it should be
  • Commented some parts of the code to make it clearer for the future
  • Tidied up the code (added regions, remove blank lines, unused methods, move private vars to the beginning...) Need to review this with more detail.

This is is still a work in progress and I need to fix the updates feature, review thoroughly all the code, test it thoroughly in Windows 11 and Windows 10. In the next few days, as soon as I can, I'll do it, polish the version and launch v3.0.0 with all of this. I'll let you know.

Thanks again.

@jmalarcon jmalarcon merged commit 9961af1 into jmalarcon:main Jan 4, 2023
@jmalarcon
Copy link
Owner

With all the modifications this is the new version 3.0.0 o f the app 🎉 Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants