diff --git a/crates/cr-win/package/MaterialDesignIcons-LICENSE.txt b/crates/cr-win/package/MaterialDesignIcons-LICENSE.txt new file mode 100644 index 0000000..382f8a1 --- /dev/null +++ b/crates/cr-win/package/MaterialDesignIcons-LICENSE.txt @@ -0,0 +1,20 @@ +Pictogrammers Free License +-------------------------- + +This icon collection is released as free, open source, and GPL friendly by +the [Pictogrammers](http://pictogrammers.com/) icon group. You may use it +for commercial projects, open source projects, or anything really. + +# Icons: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) +Some of the icons are redistributed under the Apache 2.0 license. All other +icons are either redistributed under their respective licenses or are +distributed under the Apache 2.0 license. + +# Fonts: Apache 2.0 (https://www.apache.org/licenses/LICENSE-2.0) +All web and desktop fonts are distributed under the Apache 2.0 license. Web +and desktop fonts contain some icons that are redistributed under the Apache +2.0 license. All other icons are either redistributed under their respective +licenses or are distributed under the Apache 2.0 license. + +# Code: MIT (https://opensource.org/licenses/MIT) +The MIT license applies to all non-font and non-icon files. diff --git a/crates/cr-win/package/make-msix.ps1 b/crates/cr-win/package/make-msix.ps1 index 41660fb..5702533 100644 --- a/crates/cr-win/package/make-msix.ps1 +++ b/crates/cr-win/package/make-msix.ps1 @@ -18,6 +18,8 @@ Copy-Item "$root\target\release\CoreRules.exe" $layout # WinUI's WebView2 loads it; the build put it next to the exe. Copy-Item "$root\target\release\Microsoft.Web.WebView2.Core.dll" $layout Copy-Item "$PSScriptRoot\Assets\*" "$layout\Assets" +# The licence of the Material Design Icons the navigation draws. +Copy-Item "$PSScriptRoot\MaterialDesignIcons-LICENSE.txt" $layout $manifest = Get-Content "$PSScriptRoot\AppxManifest.xml" -Raw $manifest.Replace('Version="0.0.0.0"', "Version=""$Version.0""") | Set-Content -NoNewline -Encoding utf8 "$layout\AppxManifest.xml" diff --git a/crates/cr-win/src/app.rs b/crates/cr-win/src/app.rs index 4dd32ff..3f3a113 100644 --- a/crates/cr-win/src/app.rs +++ b/crates/cr-win/src/app.rs @@ -19,6 +19,7 @@ mod packages; mod parties; mod portrait; mod record; +mod section_icons; mod settings; mod sheet; mod tables; diff --git a/crates/cr-win/src/app/library.rs b/crates/cr-win/src/app/library.rs index 2c62d18..0005388 100644 --- a/crates/cr-win/src/app/library.rs +++ b/crates/cr-win/src/app/library.rs @@ -16,7 +16,7 @@ use cr_store::userdb::{self, Filter as Origins, Origin}; use cr_win::text::plain; use windows_reactor::*; -use super::{Message, Shell, available}; +use super::{Message, Shell, available, section_icons}; use crate::ui; /// The pictures of the entry on the details, made once when it is @@ -74,45 +74,12 @@ impl Pictures { } } -/// The GNOME app's sword, which Segoe Fluent Icons has no glyph for: -/// its 16-pixel drawing turned 45 degrees, as path data. -const SWORD: &str = "F1 M14.93,1.07 L14.43,3.69 L7.79,10.33 L5.67,8.21 L12.31,1.57 Z \ - M4.04,6.59 L9.41,11.96 A1,1 0 0 1 8,13.37 L2.63,8 A1,1 0 0 1 4.04,6.59 Z \ - M4.61,9.98 L6.02,11.39 L4.04,13.37 L2.63,11.96 Z \ - M1.64,12.38 A1.4,1.4 0 1 1 3.62,14.36 A1.4,1.4 0 1 1 1.64,12.38 Z"; - /// The section's icon in the navigation, as the GNOME app gives each its /// own. pub fn icon(section: &str) -> View { - if section == "weapons" { - return PathIcon::new().data(SWORD).into(); - } - SymbolIcon::new().symbol(symbol(section)).into() -} - -fn symbol(section: &str) -> Symbol { - match section { - library::CHARACTERS => Symbol::People, - "races" => Symbol::Contact, - "classes" => Symbol::Manage, - "kits" => Symbol::ContactInfo, - "armor" => Symbol::Permissions, - "equipment" => Symbol::Shop, - "magic-items" => Symbol::SolidStar, - "nonweapon" => Symbol::List, - OTHER_SECTION => Symbol::AllApps, - "wizard-spells" | "priest-spells" => Symbol::Highlight, - "psionics" => Symbol::Emoji2, - "monsters" => Symbol::Emoji, - "monster-types" => Symbol::ViewAll, - "traps" => Symbol::Important, - "encounters" => Symbol::MapPin, - "templates" => Symbol::Bullets, - "tables" => Symbol::ShowResults, - "treasure" => Symbol::Bookmarks, - "treasure-tables" => Symbol::Calculator, - "books" => Symbol::Library, - _ => Symbol::Document, + match section_icons::path(section) { + Some(data) => PathIcon::new().data(data).into(), + None => SymbolIcon::new().symbol(Symbol::Document).into(), } } diff --git a/crates/cr-win/src/app/section_icons.rs b/crates/cr-win/src/app/section_icons.rs new file mode 100644 index 0000000..18cc5e6 --- /dev/null +++ b/crates/cr-win/src/app/section_icons.rs @@ -0,0 +1,321 @@ +//! The icons of the library's sections in the navigation, which Segoe +//! Fluent Icons has nothing fitting for: drawings of Material Design Icons +//! (Pictogrammers, Apache License 2.0, see +//! `package/MaterialDesignIcons-LICENSE.txt`), scaled from their 24-pixel +//! grid to the navigation's 16 pixels, as path data. + +use cr_store::userdb::parts::OTHER_SECTION; + +use cr_app::library; + +/// The path data of `section`'s icon, when it has one. +pub fn path(section: &str) -> Option<&'static str> { + Some(match section { + library::CHARACTERS => CHARACTERS, + "races" => RACES, + "classes" => CLASSES, + "kits" => KITS, + "weapons" => WEAPONS, + "armor" => ARMOR, + "equipment" => EQUIPMENT, + "magic-items" => MAGIC_ITEMS, + "nonweapon" => NONWEAPON, + OTHER_SECTION => OTHER, + "wizard-spells" => WIZARD_SPELLS, + "priest-spells" => PRIEST_SPELLS, + "psionics" => PSIONICS, + "monsters" => MONSTERS, + "monster-types" => MONSTER_TYPES, + "traps" => TRAPS, + "encounters" => ENCOUNTERS, + "templates" => TEMPLATES, + "tables" => TABLES, + "treasure" => TREASURE, + "treasure-tables" => TREASURE_TABLES, + "books" => BOOKS, + _ => return None, + }) +} + +/// mdi-account-group +const CHARACTERS: &str = "F1 M8,3.67 C8.41,3.67 8.81,3.77 9.17,3.98 C9.52,4.18 9.82,4.48 10.02,4.83 \ + C10.23,5.19 10.33,5.59 10.33,6 C10.33,6.41 10.23,6.81 10.02,7.17 C9.82,7.52 \ + 9.52,7.82 9.17,8.02 C8.81,8.23 8.41,8.33 8,8.33 C7.59,8.33 7.19,8.23 6.83,8.02 \ + C6.48,7.82 6.18,7.52 5.98,7.17 C5.77,6.81 5.67,6.41 5.67,6 C5.67,5.59 5.77,5.19 \ + 5.98,4.83 C6.18,4.48 6.48,4.18 6.83,3.98 C7.19,3.77 7.59,3.67 8,3.67 M3.33,5.33 \ + C3.71,5.33 4.05,5.43 4.35,5.61 C4.25,6.57 4.53,7.51 5.11,8.25 C4.77,8.89 4.11,9.33 \ + 3.33,9.33 C2.98,9.33 2.64,9.24 2.33,9.07 C2.03,8.89 1.78,8.64 1.6,8.33 C1.43,8.03 \ + 1.33,7.68 1.33,7.33 C1.33,6.98 1.43,6.64 1.6,6.33 C1.78,6.03 2.03,5.78 2.33,5.6 \ + C2.64,5.43 2.98,5.33 3.33,5.33 M12.67,5.33 C13.02,5.33 13.36,5.43 13.67,5.6 \ + C13.97,5.78 14.22,6.03 14.4,6.33 C14.57,6.64 14.67,6.98 14.67,7.33 C14.67,7.68 \ + 14.57,8.03 14.4,8.33 C14.22,8.64 13.97,8.89 13.67,9.07 C13.36,9.24 13.02,9.33 \ + 12.67,9.33 C11.89,9.33 11.23,8.89 10.89,8.25 C11.47,7.51 11.75,6.57 11.65,5.61 \ + C11.95,5.43 12.29,5.33 12.67,5.33 M3.67,12.17 C3.67,10.79 5.61,9.67 8,9.67 \ + C10.39,9.67 12.33,10.79 12.33,12.17 L12.33,13.33 L3.67,13.33 L3.67,12.17 M0,13.33 \ + L0,12.33 C0,11.41 1.26,10.63 2.97,10.4 C2.57,10.85 2.33,11.48 2.33,12.17 L2.33,13.33 \ + L0,13.33 M16,13.33 L13.67,13.33 L13.67,12.17 C13.67,11.48 13.43,10.85 13.03,10.4 \ + C14.74,10.63 16,11.41 16,12.33 L16,13.33 Z"; + +/// mdi-human-male-female +const RACES: &str = "F1 M5,1.33 C5.23,1.33 5.46,1.39 5.67,1.51 C5.87,1.63 6.04,1.8 6.15,2 C6.27,2.2 \ + 6.33,2.43 6.33,2.67 C6.33,2.9 6.27,3.13 6.15,3.33 C6.04,3.54 5.87,3.7 5.67,3.82 \ + C5.46,3.94 5.23,4 5,4 C4.77,4 4.54,3.94 4.33,3.82 C4.13,3.7 3.96,3.54 3.85,3.33 \ + C3.73,3.13 3.67,2.9 3.67,2.67 C3.67,2.43 3.73,2.2 3.85,2 C3.96,1.8 4.13,1.63 \ + 4.33,1.51 C4.54,1.39 4.77,1.33 5,1.33 M4,4.67 L6,4.67 C6.23,4.67 6.46,4.73 6.67,4.85 \ + C6.87,4.96 7.04,5.13 7.15,5.33 C7.27,5.54 7.33,5.77 7.33,6 L7.33,9.67 L6.33,9.67 \ + L6.33,14.67 L3.67,14.67 L3.67,9.67 L2.67,9.67 L2.67,6 C2.67,5.77 2.73,5.54 2.85,5.33 \ + C2.96,5.13 3.13,4.96 3.33,4.85 C3.54,4.73 3.77,4.67 4,4.67 M11,1.33 C11.23,1.33 \ + 11.46,1.39 11.67,1.51 C11.87,1.63 12.04,1.8 12.15,2 C12.27,2.2 12.33,2.43 12.33,2.67 \ + C12.33,2.9 12.27,3.13 12.15,3.33 C12.04,3.54 11.87,3.7 11.67,3.82 C11.46,3.94 \ + 11.23,4 11,4 C10.77,4 10.54,3.94 10.33,3.82 C10.13,3.7 9.96,3.54 9.85,3.33 \ + C9.73,3.13 9.67,2.9 9.67,2.67 C9.67,2.43 9.73,2.2 9.85,2 C9.96,1.8 10.13,1.63 \ + 10.33,1.51 C10.54,1.39 10.77,1.33 11,1.33 M10,14.67 L10,10.67 L8,10.67 L9.73,5.61 \ + C9.89,5.06 10.4,4.67 11,4.67 C11.6,4.67 12.11,5.06 12.27,5.61 L14,10.67 L12,10.67 \ + L12,14.67 L10,14.67 Z"; + +/// mdi-chess-knight +const CLASSES: &str = "F1 M12.67,14.67 L3.33,14.67 L3.33,13.33 L12.67,13.33 L12.67,14.67 M8.67,1.33 \ + L8.67,1.33 C7.83,1.33 7.05,1.75 6.59,2.44 L4.67,5.33 L6,6.67 L7.37,5.75 C7.67,5.55 \ + 8.09,5.63 8.3,5.93 C8.31,5.95 8.33,5.97 8.33,6 L8.33,6 C8.53,6.39 8.46,6.87 \ + 8.15,7.18 L4.95,10.38 C4.58,10.75 4.58,11.35 4.95,11.72 C5.13,11.89 5.37,12 5.61,12 \ + L11.33,12 L11.33,4 C11.33,3.53 11.21,3.07 10.98,2.67 C10.74,2.26 10.41,1.92 10,1.69 \ + C9.59,1.46 9.13,1.33 8.67,1.33 Z"; + +/// mdi-card-account-details +const KITS: &str = "F1 M1.33,2 L14.67,2 C15.37,2 16,2.63 16,3.33 L16,12.67 C16,13.37 15.37,14 14.67,14 \ + L1.33,14 C0.63,14 0,13.37 0,12.67 L0,3.33 C0,2.63 0.63,2 1.33,2 M9.33,4 L9.33,4.67 \ + L14.67,4.67 L14.67,4 L9.33,4 M9.33,5.33 L9.33,6 L14.33,6 L14.67,6 L14.67,5.33 \ + L9.33,5.33 M9.33,6.67 L9.33,7.33 L14,7.33 L14,6.67 L9.33,6.67 M5.33,9.27 C4,9.27 \ + 1.33,10 1.33,11.33 L1.33,12 L9.33,12 L9.33,11.33 C9.33,10 6.67,9.27 5.33,9.27 \ + M5.33,4 C4.98,4 4.64,4.09 4.33,4.27 C4.03,4.44 3.78,4.7 3.6,5 C3.43,5.3 3.33,5.65 \ + 3.33,6 C3.33,6.35 3.43,6.7 3.6,7 C3.78,7.3 4.03,7.56 4.33,7.73 C4.64,7.91 4.98,8 \ + 5.33,8 C5.68,8 6.03,7.91 6.33,7.73 C6.64,7.56 6.89,7.3 7.07,7 C7.24,6.7 7.33,6.35 \ + 7.33,6 C7.33,5.65 7.24,5.3 7.07,5 C6.89,4.7 6.64,4.44 6.33,4.27 C6.03,4.09 5.68,4 \ + 5.33,4 Z"; + +/// mdi-sword +const WEAPONS: &str = "F1 M4.61,3.33 L3.33,3.33 L9.33,9.33 L10,8.71 M13.31,12.75 L12.75,13.31 C12.49,13.57 12.07,13.57 11.81,13.31 L9.73,11.23 L7.94,13 L7,12.06 L7.95,11.11 L2,5.17 L2,2 L5.17,2 L11.11,7.95 L12.06,7 L13,7.94 L11.22,9.72 L13.3,11.8 C13.57,12.07 13.57,12.49 13.31,12.75 Z"; + +/// mdi-shield +const ARMOR: &str = "F1 M8,0.67 L2,3.33 L2,7.33 C2,11.03 4.56,14.49 8,15.33 C11.44,14.49 14,11.03 14,7.33 \ + L14,3.33 L8,0.67 Z"; + +/// mdi-bag-personal +const EQUIPMENT: &str = "F1 M10.67,3.33 L10.67,2.67 C10.67,2.43 10.61,2.2 10.49,2 C10.37,1.8 10.2,1.63 \ + 10,1.51 C9.8,1.39 9.57,1.33 9.33,1.33 L6.67,1.33 C6.43,1.33 6.2,1.39 6,1.51 \ + C5.8,1.63 5.63,1.8 5.51,2 C5.39,2.2 5.33,2.43 5.33,2.67 L5.33,3.33 C4.87,3.33 \ + 4.41,3.46 4,3.69 C3.59,3.92 3.26,4.26 3.02,4.67 C2.79,5.07 2.67,5.53 2.67,6 \ + L2.67,13.33 C2.67,13.57 2.73,13.8 2.85,14 C2.96,14.2 3.13,14.37 3.33,14.49 \ + C3.54,14.61 3.77,14.67 4,14.67 L12,14.67 C12.23,14.67 12.46,14.61 12.67,14.49 \ + C12.87,14.37 13.04,14.2 13.15,14 C13.27,13.8 13.33,13.57 13.33,13.33 L13.33,6 \ + C13.33,5.53 13.21,5.07 12.98,4.67 C12.74,4.26 12.41,3.92 12,3.69 C11.59,3.46 \ + 11.13,3.33 10.67,3.33 M6.67,2.67 L9.33,2.67 L9.33,3.33 L6.67,3.33 L6.67,2.67 M8,6 \ + L9.33,7.33 L8,8.67 L6.67,7.33 L8,6 M12,10.67 L6,10.67 L6,12 L5.33,12 L5.33,10.67 \ + L4,10.67 L4,10 L12,10 L12,10.67 Z"; + +/// mdi-auto-fix +const MAGIC_ITEMS: &str = "F1 M5,3.73 L3.33,4.67 L4.27,3 L3.33,1.33 L5,2.27 L6.67,1.33 L5.73,3 L6.67,4.67 \ + L5,3.73 M13,10.27 L14.67,9.33 L13.73,11 L14.67,12.67 L13,11.73 L11.33,12.67 \ + L12.27,11 L11.33,9.33 L13,10.27 M14.67,1.33 L13.73,3 L14.67,4.67 L13,3.73 \ + L11.33,4.67 L12.27,3 L11.33,1.33 L13,2.27 L14.67,1.33 M8.89,8.52 L10.52,6.89 \ + L9.11,5.48 L7.48,7.11 L8.89,8.52 M9.58,4.86 L11.14,6.42 C11.4,6.67 11.4,7.1 \ + 11.14,7.36 L3.36,15.14 C3.1,15.4 2.67,15.4 2.42,15.14 L0.86,13.58 C0.6,13.33 \ + 0.6,12.9 0.86,12.64 L8.64,4.86 C8.9,4.6 9.33,4.6 9.58,4.86 Z"; + +/// mdi-hammer-wrench +const NONWEAPON: &str = "F1 M9.19,10.2 L13.19,14.2 L14.59,12.76 L10.59,8.76 L9.19,10.2 M11.67,6.73 \ + C11.41,6.73 11.13,6.7 10.91,6.61 L3.31,14.17 L1.91,12.76 L6.85,7.83 L5.67,6.64 \ + L5.19,7.11 L4.22,6.17 L4.22,8.07 L3.75,8.54 L1.41,6.17 L1.87,5.7 L3.75,5.7 \ + L2.81,4.76 L5.19,2.39 C5.97,1.61 7.22,1.61 8,2.39 L6.59,3.83 L7.53,4.76 L7.06,5.23 \ + L8.25,6.42 L9.47,5.17 C9.37,4.95 9.33,4.67 9.33,4.42 C9.33,3.11 10.37,2.07 \ + 11.67,2.07 C12.06,2.07 12.41,2.17 12.72,2.35 L10.94,4.13 L11.94,5.13 L13.72,3.35 \ + C13.91,3.67 14,4 14,4.42 C14,5.7 12.97,6.73 11.67,6.73 Z"; + +/// mdi-puzzle +const OTHER: &str = "F1 M13.67,7.33 L12.67,7.33 L12.67,4.67 C12.67,3.93 12.07,3.33 11.33,3.33 L8.67,3.33 \ + L8.67,2.33 C8.67,2.04 8.59,1.75 8.44,1.5 C8.3,1.25 8.09,1.04 7.83,0.89 C7.58,0.74 \ + 7.29,0.67 7,0.67 C6.71,0.67 6.42,0.74 6.17,0.89 C5.91,1.04 5.7,1.25 5.56,1.5 \ + C5.41,1.75 5.33,2.04 5.33,2.33 L5.33,3.33 L2.67,3.33 C2.43,3.33 2.2,3.39 2,3.51 \ + C1.8,3.63 1.63,3.8 1.51,4 C1.39,4.2 1.33,4.43 1.33,4.67 L1.33,7.2 L2.33,7.2 \ + C3.33,7.2 4.13,8 4.13,9 C4.13,10 3.33,10.8 2.33,10.8 L1.33,10.8 L1.33,13.33 \ + C1.33,13.57 1.39,13.8 1.51,14 C1.63,14.2 1.8,14.37 2,14.49 C2.2,14.61 2.43,14.67 \ + 2.67,14.67 L5.2,14.67 L5.2,13.67 C5.2,12.67 6,11.87 7,11.87 C8,11.87 8.8,12.67 \ + 8.8,13.67 L8.8,14.67 L11.33,14.67 C11.57,14.67 11.8,14.61 12,14.49 C12.2,14.37 \ + 12.37,14.2 12.49,14 C12.61,13.8 12.67,13.57 12.67,13.33 L12.67,10.67 L13.67,10.67 \ + C13.96,10.67 14.25,10.59 14.5,10.44 C14.75,10.3 14.96,10.09 15.11,9.83 C15.26,9.58 \ + 15.33,9.29 15.33,9 C15.33,8.71 15.26,8.42 15.11,8.17 C14.96,7.91 14.75,7.7 14.5,7.56 \ + C14.25,7.41 13.96,7.33 13.67,7.33 Z"; + +/// mdi-wizard-hat +const WIZARD_SPELLS: &str = "F1 M14,14.67 L2,14.67 L2,13.33 L14,13.33 L14,14.67 M12.67,12.67 L3.33,12.67 \ + L7.4,1.73 C7.53,1.47 7.73,1.33 8,1.33 L12,3.33 L9.27,3.33 L12.67,12.67 M6.67,5 \ + L7.36,5.31 L7.67,6 L7.98,5.31 L8.67,5 L7.98,4.69 L7.67,4 L7.36,4.69 L6.67,5 M8.67,10 \ + L7.29,9.38 L6.67,8 L6.05,9.38 L4.67,10 L6.05,10.62 L6.67,12 L7.29,10.62 L8.67,10 \ + M9.31,7.98 L10,7.67 L9.31,7.35 L9,6.67 L8.69,7.35 L8,7.67 L8.69,7.98 L9,8.67 \ + L9.31,7.98 M10.65,10.65 L11.33,10.33 L10.65,10.02 L10.33,9.33 L10.03,10.02 \ + L9.33,10.33 L10.03,10.65 L10.33,11.33 L10.65,10.65 Z"; + +/// mdi-hands-pray +const PRIEST_SPELLS: &str = "F1 M7.62,6.45 C7.65,6.52 7.67,6.59 7.67,6.67 L7.67,10.15 C7.67,10.48 7.54,10.8 \ + 7.31,11.05 L5.45,13.08 L3.19,10.81 L4,10 L5.87,1.91 C5.95,1.57 6.25,1.33 6.59,1.33 \ + C7,1.33 7.33,1.67 7.33,2.07 L7.33,5.38 C7.23,5.35 7.11,5.33 7,5.33 C6.27,5.33 \ + 5.67,5.93 5.67,6.67 L5.67,8.67 C5.67,8.85 5.81,9 6,9 C6.19,9 6.33,8.85 6.33,8.67 \ + L6.33,6.67 C6.33,6.3 6.63,6 7,6 C7.13,6 7.23,6.05 7.33,6.11 C7.41,6.15 7.47,6.21 \ + 7.53,6.28 C7.55,6.31 7.57,6.33 7.59,6.37 C7.6,6.39 7.61,6.42 7.62,6.45 M1.33,12.67 \ + L4,14.67 L4.78,13.82 L2.48,11.52 L1.33,12.67 M12,10 L10.13,1.91 C10.05,1.57 \ + 9.75,1.33 9.41,1.33 C9,1.33 8.67,1.67 8.67,2.07 L8.67,5.38 C8.77,5.35 8.89,5.33 \ + 9,5.33 C9.73,5.33 10.33,5.93 10.33,6.67 L10.33,8.67 C10.33,8.85 10.19,9 10,9 C9.81,9 \ + 9.67,8.85 9.67,8.67 L9.67,6.67 C9.67,6.3 9.37,6 9,6 C8.87,6 8.77,6.05 8.67,6.11 \ + C8.59,6.15 8.53,6.21 8.47,6.28 C8.45,6.31 8.43,6.33 8.41,6.37 C8.4,6.39 8.39,6.42 \ + 8.38,6.45 C8.35,6.52 8.33,6.59 8.33,6.67 L8.33,10.15 C8.33,10.48 8.46,10.8 \ + 8.69,11.05 L10.55,13.08 L12.81,10.81 L12,10 M13.52,11.52 L11.22,13.82 L12,14.67 \ + L14.67,12.67 L13.52,11.52 Z"; + +/// mdi-brain +const PSIONICS: &str = "F1 M14.22,8.61 C14.28,9.64 13.81,10.63 12.96,11.24 L13.47,12.23 C13.63,12.53 \ + 13.65,12.89 13.51,13.2 C13.39,13.51 13.13,13.76 12.81,13.87 L12.28,14.03 \ + C12.17,14.07 12.04,14.09 11.92,14.09 C11.58,14.09 11.26,13.94 11.04,13.67 L9.63,12 \ + C9.03,11.9 8.47,11.65 8,11.27 C7.67,11.37 7.33,11.42 7,11.42 C6.41,11.42 5.83,11.24 \ + 5.33,10.89 C4.98,11 4.62,11.05 4.25,11.04 C3.73,11.05 3.21,10.94 2.72,10.74 \ + C1.77,10.31 1.13,9.38 1.1,8.33 C1.05,7.85 1.13,7.37 1.33,6.93 C1.14,6.43 1.12,5.88 \ + 1.29,5.37 C1.53,4.74 2,4.21 2.58,3.88 C2.97,2.75 4.05,2 5.25,2.08 C6.31,1.08 \ + 7.95,0.97 9.13,1.83 C9.41,1.76 9.71,1.72 10,1.72 C10.91,1.7 11.77,2.1 12.33,2.81 \ + C13.69,3.17 14.67,4.38 14.72,5.79 C14.75,6.53 14.55,7.26 14.15,7.88 C14.19,8.12 \ + 14.22,8.36 14.22,8.61 M10.89,7.67 C11.27,7.71 11.57,8 11.57,8.38 C11.57,8.5 \ + 11.54,8.61 11.48,8.71 C11.42,8.81 11.33,8.9 11.23,8.96 C11.13,9.02 11.02,9.05 \ + 10.9,9.05 L10.48,9.05 C10.27,9.65 9.89,10.17 9.4,10.57 C9.57,10.63 9.74,10.67 \ + 9.91,10.71 C13.33,10.67 12.93,8.58 12.93,8.55 C12.89,7.59 12.09,6.85 11.14,6.89 \ + C11.02,6.89 10.91,6.86 10.81,6.8 C10.71,6.74 10.62,6.65 10.56,6.55 C10.5,6.45 \ + 10.47,6.34 10.47,6.22 C10.47,6.1 10.5,5.99 10.56,5.89 C10.62,5.79 10.71,5.7 \ + 10.81,5.64 C10.91,5.58 11.02,5.55 11.14,5.55 C11.96,5.57 12.75,5.88 13.36,6.42 \ + C13.39,6.23 13.41,6.03 13.41,5.83 C13.37,5 13,4.28 11.5,4.14 C10.67,2.17 8.57,3.26 \ + 8.57,3.87 L8.57,3.87 C8.55,4.03 8.71,4.35 8.73,4.37 C8.85,4.37 8.97,4.4 9.07,4.46 \ + C9.17,4.52 9.25,4.61 9.31,4.71 C9.37,4.81 9.4,4.92 9.4,5.04 C9.4,5.41 9.1,5.71 \ + 8.73,5.71 L8.73,5.71 C8.38,5.69 8.05,5.56 7.78,5.33 C7.46,5.54 7.09,5.67 6.71,5.71 \ + L6.71,5.71 C6.33,5.74 6.02,5.47 6,5.11 C5.95,4.73 6.22,4.41 6.59,4.37 C6.69,4.36 \ + 7.21,4.28 7.21,3.86 L7.21,3.86 C7.21,3.42 7.38,3 7.67,2.67 C7.05,2.5 6.39,2.72 \ + 5.73,3.53 C4.5,3.33 4,3.5 3.63,4.8 C3,5.11 2.67,5.33 2.52,6 C3.24,5.85 3.98,5.91 \ + 4.67,6.17 C5,6.29 5.19,6.67 5.06,7.03 C4.93,7.37 4.55,7.55 4.2,7.42 C3.71,7.21 \ + 3.17,7.19 2.67,7.38 C2.45,7.56 2.45,7.93 2.45,8.23 C2.45,8.72 2.7,9.18 3.12,9.45 \ + C3.47,9.63 3.87,9.72 4.26,9.71 C4.16,9.54 4.07,9.36 4,9.17 C3.87,8.81 4.07,8.42 \ + 4.43,8.29 C4.79,8.17 5.18,8.36 5.31,8.72 C5.57,9.48 6.25,10 7.05,10.09 C7.97,10.04 \ + 8.78,9.5 9.18,8.67 C9.33,7.75 10.07,7.67 10.89,7.67 M12.22,12.65 L11.81,11.78 \ + L11.33,11.89 L12,12.72 L12.22,12.65 M9.12,6.91 C9.13,6.55 8.87,6.25 8.51,6.22 \ + C8.04,6.19 7.58,6.35 7.23,6.67 C6.85,7.05 6.65,7.59 6.67,8.13 C6.67,8.24 6.7,8.36 \ + 6.76,8.46 C6.81,8.56 6.9,8.65 7,8.7 C7.1,8.76 7.22,8.79 7.33,8.79 C7.71,8.79 8,8.49 \ + 8,8.13 C8,7.95 8.05,7.77 8.15,7.62 C8.23,7.55 8.33,7.52 8.44,7.52 C8.81,7.54 \ + 9.12,7.27 9.12,6.91 Z"; + +/// mdi-spider +const MONSTERS: &str = "F1 M14.19,11.14 L15.14,10.19 L13,8.07 L11,7.51 L12.27,7.33 L15.07,5.2 L14.27,4.13 \ + L11.73,6.03 L9.94,6.33 L12.07,4.21 L11.33,1.17 L10,1.49 L10.57,3.79 L9.84,4.55 \ + C9.72,4.27 9.53,4.01 9.29,3.81 C9.05,3.61 8.77,3.46 8.46,3.39 C8.16,3.32 7.84,3.32 \ + 7.54,3.39 C7.23,3.46 6.95,3.61 6.71,3.81 C6.47,4.01 6.28,4.27 6.16,4.55 L5.41,3.79 \ + L6,1.49 L4.67,1.17 L3.93,4.21 L6.06,6.33 L4.27,6.03 L1.73,4.13 L0.93,5.2 L3.73,7.33 \ + L4.97,7.54 L2.97,8.11 L0.86,10.19 L1.81,11.14 L3.67,9.26 L5.25,8.81 L2.67,11.03 \ + L2.67,14.67 L4,14.67 L4,11.64 L5.04,10.75 C5.12,11.21 5.3,11.65 5.58,12.03 \ + C5.86,12.41 6.22,12.72 6.64,12.93 C7.06,13.15 7.53,13.26 8,13.26 C8.47,13.26 \ + 8.94,13.15 9.36,12.93 C9.78,12.72 10.14,12.41 10.42,12.03 C10.7,11.65 10.88,11.21 \ + 10.96,10.75 L12,11.64 L12,14.67 L13.33,14.67 L13.33,11.03 L10.75,8.81 L12.33,9.26 Z"; + +/// mdi-paw +const MONSTER_TYPES: &str = "F1 M5.57,2 C6.35,1.89 7.19,2.75 7.43,3.93 C7.67,5.11 7.23,6.17 6.45,6.29 C5.67,6.41 \ + 4.83,5.55 4.58,4.36 C4.33,3.18 4.78,2.13 5.57,2 M10.33,2 C11.13,2.13 11.57,3.18 \ + 11.33,4.36 C11.08,5.55 10.25,6.41 9.46,6.29 C8.67,6.17 8.23,5.11 8.48,3.93 \ + C8.72,2.75 9.55,1.89 10.33,2 M2,5.07 C2.76,4.74 3.79,5.33 4.33,6.37 C4.84,7.42 \ + 4.67,8.53 3.91,8.85 C3.16,9.18 2.13,8.59 1.61,7.55 C1.08,6.5 1.27,5.39 2,5.07 \ + M14,5.07 C14.73,5.39 14.92,6.5 14.39,7.55 C13.87,8.59 12.84,9.18 12.09,8.85 \ + C11.33,8.53 11.16,7.42 11.67,6.37 C12.21,5.33 13.24,4.74 14,5.07 M12.89,12.25 \ + C12.91,12.88 12.43,13.57 11.86,13.83 C10.67,14.38 9.25,13.25 7.93,13.25 C6.6,13.25 \ + 5.17,14.43 4,13.83 C3.33,13.51 2.87,12.64 2.96,11.92 C3.08,10.93 4.27,10.39 \ + 4.98,9.67 C5.92,8.73 6.59,6.96 7.93,6.96 C9.26,6.96 9.97,8.7 10.87,9.67 C11.61,10.48 \ + 12.84,11.17 12.89,12.25 Z"; + +/// mdi-skull-crossbones +const TRAPS: &str = "F1 M10.53,12.33 L14.53,13.4 L14.27,14.67 L8,13 L1.73,14.67 L1.4,13.4 L5.4,12.33 \ + L1.33,11.27 L1.67,10 L7.93,11.67 L14.2,10 L14.53,11.27 L10.53,12.33 M12,5.33 \ + C12,6.53 11.47,7.53 10.67,8.27 L10.67,10 L9.33,10 L9.33,9.13 L9.33,8.67 L8.67,8.67 \ + L8.67,10 L7.33,10 L7.33,8.67 L6.67,8.67 L6.67,9.13 L6.67,10 L5.33,10 L5.33,8.27 \ + C4.53,7.53 4,6.53 4,5.33 C4,4.63 4.18,3.94 4.54,3.33 C4.89,2.73 5.39,2.22 6,1.87 \ + C6.61,1.52 7.3,1.33 8,1.33 C8.7,1.33 9.39,1.52 10,1.87 C10.61,2.22 11.11,2.73 \ + 11.46,3.33 C11.82,3.94 12,4.63 12,5.33 M7.33,5 C7.33,4.47 6.87,4 6.33,4 C5.8,4 \ + 5.33,4.47 5.33,5 C5.33,5.53 5.8,6 6.33,6 C6.87,6 7.33,5.53 7.33,5 M8.67,7.33 L8,6 \ + L7.33,7.33 L8.67,7.33 M10.67,5 C10.67,4.47 10.2,4 9.67,4 C9.13,4 8.67,4.47 8.67,5 \ + C8.67,5.53 9.13,6 9.67,6 C10.2,6 10.67,5.53 10.67,5 Z"; + +/// mdi-sword-cross +const ENCOUNTERS: &str = "F1 M4.13,1.63 L12.07,9.56 L13.48,8.15 L14.42,9.09 L12.77,10.73 L14.89,12.85 \ + C15.15,13.11 15.15,13.53 14.89,13.79 L14.42,14.27 C14.16,14.53 13.74,14.53 \ + 13.48,14.27 L11.33,12.15 L9.71,13.8 L8.77,12.86 L10.18,11.45 L2.25,3.51 L2.25,1.63 \ + L4.13,1.63 M10.59,6.67 L13.75,3.51 L13.75,1.63 L11.87,1.63 L8.71,4.79 L10.59,6.67 \ + M7.29,10 L5.41,8.09 L3.93,9.56 L2.52,8.15 L1.58,9.09 L3.23,10.73 L1.11,12.86 \ + C0.85,13.12 0.85,13.54 1.11,13.8 L1.58,14.27 C1.84,14.53 2.26,14.53 2.52,14.27 \ + L4.67,12.15 L6.29,13.8 L7.23,12.86 L5.82,11.45 L7.29,10 Z"; + +/// mdi-file-document-multiple +const TEMPLATES: &str = "F1 M2.67,2.67 L2.67,14.67 L13.33,14.67 L13.33,16 L2.67,16 C1.93,16 1.33,15.4 \ + 1.33,14.67 L1.33,2.67 L2.67,2.67 M10,4.67 L13.67,4.67 L10,1 L10,4.67 M5.33,0 \ + L10.67,0 L14.67,4 L14.67,12 C14.67,12.74 14.07,13.33 13.33,13.33 L5.33,13.33 \ + C4.59,13.33 4,12.73 4,12 L4,1.33 C4,0.59 4.59,0 5.33,0 M11.33,10.67 L11.33,9.33 \ + L5.33,9.33 L5.33,10.67 L11.33,10.67 M13.33,8 L13.33,6.67 L5.33,6.67 L5.33,8 L13.33,8 \ + Z"; + +/// mdi-dice-d20 +const TABLES: &str = "F1 M13.65,4.41 L8.38,1.45 C8.27,1.37 8.14,1.33 8,1.33 C7.86,1.33 7.73,1.37 7.62,1.45 \ + L2.35,4.41 C2.14,4.53 2,4.75 2,5 L2,11 C2,11.25 2.14,11.47 2.35,11.59 L7.62,14.55 \ + C7.73,14.63 7.86,14.67 8,14.67 C8.14,14.67 8.27,14.63 8.38,14.55 L13.65,11.59 \ + C13.86,11.47 14,11.25 14,11 L14,5 C14,4.75 13.86,4.53 13.65,4.41 M7.63,10.64 \ + L4.21,10.62 L4.21,9.94 C4.21,9.94 6.49,7.72 6.5,7.05 C6.5,6.22 5.82,6.31 5.82,6.31 \ + C5.82,6.31 5.17,6.33 5.09,7.14 L4.09,7.17 C4.09,7.17 4.12,5.51 5.89,5.51 C7.47,5.51 \ + 7.49,6.69 7.49,7 C7.49,8.12 5.43,9.85 5.43,9.85 L7.63,9.84 L7.63,10.64 M11.67,9 \ + C11.67,9.93 10.9,10.7 9.95,10.7 C9,10.7 8.24,9.93 8.24,9 L8.24,7.23 C8.24,6.28 \ + 9,5.51 9.95,5.51 C10.91,5.51 11.67,6.28 11.67,7.23 L11.67,9 M10.67,7.18 L10.67,9.02 \ + C10.67,9.41 10.33,9.73 9.95,9.73 C9.56,9.73 9.24,9.41 9.24,9.02 L9.24,7.18 \ + C9.24,6.79 9.56,6.47 9.95,6.47 C10.33,6.47 10.67,6.79 10.67,7.18 Z"; + +/// mdi-treasure-chest +const TREASURE: &str = "F1 M3.33,2.67 L12.67,2.67 C13.02,2.67 13.36,2.76 13.67,2.93 C13.97,3.11 14.22,3.36 \ + 14.4,3.67 C14.57,3.97 14.67,4.32 14.67,4.67 L14.67,7.33 L10,7.33 L10,6.67 L6,6.67 \ + L6,7.33 L1.33,7.33 L1.33,4.67 C1.33,4.32 1.43,3.97 1.6,3.67 C1.78,3.36 2.03,3.11 \ + 2.33,2.93 C2.64,2.76 2.98,2.67 3.33,2.67 M7.33,7.33 L8.67,7.33 L8.67,8.67 L7.33,8.67 \ + L7.33,7.33 M1.33,8 L6,8 L6,8.67 L7.33,10 L8.67,10 L10,8.67 L10,8 L14.67,8 \ + L14.67,13.33 L1.33,13.33 L1.33,8 Z"; + +/// mdi-dice-multiple +const TREASURE_TABLES: &str = "F1 M13.19,2 L7.48,2 C7.03,2 6.67,2.37 6.67,2.81 L6.67,5.33 L10.67,5.33 L10.67,9.33 \ + L13.19,9.33 C13.63,9.33 14,8.97 14,8.52 L14,2.81 C14,2.37 13.63,2 13.19,2 M8.29,4.45 \ + C7.84,4.45 7.47,4.08 7.47,3.63 C7.47,3.17 7.84,2.81 8.29,2.81 C8.4,2.81 8.51,2.83 \ + 8.61,2.87 C8.71,2.91 8.8,2.97 8.87,3.05 C8.95,3.12 9.01,3.21 9.05,3.31 C9.09,3.41 \ + 9.11,3.52 9.11,3.63 C9.11,4.08 8.75,4.45 8.29,4.45 M12.37,8.52 C11.92,8.53 \ + 11.55,8.16 11.55,7.71 C11.54,7.25 11.91,6.89 12.36,6.88 C12.81,6.87 13.18,7.24 \ + 13.19,7.71 C13.18,8.15 12.82,8.51 12.37,8.52 M12.37,4.45 C11.92,4.45 11.55,4.09 \ + 11.55,3.63 C11.54,3.18 11.91,2.81 12.36,2.81 C12.81,2.8 13.18,3.17 13.19,3.63 \ + C13.19,4.08 12.83,4.44 12.37,4.45 M2.81,6.67 L8.52,6.67 C8.63,6.67 8.73,6.69 \ + 8.83,6.73 C8.93,6.77 9.02,6.83 9.1,6.9 C9.17,6.98 9.23,7.07 9.27,7.17 C9.31,7.27 \ + 9.33,7.37 9.33,7.48 L9.33,13.19 C9.33,13.63 8.97,14 8.52,14 L2.81,14 C2.37,14 \ + 2,13.63 2,13.19 L2,7.48 C2,7.03 2.37,6.67 2.81,6.67 M5.67,9.52 C5.22,9.52 4.85,9.89 \ + 4.85,10.33 C4.85,10.78 5.22,11.15 5.67,11.15 C6.11,11.15 6.48,10.78 6.48,10.33 \ + C6.48,10.23 6.46,10.12 6.42,10.02 C6.38,9.92 6.32,9.83 6.24,9.76 C6.17,9.68 \ + 6.08,9.62 5.98,9.58 C5.88,9.54 5.77,9.52 5.67,9.52 M3.63,7.48 C3.18,7.48 2.81,7.85 \ + 2.81,8.29 C2.81,8.4 2.83,8.51 2.88,8.6 C2.92,8.7 2.98,8.79 3.05,8.87 C3.13,8.94 \ + 3.22,9 3.32,9.04 C3.41,9.09 3.52,9.11 3.63,9.11 C4.07,9.11 4.44,8.74 4.44,8.29 \ + L4.44,8.29 C4.44,7.85 4.07,7.48 3.63,7.48 M7.7,11.55 C7.25,11.55 6.89,11.92 \ + 6.89,12.37 C6.89,12.81 7.25,13.18 7.7,13.18 C7.84,13.18 7.98,13.14 8.11,13.07 \ + C8.23,13 8.33,12.9 8.4,12.77 C8.48,12.65 8.51,12.51 8.51,12.37 L8.51,12.37 \ + C8.51,11.92 8.15,11.56 7.71,11.55 L7.7,11.55 Z"; + +/// mdi-book-open-variant +const BOOKS: &str = "F1 M8,14.33 C7.1,13.77 5.47,13.33 4.33,13.33 C3.23,13.33 2.1,13.53 1.17,14.03 \ + C1.1,14.07 1.07,14.07 1,14.07 C0.83,14.07 0.67,13.9 0.67,13.73 L0.67,4 C1.07,3.7 \ + 1.5,3.5 2,3.33 C2.74,3.1 3.55,3 4.33,3 C5.63,3 7.03,3.27 8,4 C8.97,3.27 10.37,3 \ + 11.67,3 C12.45,3 13.26,3.1 14,3.33 C14.5,3.5 14.93,3.7 15.33,4 L15.33,13.73 \ + C15.33,13.9 15.17,14.07 15,14.07 C14.93,14.07 14.9,14.07 14.83,14.03 C13.9,13.53 \ + 12.77,13.33 11.67,13.33 C10.53,13.33 8.9,13.77 8,14.33 M8,5.33 L8,13 C8.9,12.43 \ + 10.53,12 11.67,12 C12.47,12 13.27,12.1 14,12.33 L14,4.67 C13.27,4.43 12.47,4.33 \ + 11.67,4.33 C10.53,4.33 8.9,4.77 8,5.33 M8.67,7.67 C9.41,7.21 10.4,7 11.67,7 C12.27,7 \ + 12.84,7.06 13.33,7.19 L13.33,6.15 C12.75,6.05 12.19,6 11.67,6 C10.49,6 9.49,6.19 \ + 8.67,6.56 L8.67,7.67 M11.67,7.78 C10.53,7.78 9.53,7.95 8.67,8.31 L8.67,9.43 C9.41,9 \ + 10.4,8.77 11.67,8.77 C12.36,8.77 12.92,8.83 13.33,8.93 L13.33,7.93 C12.75,7.83 \ + 12.19,7.78 11.67,7.78 M13.33,9.71 C12.75,9.61 12.19,9.55 11.67,9.55 C10.45,9.55 \ + 9.45,9.73 8.67,10.09 L8.67,11.21 C9.41,10.77 10.4,10.55 11.67,10.55 C12.36,10.55 \ + 12.92,10.61 13.33,10.71 L13.33,9.71 Z"; diff --git a/crates/cr-win/src/app/settings.rs b/crates/cr-win/src/app/settings.rs index 1adcab2..f98ea3f 100644 --- a/crates/cr-win/src/app/settings.rs +++ b/crates/cr-win/src/app/settings.rs @@ -163,6 +163,8 @@ fn credits(shell: &Shell, context: &mut ViewContext) -> View { /// About box and license. /// The license of Microsoft.Web.WebView2.Core.dll, which the app ships. const WEBVIEW2_LICENSE: &str = include_str!("../../package/WebView2-LICENSE.txt"); +/// The license of the Material Design Icons the navigation draws. +const ICONS_LICENSE: &str = include_str!("../../package/MaterialDesignIcons-LICENSE.txt"); fn legal(shell: &Shell, context: &mut ViewContext) -> View { let mut rows = vec![KeyedView::new( @@ -197,6 +199,15 @@ fn legal(shell: &Shell, context: &mut ViewContext) -> View { .into(), ), )); + rows.push(KeyedView::new( + "icons", + credit( + "Material Design Icons", + ui::body(ICONS_LICENSE.trim_end()) + .is_text_selection_enabled(true) + .into(), + ), + )); expander( (shell, context, Section::Legal), tr("Legal"),