[feat] Make borders optional instead of binding shadows
Describe the problem
In Windows 10/11, I am unable to remove borders while having shadows, This limits the implementation of some UI solutions.
Describe the solution you'd like
I want a parameter to choose whether to keep the border, independent of the shadow option. Because for us developers, customizing a border while preserving shadows is easy (such as defining a border for the body and customizing colors and other effects), and removing the original border is next to impossible (at least I don't seem to see an effective way)
Alternatives considered
I remember the old version seemed to achieve this effect, but I don't know which specific version it is. Perhaps the new version can also be implemented? Just need to put in effort?
Additional context
In my opinion, those who develop applications using webview generally have a high pursuit of application UI, which may require the technology stack to provide higher degrees of freedom I like to use Tauri, hoping that at least in terms of UI, what others can do, Tauri can do too, and what others cannot do, Tauri can do even better.
https://github.com/tauri-apps/tauri/issues/13176 @FabianLars As shown in my screenshot, there is a one-pixel black border on the left, right, and bottom edges of the window, but not on the top edge. I believe this inconsistent rendering should be considered a bug. What’s the optimal method to preserve window shadows when not using a window decorator?
It's not really a bug on our side at least. The Windows apis are honestly just garbage.
There's one thing left I wanted to try but both the winit and tao maintainers deemed it unusable but nobody remembers why 😂
@FabianLars It does seem to be a problem with the Windows API. If that's the case, then I'm curious about how Electron is implemented (see figure below)?
If this is not implemented using Windows API, is it possible for us to also refer to Electron's approach?
@FabianLars It does seem to be a problem with the Windows API. If that's the case, then I'm curious about how Electron is implemented (see figure below)?
If this is not implemented using Windows API, is it possible for us to also refer to Electron's approach?
@FabianLars Is there any progress? 🙏
no and there likely won't be any progress on our side in the foreseeable future.
no and there likely won't be any progress on our side in the foreseeable future.
In the past few weeks, I have investigated the UI design of the latest versions of several software, such as:
ApiPost
Thunder
It can be seen that borderless+shadow has gradually become mainstream, especially for light color theme software. Taking a step back, even if there are borders, they are only relatively light colored borders:
ApiFox
WeChat
The existing Tauri borders are really eye-catching on Windows 10(when focused).
I really hope you can reconsider this feature. If it doesn't work, can you provide border color settings? This can also significantly improve the effectiveness.
Feel free to open a PR. I can't work on this myself and don't know anyone that can at the moment.
This question still exists, why doesn't the author care about this issue?
@FabianLars I want to try to fix this issue. Which crate is related to this problem?
https://github.com/tauri-apps/tao/ probably
这个问题有啥解决进度吗?我看最新版本的firefox也有这种问题,在win10上面。这个问题影响界面美观。有啥解决办法吗?是需要调用windows api做特殊处理吗?