Several design changes - #8
Merged
Merged
Conversation
Slightly more efficient, allows exhaustive matching, etc.
I think it previously looked pretty bad full screen on a large display. This is an improvement, anyway.
This makes it possible to remove a `@strong` reference, preventing a reference cycle. Previously there was a reference cycle because the GTK widget needed a reference to `KeyboardColorButtonInner` for callbacks, and likewise that struct contained a reference to `KeyboardColorButtonInner`. The reference in the callback couldn't be weak, because in some uses it is expected that `KeyboardColorButton` may be dropped by code using the type, to just use the GTK widget. This adds a bit of boilerplate, but it's probably the cleanest way to avoid reference cycles. The cycle here prevented the `DaemonClient`'s drop from being called.
This avoids the ugly main loop code, and prevents some error messages that was causing.
It will no longer allow the label text to press right against the border. Usually, this means word-wrapping is applied.
There's some ugly use of `get_data()` here... If we had a GTK widget inheriting `gtk::Fixed` to use in it's place... GTK is a pain.
This way we can place the `gtk::StackSwitcher` anywhere. For instance, in the headerbar as the mockup shows.
Member
|
With this change, the Access Layer X keys are now taking up 3 rows, and the keys are not sized right because of it. |
Member
Author
Hm. There is a I also wonder if we'll run into issues on some systems with different font and font size settings. |
This seems to be the easiest way to prevent these keys from taking three lines. I don't necessarily like dealing with issues using unicode magic like this, but I guess it makes sense that the space in something like "layer 1" would be non-breaking.
Member
Author
|
I've pushed a commit using non-breaking spaces better the word "layer" and the number. Which seems to work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gtk::Stackandgtk::StackSwitcherinstead ofgtk::NotebookThe mockup seems to show a
gtk::StackSwitcherin the headerbar. #7 is for usinggtk::HeaderBar, but that may require a couple additional changes and testing for Windows and macOS.