🐛 Remove transparent and use hideTitleBar
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
{
|
||||
"url": "https://weread.qq.com",
|
||||
"url_type": "web",
|
||||
"transparent": true,
|
||||
"hide_title_bar": true,
|
||||
"fullscreen": false,
|
||||
"width": 1200,
|
||||
"height": 780,
|
||||
|
||||
@@ -3,7 +3,7 @@ use serde::{Deserialize, Serialize};
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct WindowConfig {
|
||||
pub url: String,
|
||||
pub transparent: bool,
|
||||
pub hide_title_bar: bool,
|
||||
pub fullscreen: bool,
|
||||
pub width: f64,
|
||||
pub height: f64,
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn get_window(app: &mut App, config: PakeConfig, _data_dir: PathBuf) -> Wind
|
||||
|
||||
#[cfg(target_os = "macos")]
|
||||
{
|
||||
let title_bar_style = if window_config.transparent {
|
||||
let title_bar_style = if window_config.hide_title_bar {
|
||||
TitleBarStyle::Overlay
|
||||
} else {
|
||||
TitleBarStyle::Visible
|
||||
|
||||
2
src-tauri/src/inject/style.js
vendored
2
src-tauri/src/inject/style.js
vendored
@@ -412,7 +412,7 @@ window.addEventListener('DOMContentLoaded', _event => {
|
||||
}
|
||||
`;
|
||||
const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
||||
if (window['pakeConfig']?.transparent && isMac) {
|
||||
if (window['pakeConfig']?.hide_title_bar && isMac) {
|
||||
const topPaddingStyleElement = document.createElement('style');
|
||||
topPaddingStyleElement.innerHTML = topPaddingCSS;
|
||||
document.head.appendChild(topPaddingStyleElement);
|
||||
|
||||
Reference in New Issue
Block a user