Skip to content

feat: background color APIs#11486

Merged
lucasfernog merged 13 commits intodevfrom
feat/background-color
Nov 6, 2024
Merged

feat: background color APIs#11486
lucasfernog merged 13 commits intodevfrom
feat/background-color

Conversation

@amrbashir
Copy link
Member

closes #10519
closes #1564

needs: tauri-apps/tao#995

@amrbashir amrbashir requested a review from a team as a code owner October 24, 2024 16:10
@github-actions
Copy link
Contributor

github-actions bot commented Oct 24, 2024

Package Changes Through bf3c384

There are 9 changes which include tauri-utils with minor, tauri with minor, @tauri-apps/api with minor, tauri-bundler with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-runtime-wry with minor, tauri-macros with patch, tauri-runtime with minor

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
@tauri-apps/api 2.0.3 2.1.0
tauri-utils 2.0.2 2.1.0
tauri-bundler 2.0.4 2.1.0
tauri-runtime 2.1.1 2.2.0
tauri-runtime-wry 2.1.2 2.2.0
tauri-codegen 2.0.2 2.0.3
tauri-macros 2.0.2 2.0.3
tauri-plugin 2.0.2 2.0.3
tauri-build 2.0.2 2.0.3
tauri 2.0.6 2.1.0
@tauri-apps/cli 2.0.4 2.1.0
tauri-cli 2.0.4 2.1.0

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@lucasfernog lucasfernog merged commit 4d545ab into dev Nov 6, 2024
@lucasfernog lucasfernog deleted the feat/background-color branch November 6, 2024 16:21
@dionysuzx
Copy link

is it possible to set it different on dark vs light mode? @amrbashir (on backend, so like when it starts up, fetching first from system)

@amrbashir
Copy link
Member Author

you'd have to get the theme first before creating the window and then create the window with the color you want through Rust not in the config.

@dionysuzx
Copy link

dionysuzx commented Nov 18, 2024

you'd have to get the theme first before creating the window and then create the window with the color you want through Rust not in the config.

this won't work on macOS or iOS right? out of curiosity what is the blocker or path to getting it implemented for those systems? cc @amrbashir (thank you for your work on this btw!)

@amrbashir
Copy link
Member Author

amrbashir commented Nov 18, 2024

I don't have a macOS so I can't test anything but there is https://developer.apple.com/documentation/webkit/wkwebview/3850574-underpagebackgroundcolor?language=objc that we could use but only supported on macOS 12+ and iOS 15+, so we need an alternative for older systems versions. This just needs to be implemented in wry repo (and tao if needed) and should automatically be supported in tauri afterwards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feat] set window background color Allow changing the webview background color

3 participants