* If a context_page was shown, the focus for the panes didn't work.
By clicking all panes you could get input in all of them as long as
the context_page prevented focus updated.
* Find was drawn in all panes, with typed text being entered in all of
them. Changed this to only show find in the focused pane.
* Also, when I was going find related stuff, I populate the find entry
with selected text, and clear the find search value on close.
* Presumably, the TODO about window resizing interfering with scrolling
is not applicable anymore with the existence of padding from the pane
grid container. So, set `core.window.content_container` to false.
* Pane grid container didn't follow the selected theme. So, set style
on it to fix that.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
`ctrl`+`N` is a common shortcut to switch to a specific tab. 1-8
switches to the exact tab or the last tab. `ctrl`+`9` always switches to
the last tab.
This causes a functional change that may not be obvious.
When running `cosmic-term` from a shell prompt as a detached
process, `stdout`/`stderr` descriptors get deleted, and a `println!()`
message would take the `cosmic-term` process down.
No such an issue with log messages.
This can be tested by running `htop` then exiting the tool, which
would trigger a "TODO: CursorBlinkingChange" message.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This can happen if configured font name is uninstalled for example.
Pick the first font name available if that's the case.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* Store a font name => font faces map
* Only list font names that have `NORMAL` and `BOLD` faces with
`Normal` stretch. This will give us defaults and fall-backs that are
guaranteed to always exist.
* Filter by stretch first, with `Normal` chosen as the always existing
default.
* Then only list font weights supported by the font name stretch
selected, for the normal and bold cases.
* When changing the font name selected, the stretch/weight options
will stay the same if supported by the new font name, or revert to
the always existing fall-backs.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
In `Application::subscription()`, `subscription::channel()` would
create a dead terminal tab if it was called before
`config_subscription()`.
Then `subscription::channel()` would be triggered a second time
creating a second terminal tab that works.
This commit fixes this issue by only creating the first terminal
tab after a `Message::Config{}` was handled, i.e. after
`config_subscription()` was run.
Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>