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

Add Remix Icon and Font Awesome themes #2174

Merged
merged 6 commits into from
Jan 10, 2025
Merged
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
2 changes: 2 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ The following libraries are dependencies of novelWriter:
Some of the assets bundled with novelWriter were adapted from the following sources:

* **Material Symbols** icons by Google Inc (Apache 2.0)
* **Remix** icons by RemixIcon (Apache 2.0)
* **Font Awesome** icons by Fonticons Inc (CC BY 4.0)
* **Tomorrow** syntax themes by Chris Kempson (MIT License)
* **Owl** syntax themes by Sarah Drasner (MIT License)
* **Solarized** themes by Ethan Schoonover (MIT License)
Expand Down
107 changes: 107 additions & 0 deletions novelwriter/assets/icons/font_awesome.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_filled_bold.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_filled_normal.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_filled_thin.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_rounded_bold.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_rounded_normal.icons

Large diffs are not rendered by default.

196 changes: 99 additions & 97 deletions novelwriter/assets/icons/material_rounded_thin.icons

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions novelwriter/assets/icons/remix_filled.icons

Large diffs are not rendered by default.

106 changes: 106 additions & 0 deletions novelwriter/assets/icons/remix_outline.icons

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions novelwriter/assets/text/credits_en.htm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ <h3>Assets</h3>

<ul>
<li><b>Material Symbols</b> icons by Google Inc (Apache 2.0)</li>
<li><b>Remix</b> icons by RemixIcon (Apache 2.0)</li>
<li><b>Font Awesome</b> icons by Fonticons Inc (CC BY 4.0)</li>
<li><b>Tomorrow</b> syntax themes by Chris Kempson (MIT License)</li>
<li><b>Owl</b> syntax themes by Sarah Drasner (MIT License)</li>
<li><b>Solarized</b> themes by Ethan Schoonover (MIT License)</li>
Expand Down
10 changes: 5 additions & 5 deletions novelwriter/gui/sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,11 @@ def updateTheme(self) -> None:
self.tbStats.setStyleSheet(buttonStyle)
self.tbSettings.setStyleSheet(buttonStyle)

self.tbProject.setThemeIcon("project_view")
self.tbNovel.setThemeIcon("novel_view")
self.tbSearch.setThemeIcon("search")
self.tbOutline.setThemeIcon("outline")
self.tbBuild.setThemeIcon("manuscript")
self.tbProject.setThemeIcon("sb_project")
self.tbNovel.setThemeIcon("sb_novel")
self.tbSearch.setThemeIcon("sb_search")
self.tbOutline.setThemeIcon("sb_outline")
self.tbBuild.setThemeIcon("sb_build")
self.tbDetails.setThemeIcon("list")
self.tbStats.setThemeIcon("stats")
self.tbSettings.setThemeIcon("settings")
Expand Down
2 changes: 1 addition & 1 deletion novelwriter/tools/manusbuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def __init__(self, parent: QWidget, build: BuildSettings) -> None:
self.buttonBox.addButton(self.btnOpen, QtRoleAction)

self.btnBuild = QPushButton(
SHARED.theme.getIcon("manuscript", "blue"), self.tr("&Build"), self
SHARED.theme.getIcon("sb_build", "blue"), self.tr("&Build"), self
)
self.btnBuild.setIconSize(bSz)
self.btnBuild.setAutoDefault(True)
Expand Down
2 changes: 1 addition & 1 deletion novelwriter/tools/manuscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ def _updateBuildsList(self) -> None:
for key, name in self._builds.builds():
bItem = QListWidgetItem()
bItem.setText(name)
bItem.setIcon(SHARED.theme.getIcon("manuscript", "blue"))
bItem.setIcon(SHARED.theme.getIcon("build_settings", "blue"))
bItem.setData(self.D_KEY, key)
self.buildList.addItem(bItem)
self._buildMap[key] = bItem
Expand Down
28 changes: 24 additions & 4 deletions pkgutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

from pathlib import Path

from utils.material_icons import processMaterialIcons
from utils.icon_themes import processFontAwesome, processMaterialIcons, processRemix

CURR_DIR = Path(__file__).parent
SETUP_DIR = CURR_DIR / "setup"
Expand Down Expand Up @@ -330,10 +330,10 @@ def buildSampleZip(args: argparse.Namespace | None = None) -> None:
##

def buildIconTheme(args: argparse.Namespace) -> None:
"""Build an icon theme."""
"""Build icon themes."""
print("")
print("Build Icon Theme")
print("================")
print("Build Icon Themes")
print("=================")
print("")

workDir = Path(args.sources).absolute()
Expand Down Expand Up @@ -384,6 +384,26 @@ def buildIconTheme(args: argparse.Namespace) -> None:
},
})

if style in ("all", "fa"):
processFontAwesome(workDir, iconsDir, {
"font_awesome": {
"name": "Font Awesome 6",
},
})

if style in ("all", "remix"):
processRemix(workDir, iconsDir, {
"remix_outline": {
"name": "Remix Icon - Outline",
"filled": False,
},
"remix_filled": {
"name": "Remix Icon - Filled",
"filled": True,
},
})

print("Done")
print("")

return
Expand Down
23 changes: 23 additions & 0 deletions setup/debian/copyright
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,26 @@ License: Apache-2.0
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Files: novelwriter/assets/icons/remix_*
Copyright: RemixIcon
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Files: novelwriter/assets/icons/font_awesome.*
Copyright: Fonticons Inc
License: CC-BY-4.0
This work is licensed under Creative Commons Attribution 4.0
International. To view a copy of this license, visit
.
https://creativecommons.org/licenses/by/4.0/
10 changes: 10 additions & 0 deletions setup/iss_license.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,13 @@ Material Symbols
Copyright: Google Inc
Website: <https://fonts.google.com/icons>
License: Apache 2.0 <https://www.apache.org/licenses/LICENSE-2.0.txt>

Remix Icon
Copyright: Remix Icon
Website: <https://remixicon.com>
License: Apache 2.0 <https://www.apache.org/licenses/LICENSE-2.0.txt>

Font Awesome
Copyright: Fonticons Inc
Website: <https://fontawesome.com>
License: CC BY 4.0 <https://creativecommons.org/licenses/by/4.0/>
108 changes: 108 additions & 0 deletions utils/font_awesome.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"alert_error": "circle-exclamation",
"alert_info": "circle-info",
"alert_question": "circle-question",
"alert_warn": "triangle-exclamation",

"cls_archive": "box-archive",
"cls_character": "user-group",
"cls_custom": "tag",
"cls_entity": "building",
"cls_none": "notdef",
"cls_novel": "book",
"cls_object": "key",
"cls_plot": "puzzle-piece",
"cls_template": "folder-plus",
"cls_timeline": "hourglass-end",
"cls_trash": "trash-can",
"cls_world": "earth-africa",

"prj_folder": "folder",
"prj_document": "file-lines",
"prj_title": "file-lines",
"prj_chapter": "file-lines",
"prj_scene": "file-lines",
"prj_note": "note-sticky",

"fmt_bold": "bold",
"fmt_italic": "italic",
"fmt_mark": "highlighter",
"fmt_strike": "strikethrough",
"fmt_subscript": "subscript",
"fmt_superscript": "superscript",
"fmt_underline": "underline",
"fmt_toolbar": "square",

"search": "magnifying-glass",
"search_cancel": "xmark",
"search_case": "font",
"search_loop": "repeat",
"search_preserve": "text-height",
"search_project": "file-arrow-down",
"search_regex": "asterisk",
"search_replace": "magnifying-glass-arrow-right",
"search_word": "text-width",

"bullet-off": "circle:regular",
"bullet-on": "circle:solid",
"unfold-hide": "caret-right",
"unfold-show": "caret-down",

"sb_build": "up-right-from-square",
"sb_novel": "book-open",
"sb_outline": "table-list",
"sb_project": "pen-to-square",
"sb_search": "magnifying-glass",

"add": "plus",
"bookmarks": "bookmark",
"browse": "folder-open",
"build_settings": "up-right-from-square",
"cancel": "ban",
"checked": "square-check",
"chevron_down": "chevron-down",
"chevron_left": "chevron-left",
"chevron_right": "chevron-right",
"chevron_up": "chevron-up",
"close": "xmark",
"copy": "clone",
"document_add": "file-circle-plus",
"document": "file",
"edit": "pen",
"exclude": "ban",
"export": "file-export",
"filter": "filter",
"fit_height": "arrows-up-down",
"fit_width": "arrows-left-right",
"folder": "folder",
"font": "font",
"import": "file-import",
"language": "spell-check",
"lines": "align-left",
"list": "list",
"margin_bottom": "arrow-down",
"margin_left": "arrow-left",
"margin_right": "arrow-right",
"margin_top": "arrow-up",
"maximise": "maximize",
"minimise": "minimize",
"more_arrow": "caret-right",
"more_vertical": "ellipsis-vertical",
"noncheckable": "square-minus",
"open": "file-arrow-up",
"panel": "table-list",
"pin": "thumbtack",
"project_copy": "copy",
"quote": "quote-right",
"refresh": "arrow-rotate-right",
"remove": "minus",
"revert": "arrow-rotate-left",
"settings": "gear",
"star": "star",
"stats": "chart-simple",
"text": "file-lines",
"timer_off": "pause",
"timer": "clock",
"unchecked": "square-xmark",
"view": "minus"
}
Loading
Loading