tauri icon indicating copy to clipboard operation
tauri copied to clipboard

[feat] Make borders optional instead of binding shadows

Open Think-M opened this issue 8 months ago • 11 comments

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)

Image

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.

Think-M avatar Apr 03 '25 17:04 Think-M

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?

34205037 avatar Apr 10 '25 12:04 34205037

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 avatar Apr 10 '25 12:04 FabianLars

@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)?

Image

If this is not implemented using Windows API, is it possible for us to also refer to Electron's approach?

Think-M avatar Apr 11 '25 07:04 Think-M

@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)?

Image

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? 🙏

Think-M avatar Apr 24 '25 10:04 Think-M

no and there likely won't be any progress on our side in the foreseeable future.

FabianLars avatar Apr 24 '25 11:04 FabianLars

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 Image

Thunder Image

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 Image

WeChat Image

The existing Tauri borders are really eye-catching on Windows 10(when focused).

Image

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.

Think-M avatar May 12 '25 02:05 Think-M

Feel free to open a PR. I can't work on this myself and don't know anyone that can at the moment.

FabianLars avatar May 12 '25 06:05 FabianLars

This question still exists, why doesn't the author care about this issue?

JackChen19920102 avatar Jun 15 '25 08:06 JackChen19920102

@FabianLars I want to try to fix this issue. Which crate is related to this problem?

Think-M avatar Sep 08 '25 01:09 Think-M

https://github.com/tauri-apps/tao/ probably

FabianLars avatar Sep 08 '25 09:09 FabianLars

这个问题有啥解决进度吗?我看最新版本的firefox也有这种问题,在win10上面。这个问题影响界面美观。有啥解决办法吗?是需要调用windows api做特殊处理吗?

yuzw1007 avatar Nov 21 '25 08:11 yuzw1007