Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No text on title bar #763

Closed
1 of 2 tasks
grumphus opened this issue Jul 31, 2024 · 4 comments
Closed
1 of 2 tasks

No text on title bar #763

grumphus opened this issue Jul 31, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@grumphus
Copy link

grumphus commented Jul 31, 2024

Search before asking

  • 我在 issues 列表中搜索,没有找到类似的内容。
    I searched in the issues and found nothing similar.

Motivation

The title bar having nothing but a small icon looks particularly odd especially when used with Groupy, an app that lets you turn windows into tabs. Screenshot of it in action below with Gmail being created by Pake, Google Sheets created by WebCatalog, and the third tab which is also Gmail created by Nativefier.

image

Also, the Gmail icon on the titlebar looks fuzzier compared to the Nativefier build which uses the exact same ico file. Is there a way to improve this?

Solution

No response

Alternatives

If you have WindowManager installed, you can fix the title bar issue yourself by adding the Pake app's exe file to the WindowManager rule and enabling "On Open" in "Advanced" tab and using the TITLE ( "" ) command to set the title bar text whenever the Pake app launches.

Anything else?

Thank you very much for this. I'm really impressed with how lightweight this solution is.

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@grumphus grumphus added the enhancement New feature or request label Jul 31, 2024
@grumphus grumphus changed the title No text on title bar and fuzzy title bar icon No text on title bar Jul 31, 2024
@grumphus
Copy link
Author

Regarding the icon issue, I managed to fix the problem myself. Initially I used a PNG to ICO converter and saved only the 128x128 size. Nativefier uses ImageMagick to auto generate the other sizes. So I re-did the PNG to ICO converter and made a multi-size file including the smaller 16x16 sizes and rebuilt the Pake app using the updated ICO file and I resolved the issue. The title bar text issue still remains though I personally fixed it with a third-party app (see Alternatives).

Thank you!

@jeasonnow
Copy link
Collaborator

@grumphus

let mut window_builder = WindowBuilder::new(app, "pake", url)
.title("")
.user_agent(user_agent)
.visible(false) // Prevent initial shaking
.resizable(window_config.resizable)
.fullscreen(window_config.fullscreen)
.inner_size(window_config.width, window_config.height)
.disable_file_drop_handler()
.always_on_top(window_config.always_on_top)
.initialization_script(&config_script)
.initialization_script(include_str!("../inject/component.js"))
.initialization_script(include_str!("../inject/event.js"))
.initialization_script(include_str!("../inject/style.js"))
//This is necessary to allow for file injection by external developers for customization purposes.
.initialization_script(include_str!("../inject/custom.js"));

Since we don't yet support displaying the full title on Windows, maybe we could set the app name to windows.title in Windows? @tw93

@tw93
Copy link
Owner

tw93 commented Aug 1, 2024

You can add the logic of the title for the non-mac scene, free can directly add @jeasonnow

@rongrong1000
Copy link

I am looking forward to this feature very much

jeasonnow added a commit to jeasonnow/Pake that referenced this issue Aug 5, 2024
jeasonnow added a commit that referenced this issue Aug 5, 2024
fix: #763 add title for linux/windows
jeasonnow added a commit that referenced this issue Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants