Skip to content
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,28 @@ I was inspired by the way [Hyper terminal](https://hyper.is/) achieved a native

I'm going to start with the [Electron quick start app](https://github.com/electron/electron-quick-start). The full example source code is located in the [`src` directory](/src) of this repo.

#### Note
#### Notes

Currently, there is a bug with window maximization on Electron versions 6.0.0+ on Windows (see [#6](https://github.com/binaryfunt/electron-seamless-titlebar-tutorial/issues/6)). The latest version of Electron you can use is 5.0.11.

This tutorial makes use of the Segoe UI and Segoe MDL2 icon fonts, which are commonplace in Windows. These fonts are included in every Windows 10 installation, but if you plan to make your Windows 10 style titlebar work on a Mac, you'll need to import the fonts as custom CSS fonts, from the font files provided by Microsoft:

```css
@font-face {
font-family: "Segoe MDL2 Assets";
src: local("Segoe MDL2 Assets"),
url("Segoe fonts/SegMDL2.ttf");
}

@font-face {
font-family: "Segoe UI";
src: local("Segoe UI"),
url("Segoe fonts/segui.ttf");
}
```

The fonts are included in a directory in the example app or you can [get the Segoe UI and MDL2 icon fonts here](https://aka.ms/SegoeFonts)

## 1. Add some styles

![S1]
Expand Down
Binary file added src/Segoe fonts/SegMDL2.ttf
Binary file not shown.
1 change: 1 addition & 0 deletions src/Segoe fonts/Segoe_EULA.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
You may use the Segoe MDL2 Assets and Segoe UI fonts or glyphs included in this file (“Software”) solely to design, develop and test your programs that run on a Microsoft Platform, a Microsoft Platform includes but is not limited to any hardware or software product or service branded by trademark, trade dress, copyright or some other recognized means, as a product or service of Microsoft. This license does not grant you the right to distribute or sublicense all or part of the Software to any third party. By using the Software you agree to these terms. If you do not agree to these terms, do not use the Software.
Binary file added src/Segoe fonts/segoeui.ttf
Binary file not shown.
Binary file added src/Segoe fonts/segoeuib.ttf
Binary file not shown.
Binary file added src/Segoe fonts/segoeuil.ttf
Binary file not shown.
Binary file added src/Segoe fonts/segoeuisl.ttf
Binary file not shown.
Binary file added src/Segoe fonts/seguisb.ttf
Binary file not shown.
12 changes: 12 additions & 0 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ html {box-sizing: border-box;}
*, *:before, *:after {box-sizing: inherit;}
html, body {height: 100%; margin: 0;}

@font-face {
font-family: "Segoe MDL2 Assets";
src: local("Segoe MDL2 Assets"),
url("Segoe fonts/SegMDL2.ttf");
}

@font-face {
font-family: "Segoe UI";
src: local("Segoe UI"),
url("Segoe fonts/segui.ttf");
}

body {
font-family: "Segoe UI", sans-serif;
background: #1A2933;
Expand Down