-
Notifications
You must be signed in to change notification settings - Fork 48
Several design changes #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
With this change, the Access Layer X keys are now taking up 3 rows, and the keys are not sized right because of it. |
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.
I've pushed a commit using non-breaking spaces better the word "layer" and the number. Which seems to work. |
gtk::Stack
andgtk::StackSwitcher
instead ofgtk::Notebook
The mockup seems to show a
gtk::StackSwitcher
in the headerbar. #7 is for usinggtk::HeaderBar
, but that may require a couple additional changes and testing for Windows and macOS.