Closed Legend-Master closed 1 week ago
~~I don't quite understand how ThemeChanged
works in tao
to be honest, when should it be fired? We currently only fires it when the window's theme is set to auto/no preference and the theme is actually changed
I think it should be fired whenever the theme changes no matter if the theme is set to None
or Some(Theme)
~~ Never mind, only auto will can have theme changes
I'm not sure how to send events from set_theme
, do we do a RegisterWindowMessage
and use PostMessage
here?
We probably can just mirror the mac and linux implementations from winit (they should be much more straight forward compared to the Windows one 😂), but I can't test them, so I'll just do the Windows one for now
Moving my discord message here: The macos implementation worked on my machine. 👍
There are 1 changes which include tao with patch
Add another change file through the GitHub UI by following this link.
Read about change files or the docs at github.com/jbolda/covector
Linux impl works for me on WSL
Looks good on macOS.
Just a note that the ThemeChagned
event does not emit, but I think it has broken for a while.
I don't know if sending WM_SETTINGCHANGE
ourselves here is fine or not since the wparam and lparam are actually not 0 from the system one, and by the way, if you do this, you need to set redraw_title_bar
to true
I don't know if sending
WM_SETTINGCHANGE
ourselves here is fine or not since the wparam and lparam are actually not 0 from the system one
Doesn't matter since we don't read either of them.
and by the way, if you do this, you need to set
redraw_title_bar
totrue
From my testing, this doesn't seem to be needed.
@amrbashir the windows one is not working right now, you need to set redraw_title_bar
to true
, see my comment above
I guess Windows 10, really needs to redraw, just changed it to always redraw then
BTW, sorry for hijacking the PR, I was just testing a few things out and thought might as well push it instead of requesting another review.
All good, feel free to make changes 😃
Closes #582 Closes #891