Conversation
|
I'll test this out |
|
Thanks for taking care of these things. I have some local changes in progress on this branch as well. I'll look at this all together and see about merging them, and hopefully we can launch this visualizer soon. |
3d8571b to
4a3e149
Compare
|
I noticed that the font selection doesn't play well with the drawing bezel - I would expect the bezel size to grow with the font size (ie the bezel setting would determine the margin). The current setup is fine, I think users can accomplish the goal of "make the size large and the bezel the same size, but it's two steps instead of one. Like, who would want this: I would expect the "show non-modifier characters" to be off by default, but that's just me. Overall I think this could ship as-is! No crashes or "real issues" found, just some cosmetic opinions that are completely subjective. Thanks, @SoCuul for taking this on, to be honest I had decided to give up on it (because it was suiting my needs 🤷♂️). |
|
Didn't notice until now that the non-modifiers was set to true by default! Thanks for catching that. For the font size being relative to the bezel size, I totally agree with you. It would just take a fair more amount of effort to get a result that looks good every time (especially since I have little experience with AppKit drawing code). |
|
Hey @SoCuul , thanks for your effort to help finish the work needed to get this visualizer into the app. A few things:
Meanwhile I'll also test these changes and evaluate integration with other changes I have staged locally. Thank you. |
Hi @akitchen! In #342 I've added similar settings to the svelte visualizer, so I believe it would be best to refactor the settings into a view that can be used across the visualizer settings. It would be great if you could review the other changes present in that PR, as then I can build on top of them for the minimal visualizer branch. |
|
I've finished a mostly complete implementation of a global display mode state in 7da5b63. It currently works perfectly with both the Default and Svelte visualizers. At the moment, additional changes need to be made to KCEventTransformer to use values inside KCDisplayMode for validation, rather than the no longer accurate “isCommand” and “isModified” methods on KCKeystroke. I attempted to do this myself but wasn't able to get very far since I'm not familiar with the lengthy KCEventTransformer code. Also, for the updates to the license information, would that require @colinta to add their name to the file as well? |
akitchen
left a comment
There was a problem hiding this comment.
Thanks for the effort to help get this visualizer ready for release. Just a few comments for now, mainly that the individual visualizers don't need to take on knowledge of mouse settings, they'll either receive mouse events or not.
There's a few other unrelated things to work out before we can release but I'm open to taking these changes on the minimal-visualizer branch once the mouse handling stuff is cleaned up.
| - (void)setCurrentMouseDisplayOptionName:(NSString *)displayOptionName { | ||
| mouseEventVisualizer.currentMouseDisplayOptionName = displayOptionName; | ||
|
|
||
| [[NSNotificationCenter defaultCenter] postNotificationName:@"KCMouseEventsSettingChanged" object:nil]; |
|
|
||
|
|
||
| - (BOOL)mouseEnabled { | ||
| NSInteger displayOption = [[NSUserDefaults standardUserDefaults] integerForKey:@"mouse.displayOption"]; | ||
|
|
||
| // 2: With Current Visualizer | ||
| // 3: With Pointer and Visualizer | ||
| if (displayOption == 2 || displayOption == 3) { | ||
| return YES; | ||
| } | ||
| else { | ||
| return NO; | ||
| } | ||
| } | ||
|
|
| CGFloat width = kDefaultDimension; | ||
| CGFloat width = [ud integerForKey:@"minimal.bezelSize"]; | ||
|
|
||
| if (_mouse && [self mouseEnabled]) { |
There was a problem hiding this comment.
again don't need the mouseEnabled check, we'll either have a mouse event here or not, as appropriate
| // Remove flags that shouldn't be shown | ||
| if (![ud boolForKey:@"minimal.display.command"]) { | ||
| flags &= ~NSEventModifierFlagCommand; | ||
| } | ||
| if (![ud boolForKey:@"minimal.display.shift"]) { | ||
| flags &= ~NSEventModifierFlagShift; | ||
| } | ||
| if (![ud boolForKey:@"minimal.display.option"]) { | ||
| flags &= ~NSEventModifierFlagOption; | ||
| } | ||
| if (![ud boolForKey:@"minimal.display.control"]) { | ||
| flags &= ~NSEventModifierFlagControl; | ||
| } | ||
| if (![ud boolForKey:@"minimal.display.function"]) { | ||
| flags &= ~NSEventModifierFlagFunction; | ||
| } |
There was a problem hiding this comment.
I'm not sold on this as a UX choice but appreciate the effort for now
This PR finishes the elements missing from the "Mods only (later renamed to minimal)" visualizer.
Including: