Skip to content

feat: implement custom titlebar matching editor style#710

Merged
dzhou121 merged 1 commit intolapce:masterfrom
panekj:feat/titlebar
Jul 2, 2022
Merged

feat: implement custom titlebar matching editor style#710
dzhou121 merged 1 commit intolapce:masterfrom
panekj:feat/titlebar

Conversation

@panekj
Copy link
Copy Markdown
Collaborator

@panekj panekj commented Jun 30, 2022

No description provided.

@dzhou121
Copy link
Copy Markdown
Collaborator

If possible, maybe we should draw the "minimize", "maximise", and "close" icons like a normal windows APP with title.

@dzhou121
Copy link
Copy Markdown
Collaborator

image

something like this

@panekj
Copy link
Copy Markdown
Collaborator Author

panekj commented Jun 30, 2022

Normal window:
image
Maximised window:
image
Full titlebar:
image

@dzhou121 few things:

  • do we want lapce logo in titlebar? current position is ok? same for colour? which platforms will have logo? for example VSCode has logo on Windows, but not on macOS due to window controls on left side

  • do we want title? what should title have? should title be same as "os" title (currently it's workspace/folder name)

  • do we want window controls on windows to match perfectly? standard Windows window controls have big padding between each other. they also look a bit blurred(?)
    image

Example of draggable lapce:

lapce.mp4

@dzhou121
Copy link
Copy Markdown
Collaborator

do we want lapce logo in titlebar? current position is ok? same for colour? which platforms will have logo? for example VSCode has logo on Windows, but not on macOS due to window controls on left side

Lapce logo only for Windows.

do we want title? what should title have? should title be same as "os" title (currently it's workspace/folder name)

Probably yes for Windows only.

do we want window controls on windows to match perfectly? standard Windows window controls have big padding between each other. they also look a bit blurred(?)

Yes please if that's not too much of trouble.

@panekj
Copy link
Copy Markdown
Collaborator Author

panekj commented Jun 30, 2022

Yes please if that's not too much of trouble.

I'll try to match it as closely as possible

@panekj panekj force-pushed the feat/titlebar branch 2 times, most recently from 897ecfe to 9a9c4fd Compare June 30, 2022 21:44
@panekj panekj changed the title feat: remove ugly Windows titlebar feat: implement custom titlebar matching editor style Jun 30, 2022
@panekj
Copy link
Copy Markdown
Collaborator Author

panekj commented Jun 30, 2022

image

@panekj panekj force-pushed the feat/titlebar branch 4 times, most recently from 78ff1d0 to 3f371a5 Compare July 1, 2022 17:18
@panekj panekj marked this pull request as ready for review July 1, 2022 20:10
@panekj
Copy link
Copy Markdown
Collaborator Author

panekj commented Jul 1, 2022

The only thing left is to add dynamic title to show workspace name but I haven't figured that out yet. PR can be merged and I'll push fix for title later.
Also, restoring window currently doesn't work from window control, it works on double click on titlebar though.

@dzhou121
Copy link
Copy Markdown
Collaborator

dzhou121 commented Jul 1, 2022

Thanks!

I'm perfectly happy with it for not showing project name, because it's already at the very left.

The restore thing might be a Druid thing. I can look into that.

@panekj panekj force-pushed the feat/titlebar branch 3 times, most recently from 320527c to a2c2f56 Compare July 2, 2022 19:10
Comment on lines -129 to +159
Size::new(bc.max().width, 28.0)
#[cfg(not(target_os = "windows"))]
{
Size::new(bc.max().width, 28.0)
}

#[cfg(target_os = "windows")]
{
Size::new(bc.max().width, 32.0)
}
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed titlebar height on Windows to match most other apps and improve readability slightly

@dzhou121 dzhou121 merged commit a0c2211 into lapce:master Jul 2, 2022
@panekj panekj deleted the feat/titlebar branch July 2, 2022 21:34
@Titaniumtown Titaniumtown mentioned this pull request Jul 4, 2022
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.

2 participants