From 3d3061f453496e2f58a6ec2297af0799a08e3d69 Mon Sep 17 00:00:00 2001 From: piousdeer <31318219+piousdeer@users.noreply.github.com> Date: Thu, 1 Dec 2022 07:10:22 +0700 Subject: [PATCH] Add product icons (see #11) --- CONTRIBUTING.md | 31 ++++++++++++++ README.md | 6 +-- package.json | 10 ++++- product-icons/adwaita-icons.ttf | Bin 0 -> 2764 bytes product-icons/adwaita.json | 73 ++++++++++++++++++++++++++++++++ product-icons/scalable/ea01.svg | 10 +++++ product-icons/scalable/ea02.svg | 10 +++++ product-icons/scalable/ea03.svg | 10 +++++ product-icons/scalable/ea04.svg | 10 +++++ product-icons/scalable/ea05.svg | 8 ++++ product-icons/scalable/ea06.svg | 8 ++++ product-icons/scalable/ea07.svg | 8 ++++ product-icons/scalable/ea08.svg | 8 ++++ product-icons/scalable/ea09.svg | 8 ++++ product-icons/scalable/ea0a.svg | 8 ++++ product-icons/scalable/ea0b.svg | 49 +++++++++++++++++++++ product-icons/scalable/ea0c.svg | 8 ++++ product-icons/scalable/ea0d.svg | 8 ++++ product-icons/scalable/eb94.svg | 8 ++++ 19 files changed, 276 insertions(+), 5 deletions(-) create mode 100644 CONTRIBUTING.md create mode 100644 product-icons/adwaita-icons.ttf create mode 100644 product-icons/adwaita.json create mode 100644 product-icons/scalable/ea01.svg create mode 100644 product-icons/scalable/ea02.svg create mode 100644 product-icons/scalable/ea03.svg create mode 100644 product-icons/scalable/ea04.svg create mode 100644 product-icons/scalable/ea05.svg create mode 100644 product-icons/scalable/ea06.svg create mode 100644 product-icons/scalable/ea07.svg create mode 100644 product-icons/scalable/ea08.svg create mode 100644 product-icons/scalable/ea09.svg create mode 100644 product-icons/scalable/ea0a.svg create mode 100644 product-icons/scalable/ea0b.svg create mode 100644 product-icons/scalable/ea0c.svg create mode 100644 product-icons/scalable/ea0d.svg create mode 100644 product-icons/scalable/eb94.svg diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2ab6f36 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + +## Color themes + +Requirements: Python 3, npm + +Run `npm run build:color-themes`. Alternatively, `cd` into `src` and run `build.py`. Open this project in VS Code and hit F5 to test out your changes. + +Adwaita syntax highlighting rules are translated from a GtkSourceView style scheme. This is far from perfect, but I've tried to make sure most popular languages look good. If something seems too off, open an issue. + +## Product icons + +Requirements: Python 3, npm, [nanoemoji](https://github.com/googlefonts/nanoemoji) + +Adding a new icon: + +1. Obtain a .svg icon in the [Icon Library](https://flathub.org/apps/details/org.gnome.design.IconLibrary) app +2. Put it into [icons/svg/](icons/svg/), incrementing the name in hexadecimal +3. Open it with a text editor, replace the hardcoded color with `currentColor` and apply `style="transform:scale(0.8)translate(2,2)"` as the icons are too big by default for some reason +4. Edit the icon if needed +5. Add it to [adwaita.json](icons/adwaita.json) +6. Build the .ttf file with `npm run build:product-icons` + +This process should be automated in the future. + +List of icons edited in step 3: + +- All window controls got a background circle with opacity 0.1 +- `layout` is `grid-symbolic` modified in Inkscape + +The menu bar icon must have the code point of U+EB94. It's [!important](https://github.com/microsoft/vscode/blob/2a16bdb4677649893126816d2e22fce76288eeb7/src/vs/base/browser/ui/menu/menubar.css#L102) for some reason. diff --git a/README.md b/README.md index 0e1fb8c..99b3b74 100644 --- a/README.md +++ b/README.md @@ -40,11 +40,9 @@ Installing [adw-gtk3](https://github.com/lassekongo83/adw-gtk3) will get you a m ## Contributing -Requirements: Python 3. +See [CONTRIBUTING.md](CONTRIBUTING.md). -cd into `src` and run `build.py` to build the JSON files (if you have npm, `npm run build` is an alias for that). Open this project in VS Code and hit F5 to test out your changes. - -Adwaita syntax highlighting rules are translated from a GtkSourceView style scheme. This is far from perfect, but I've tried to make sure most popular languages look good. If something seems too off, open an issue. +
This project is not affiliated with GNOME Foundation. diff --git a/package.json b/package.json index 29c8aa7..695c370 100644 --- a/package.json +++ b/package.json @@ -68,10 +68,18 @@ "uiTheme": "vs", "path": "./themes/adwaita-light-default-syntax-highlighting-colorful-status-bar.json" } + ], + "productIconThemes": [ + { + "id": "adwaita", + "label": "Adwaita", + "path": "./product-icons/adwaita.json" + } ] }, "scripts": { - "build": "cd src && python3 build.py" + "build:color-themes": "cd src && python3 build.py", + "build:product-icons": "nanoemoji --color_format glyf_colr_1 --family adwaita-icons --output_file product-icons/adwaita-icons.ttf product-icons/scalable/*.svg" }, "__metadata": { "id": "93fbc635-4a9a-4ff1-88ba-bf017484c602", diff --git a/product-icons/adwaita-icons.ttf b/product-icons/adwaita-icons.ttf new file mode 100644 index 0000000000000000000000000000000000000000..eae6a2b126387b1593f90209d7083d252971542a GIT binary patch literal 2764 zcmb7GX>3$g6#mYAudih(GHs{J)Zi@b6p3Y->7qE8B9a&*1&flJ5Tt2=qO>$DIz(cO z{Lm30#8kw_2rAJ^)L>{Tsfpr7Bmp5YHi{aHD{cwKSPj_s{O*0zrVxnn%$#%2x#zsI z-Q_(9fXR3m78({TzP+jcc)AR5&H~nn1xx1NPW4n^;$d19EM7V*anF*wj{U`mXz$pR z&VOq%<4G^&x$D-qwmAJcgM6MgnA_2k?!q;wq+ZM6&X$fwtQ@idyYM5^;34B^elnTSpA*@*cT8-r9Ego z`8uD9nYkJj*=Ka5i@~-p$S&l-Ry}GpRg3&lRwF6Q@FEblbPO67H!j2xgn#Mwb6{@g zsWcH3)Cuxoli8(S#yn)1xNMglvQv)XIW>UOYCtxtVR9ODr53S>RC_LhjoBRY_|v-Z z&-uS}d!FG$bKaR^DSFV)g0mWe|M8oP_1K18*pDwo$#v2sYh;V;lSTxN_CT_Cq!Fip#`&!%j zc6X*yoFsd<*56gCRTAiv95eh-4q$Jk~29t^U`jX;gvbLtGs=ltSwl?PE z=2pe4VzSdJ%w(pfLV?UV%aQ29vd1i!<&u>EBhO8ZHFK9N>m0TwOp&AAJS><;TR5B z302_tM|-H(9*)Uc_v!Q&Rp9P9XYBBtH(;-@6bcbzRgpw-aWGKiII&1H93Fp|9`m#k>2Q4{QXfte$)zn7sf(nE*&)s36;68t>Sp>1 zLZ5i!D=^NP$v%(_NYmxKxpeOPlOgSOq*pcT{Me7EMA?u3lb=MhiH*xoWHWNDu zEagnd=B zlT*xH*vxJLD|kbKo#Jl5z3e~GrSC4>&l?liiV38TU?S;bm_)jhZ&9Ed`J_Eu7hoT* zB7I5p{R%^sp|+up=qP!HpJe!aL#G;AXy%IzUutN%q0q3P`^~A)Di1s`5N%H7AavXfosokfiVqf)oxxw=_&wS#a|D;mgAWc|hZgTR#GjcmPFvpJ=EZyYP5h=#ADn6wuqq%WY9^jVaV?na1o z7s~zkRTQ?N%onugeuR7>pTb&{n|HX5pn*N$7mWcLEz}k0R*r&5#(lQ|@?yM~>i8AZ zIAqip71Usg8TG?An{nj5AMe#|*B@3nz$`NC-1R&dbU&XbgZt$+9t|Fjr92zleai(! z?mzZt))B!I-a&h%HCgZxnF=z}?)_@js8b?`$?VaLjp^1|rMEmmf0OBO`mAwd0RI9O C%FSf} literal 0 HcmV?d00001 diff --git a/product-icons/adwaita.json b/product-icons/adwaita.json new file mode 100644 index 0000000..bce82a4 --- /dev/null +++ b/product-icons/adwaita.json @@ -0,0 +1,73 @@ +{ + "fonts": [ + { + "id": "adwaita-icons", + "src": [ + { + "path": "./adwaita-icons.ttf", + "format": "woff" + } + ], + "weight": "normal", + "style": "normal" + } + ], + "iconDefinitions": { + "chrome-close": { + "fontCharacter": "\\ea01", + "fontId": "adwaita-icons" + }, + "chrome-maximize": { + "fontCharacter": "\\ea02", + "fontId": "adwaita-icons" + }, + "chrome-minimize": { + "fontCharacter": "\\ea03", + "fontId": "adwaita-icons" + }, + "chrome-restore": { + "fontCharacter": "\\ea04", + "fontId": "adwaita-icons" + }, + "menubar-more": { + "fontCharacter": "\\eb94", + "fontId": "adwaita-icons" + }, + "layout-sidebar-left": { + "fontCharacter": "\\ea05", + "fontId": "adwaita-icons" + }, + "layout-sidebar-left-off": { + "fontCharacter": "\\ea06", + "fontId": "adwaita-icons" + }, + "layout-panel": { + "fontCharacter": "\\ea07", + "fontId": "adwaita-icons" + }, + "layout-panel-off": { + "fontCharacter": "\\ea08", + "fontId": "adwaita-icons" + }, + "layout-sidebar-right": { + "fontCharacter": "\\ea09", + "fontId": "adwaita-icons" + }, + "layout-sidebar-right-off": { + "fontCharacter": "\\ea0a", + "fontId": "adwaita-icons" + }, + "layout": { + "fontCharacter": "\\ea0b", + "fontId": "adwaita-icons" + }, + "arrow-left": { + "fontCharacter": "\\ea0c", + "fontId": "adwaita-icons" + }, + "arrow-right": { + "fontCharacter": "\\ea0d", + "fontId": "adwaita-icons" + } + } +} diff --git a/product-icons/scalable/ea01.svg b/product-icons/scalable/ea01.svg new file mode 100644 index 0000000..370edc1 --- /dev/null +++ b/product-icons/scalable/ea01.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/product-icons/scalable/ea02.svg b/product-icons/scalable/ea02.svg new file mode 100644 index 0000000..cf53562 --- /dev/null +++ b/product-icons/scalable/ea02.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/product-icons/scalable/ea03.svg b/product-icons/scalable/ea03.svg new file mode 100644 index 0000000..f00bec3 --- /dev/null +++ b/product-icons/scalable/ea03.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/product-icons/scalable/ea04.svg b/product-icons/scalable/ea04.svg new file mode 100644 index 0000000..defb53d --- /dev/null +++ b/product-icons/scalable/ea04.svg @@ -0,0 +1,10 @@ + + + + + diff --git a/product-icons/scalable/ea05.svg b/product-icons/scalable/ea05.svg new file mode 100644 index 0000000..47812e4 --- /dev/null +++ b/product-icons/scalable/ea05.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea06.svg b/product-icons/scalable/ea06.svg new file mode 100644 index 0000000..23876a3 --- /dev/null +++ b/product-icons/scalable/ea06.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea07.svg b/product-icons/scalable/ea07.svg new file mode 100644 index 0000000..b885096 --- /dev/null +++ b/product-icons/scalable/ea07.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea08.svg b/product-icons/scalable/ea08.svg new file mode 100644 index 0000000..2d67b97 --- /dev/null +++ b/product-icons/scalable/ea08.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea09.svg b/product-icons/scalable/ea09.svg new file mode 100644 index 0000000..5618795 --- /dev/null +++ b/product-icons/scalable/ea09.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea0a.svg b/product-icons/scalable/ea0a.svg new file mode 100644 index 0000000..1d0e34e --- /dev/null +++ b/product-icons/scalable/ea0a.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea0b.svg b/product-icons/scalable/ea0b.svg new file mode 100644 index 0000000..32f2d7c --- /dev/null +++ b/product-icons/scalable/ea0b.svg @@ -0,0 +1,49 @@ + + + + + + + + + + diff --git a/product-icons/scalable/ea0c.svg b/product-icons/scalable/ea0c.svg new file mode 100644 index 0000000..15d8b73 --- /dev/null +++ b/product-icons/scalable/ea0c.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/ea0d.svg b/product-icons/scalable/ea0d.svg new file mode 100644 index 0000000..dabb7fd --- /dev/null +++ b/product-icons/scalable/ea0d.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/product-icons/scalable/eb94.svg b/product-icons/scalable/eb94.svg new file mode 100644 index 0000000..4b5e6c0 --- /dev/null +++ b/product-icons/scalable/eb94.svg @@ -0,0 +1,8 @@ + + + + + + + +