Initial fix for #969
I tried fixing #969. I'm ok with the sidebar context menu, but unsure with the buffer context menu. Please take a look and give me some feedback. tyvm.
Discussion @ #halloy:
x offset + 5
Discussion @ #halloy:
x offset + 5
![]()
![]()
I think that looks good.
Sorry for late review on this, @KaiKorla. This is good, however a small new problem. When you click the sidebar-button it opens and looks great, however if you then instantly press the button again it actually doesn't close it but close then re-opens. Which is techinically what we wanted to fix initially :D
I just pushed a commit with some name changes, hope that was ok. Last issue you could address, if you right click a user in a message, it will never close that context menu.
It's working so far, but the problem with "inline" nicknames in the buffer consists. I tried to track it down, but with my limited experience in Rust and iced it is not so easy.
IMO the problem with this is, that the state cannot be found for this text-parts and therefore the implementation in my code get always a Status::Closed on tree.state.downcast_mut::<State>();. I took a look into selectable_rich_text.rs and wonder about the handling of context_menu there. I don't know if this will cause problems. Maybe i'm totally wrong, but could need some advice anyhow.
@tarkah: @casperstorm told me i should mention you for any advice/help/ideas. so if you got some time please take a look. thank you very much.
This is not forgotten, but we will need @tarkah to chime in here. Just FYI @KaiKorla.
Helping get this over the line a bit, thank you for getting this most of the way complete @KaiKorla. Works as intended on Linux for me now. @casperstorm, when you have a chance could you confirm it's working on Mac/Windows as well?
