Add feature filtering outline items (#1102)

This commit is contained in:
1024jp 2022-02-03 14:45:17 +09:00
parent 9479c5d559
commit c42b3d5945
8 changed files with 302 additions and 38 deletions

View File

@ -439,6 +439,8 @@
2AA4D3751D1AA0AC001D261D /* KeyBindingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA4D3731D1AA0AC001D261D /* KeyBindingsViewController.swift */; };
2AA4F6A020A1C190003FD515 /* NSTextView+RoundedBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA4F69F20A1C190003FD515 /* NSTextView+RoundedBackground.swift */; };
2AA4F6A120A1C190003FD515 /* NSTextView+RoundedBackground.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA4F69F20A1C190003FD515 /* NSTextView+RoundedBackground.swift */; };
2AA5BCF724FFACD000618F83 /* NSFontManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA5BCF624FFACD000618F83 /* NSFontManager.swift */; };
2AA5BCF824FFACD000618F83 /* NSFontManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA5BCF624FFACD000618F83 /* NSFontManager.swift */; };
2AA5BCFA24FFB21C00618F83 /* String+Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA5BCF924FFB21C00618F83 /* String+Match.swift */; };
2AA5BCFB24FFB21C00618F83 /* String+Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA5BCF924FFB21C00618F83 /* String+Match.swift */; };
2AA749C31D3C263300850802 /* DocumentWindowController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AA749C21D3C263300850802 /* DocumentWindowController.swift */; };
@ -1183,6 +1185,7 @@
2AA45A531D2F22C600A1A401 /* NSFont+Size.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSFont+Size.swift"; sourceTree = "<group>"; };
2AA4D3731D1AA0AC001D261D /* KeyBindingsViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = KeyBindingsViewController.swift; sourceTree = "<group>"; };
2AA4F69F20A1C190003FD515 /* NSTextView+RoundedBackground.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "NSTextView+RoundedBackground.swift"; sourceTree = "<group>"; };
2AA5BCF624FFACD000618F83 /* NSFontManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NSFontManager.swift; sourceTree = "<group>"; };
2AA5BCF924FFB21C00618F83 /* String+Match.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "String+Match.swift"; sourceTree = "<group>"; };
2AA749C21D3C263300850802 /* DocumentWindowController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DocumentWindowController.swift; sourceTree = "<group>"; };
2AA761341D45634400031AAF /* String+Counting.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Counting.swift"; sourceTree = "<group>"; };
@ -1828,6 +1831,7 @@
2ACA0C9C21A2A47500723073 /* NSStoryboard+Instantiation.swift */,
2AA45A531D2F22C600A1A401 /* NSFont+Size.swift */,
2A5D2DC221908F4A006814D5 /* NSFont+Name.swift */,
2AA5BCF624FFACD000618F83 /* NSFontManager.swift */,
2A5ADE871D216D4900F6CE26 /* NSColor+NamedColors.swift */,
2A71BC7D1DDC70A80085AE1C /* NSImage.swift */,
2A4E637F20ADC45F0033CE63 /* NSBezierPath.swift */,
@ -2951,6 +2955,7 @@
2AC186DB1E2F414D002F4D27 /* NSDocument+ErrorHandling.swift in Sources */,
2A5D2DC421908F4A006814D5 /* NSFont+Name.swift in Sources */,
2AA45A551D2F22C600A1A401 /* NSFont+Size.swift in Sources */,
2AA5BCF724FFACD000618F83 /* NSFontManager.swift in Sources */,
2A71BC7F1DDC70A80085AE1C /* NSImage.swift in Sources */,
2AE73F41203D2FBB00D8903B /* NSLayoutManager.swift in Sources */,
2A9AC937244849B700D05643 /* NSLayoutManager+InvisibleDrawing.swift in Sources */,
@ -3259,6 +3264,7 @@
2AC186DA1E2F414D002F4D27 /* NSDocument+ErrorHandling.swift in Sources */,
2A5D2DC321908F4A006814D5 /* NSFont+Name.swift in Sources */,
2AA45A541D2F22C600A1A401 /* NSFont+Size.swift in Sources */,
2AA5BCF824FFACD000618F83 /* NSFontManager.swift in Sources */,
2A71BC7E1DDC70A80085AE1C /* NSImage.swift in Sources */,
2AE73F40203D2FBB00D8903B /* NSLayoutManager.swift in Sources */,
2A9AC938244849B700D05643 /* NSLayoutManager+InvisibleDrawing.swift in Sources */,

View File

@ -0,0 +1,13 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"symbols" : [
{
"filename" : "filter.chevron.svg",
"idiom" : "universal",
"language-direction" : "left-to-right"
}
]
}

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--Generator: Apple Native CoreSVG 149-->
<!DOCTYPE svg
PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="3300" height="2200">
<!--glyph: "uni100308.medium", point size: 100.0, font version: "17.0d9e1", template writer version: "59"-->
<g id="Notes">
<rect height="2200" id="artboard" style="fill:white;opacity:1" width="3300" x="0" y="0"/>
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="292" y2="292"/>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 322)">Weight/Scale Variations</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 559.711 322)">Ultralight</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 856.422 322)">Thin</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1153.13 322)">Light</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1449.84 322)">Regular</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 1746.56 322)">Medium</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2043.27 322)">Semibold</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2339.98 322)">Bold</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2636.69 322)">Heavy</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:middle;" transform="matrix(1 0 0 1 2933.4 322)">Black</text>
<line style="fill:none;stroke:black;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1903" y2="1903"/>
<g transform="matrix(1 0 0 1 263 1933)">
<path d="M9.24805 0.830078Q10.8691 0.830078 12.2949 0.214844Q13.7207-0.400391 14.8096-1.49414Q15.8984-2.58789 16.5186-4.01367Q17.1387-5.43945 17.1387-7.05078Q17.1387-8.66211 16.5186-10.0879Q15.8984-11.5137 14.8047-12.6074Q13.7109-13.7012 12.2852-14.3164Q10.8594-14.9316 9.23828-14.9316Q7.62695-14.9316 6.20117-14.3164Q4.77539-13.7012 3.69141-12.6074Q2.60742-11.5137 1.9873-10.0879Q1.36719-8.66211 1.36719-7.05078Q1.36719-5.43945 1.9873-4.01367Q2.60742-2.58789 3.69629-1.49414Q4.78516-0.400391 6.21094 0.214844Q7.63672 0.830078 9.24805 0.830078ZM9.24805-0.654297Q7.91992-0.654297 6.7627-1.14746Q5.60547-1.64062 4.73145-2.51953Q3.85742-3.39844 3.36426-4.56055Q2.87109-5.72266 2.87109-7.05078Q2.87109-8.37891 3.35938-9.54102Q3.84766-10.7031 4.72168-11.582Q5.5957-12.4609 6.75293-12.9541Q7.91016-13.4473 9.23828-13.4473Q10.5762-13.4473 11.7334-12.9541Q12.8906-12.4609 13.7695-11.582Q14.6484-10.7031 15.1465-9.54102Q15.6445-8.37891 15.6445-7.05078Q15.6445-5.72266 15.1514-4.56055Q14.6582-3.39844 13.7842-2.51953Q12.9102-1.64062 11.748-1.14746Q10.5859-0.654297 9.24805-0.654297ZM5.83984-7.04102Q5.83984-6.71875 6.04492-6.51855Q6.25-6.31836 6.5918-6.31836L8.50586-6.31836L8.50586-4.39453Q8.50586-4.0625 8.70605-3.85742Q8.90625-3.65234 9.22852-3.65234Q9.56055-3.65234 9.76562-3.85742Q9.9707-4.0625 9.9707-4.39453L9.9707-6.31836L11.8945-6.31836Q12.2266-6.31836 12.4316-6.51855Q12.6367-6.71875 12.6367-7.04102Q12.6367-7.37305 12.4316-7.57812Q12.2266-7.7832 11.8945-7.7832L9.9707-7.7832L9.9707-9.69727Q9.9707-10.0391 9.76562-10.2441Q9.56055-10.4492 9.22852-10.4492Q8.90625-10.4492 8.70605-10.2441Q8.50586-10.0391 8.50586-9.69727L8.50586-7.7832L6.5918-7.7832Q6.25-7.7832 6.04492-7.57812Q5.83984-7.37305 5.83984-7.04102Z"/>
</g>
<g transform="matrix(1 0 0 1 281.867 1933)">
<path d="M11.709 2.91016Q13.75 2.91016 15.5518 2.12891Q17.3535 1.34766 18.7305-0.0292969Q20.1074-1.40625 20.8887-3.20801Q21.6699-5.00977 21.6699-7.05078Q21.6699-9.0918 20.8887-10.8936Q20.1074-12.6953 18.7305-14.0723Q17.3535-15.4492 15.5469-16.2305Q13.7402-17.0117 11.6992-17.0117Q9.6582-17.0117 7.85645-16.2305Q6.05469-15.4492 4.68262-14.0723Q3.31055-12.6953 2.5293-10.8936Q1.74805-9.0918 1.74805-7.05078Q1.74805-5.00977 2.5293-3.20801Q3.31055-1.40625 4.6875-0.0292969Q6.06445 1.34766 7.86621 2.12891Q9.66797 2.91016 11.709 2.91016ZM11.709 1.25Q9.98047 1.25 8.47656 0.605469Q6.97266-0.0390625 5.83496-1.17676Q4.69727-2.31445 4.05762-3.81836Q3.41797-5.32227 3.41797-7.05078Q3.41797-8.7793 4.05762-10.2832Q4.69727-11.7871 5.83008-12.9297Q6.96289-14.0723 8.4668-14.7119Q9.9707-15.3516 11.6992-15.3516Q13.4277-15.3516 14.9316-14.7119Q16.4355-14.0723 17.5781-12.9297Q18.7207-11.7871 19.3652-10.2832Q20.0098-8.7793 20.0098-7.05078Q20.0098-5.32227 19.3701-3.81836Q18.7305-2.31445 17.5928-1.17676Q16.4551-0.0390625 14.9463 0.605469Q13.4375 1.25 11.709 1.25ZM7.39258-7.04102Q7.39258-6.68945 7.62695-6.46484Q7.86133-6.24023 8.23242-6.24023L10.8789-6.24023L10.8789-3.57422Q10.8789-3.21289 11.1035-2.9834Q11.3281-2.75391 11.6797-2.75391Q12.0508-2.75391 12.2852-2.9834Q12.5195-3.21289 12.5195-3.57422L12.5195-6.24023L15.1758-6.24023Q15.5371-6.24023 15.7715-6.46484Q16.0059-6.68945 16.0059-7.04102Q16.0059-7.41211 15.7715-7.6416Q15.5371-7.87109 15.1758-7.87109L12.5195-7.87109L12.5195-10.5176Q12.5195-10.8984 12.2852-11.1279Q12.0508-11.3574 11.6797-11.3574Q11.3281-11.3574 11.1035-11.1279Q10.8789-10.8984 10.8789-10.5176L10.8789-7.87109L8.23242-7.87109Q7.85156-7.87109 7.62207-7.6416Q7.39258-7.41211 7.39258-7.04102Z"/>
</g>
<g transform="matrix(1 0 0 1 305.646 1933)">
<path d="M14.9707 5.66406Q17.0605 5.66406 18.96 5.01465Q20.8594 4.36523 22.4512 3.19336Q24.043 2.02148 25.2197 0.429688Q26.3965-1.16211 27.0459-3.06641Q27.6953-4.9707 27.6953-7.05078Q27.6953-9.14062 27.0459-11.04Q26.3965-12.9395 25.2197-14.5312Q24.043-16.123 22.4512-17.2998Q20.8594-18.4766 18.9551-19.126Q17.0508-19.7754 14.9609-19.7754Q12.8711-19.7754 10.9717-19.126Q9.07227-18.4766 7.48535-17.2998Q5.89844-16.123 4.72168-14.5312Q3.54492-12.9395 2.90039-11.04Q2.25586-9.14062 2.25586-7.05078Q2.25586-4.9707 2.90527-3.06641Q3.55469-1.16211 4.72656 0.429688Q5.89844 2.02148 7.49023 3.19336Q9.08203 4.36523 10.9814 5.01465Q12.8809 5.66406 14.9707 5.66406ZM14.9707 3.84766Q13.1641 3.84766 11.5283 3.2959Q9.89258 2.74414 8.53516 1.74805Q7.17773 0.751953 6.17676-0.610352Q5.17578-1.97266 4.62891-3.6084Q4.08203-5.24414 4.08203-7.05078Q4.08203-8.86719 4.62891-10.5029Q5.17578-12.1387 6.17188-13.501Q7.16797-14.8633 8.52539-15.8594Q9.88281-16.8555 11.5186-17.4023Q13.1543-17.9492 14.9609-17.9492Q16.7773-17.9492 18.4131-17.4023Q20.0488-16.8555 21.4111-15.8594Q22.7734-14.8633 23.7695-13.501Q24.7656-12.1387 25.3174-10.5029Q25.8691-8.86719 25.8691-7.05078Q25.8789-5.24414 25.332-3.6084Q24.7852-1.97266 23.7842-0.610352Q22.7832 0.751953 21.4209 1.74805Q20.0586 2.74414 18.4229 3.2959Q16.7871 3.84766 14.9707 3.84766ZM9.45312-7.04102Q9.45312-6.66016 9.71191-6.41113Q9.9707-6.16211 10.3711-6.16211L14.0625-6.16211L14.0625-2.46094Q14.0625-2.06055 14.3115-1.80664Q14.5605-1.55273 14.9414-1.55273Q15.3516-1.55273 15.6055-1.80664Q15.8594-2.06055 15.8594-2.46094L15.8594-6.16211L19.5605-6.16211Q19.9609-6.16211 20.2148-6.41113Q20.4688-6.66016 20.4688-7.04102Q20.4688-7.45117 20.2148-7.70508Q19.9609-7.95898 19.5605-7.95898L15.8594-7.95898L15.8594-11.6504Q15.8594-12.0605 15.6055-12.3145Q15.3516-12.5684 14.9414-12.5684Q14.5605-12.5684 14.3115-12.3096Q14.0625-12.0508 14.0625-11.6504L14.0625-7.95898L10.3711-7.95898Q9.96094-7.95898 9.70703-7.70508Q9.45312-7.45117 9.45312-7.04102Z"/>
</g>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 263 1953)">Design Variations</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1971)">Symbols are supported in up to nine weights and three scales.</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1989)">For optimal layout with text and other symbols, vertically align</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 2007)">symbols with the adjacent text.</text>
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="776" x2="776" y1="1919" y2="1933"/>
<g transform="matrix(1 0 0 1 776 1933)">
<path d="M3.31055 0.15625Q3.70117 0.15625 3.91602-0.00976562Q4.13086-0.175781 4.26758-0.585938L5.52734-4.0332L11.2891-4.0332L12.5488-0.585938Q12.6855-0.175781 12.9004-0.00976562Q13.1152 0.15625 13.4961 0.15625Q13.8867 0.15625 14.1162-0.0585938Q14.3457-0.273438 14.3457-0.644531Q14.3457-0.869141 14.2383-1.17188L9.6582-13.3691Q9.48242-13.8184 9.17969-14.043Q8.87695-14.2676 8.4082-14.2676Q7.5-14.2676 7.17773-13.3789L2.59766-1.16211Q2.49023-0.859375 2.49023-0.634766Q2.49023-0.263672 2.70996-0.0537109Q2.92969 0.15625 3.31055 0.15625ZM6.00586-5.51758L8.37891-12.0898L8.42773-12.0898L10.8008-5.51758Z"/>
</g>
<line style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="793.197" x2="793.197" y1="1919" y2="1933"/>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 776 1953)">Margins</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1971)">Leading and trailing margins on the left and right side of each symbol</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 1989)">can be adjusted by modifying the x-location of the margin guidelines.</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2007)">Modifications are automatically applied proportionally to all</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 776 2025)">scales and weights.</text>
<g transform="matrix(1 0 0 1 1289 1933)">
<path d="M2.8418 1.86523L4.54102 3.57422Q5.18555 4.22852 5.90332 4.17969Q6.62109 4.13086 7.31445 3.35938L18.0078-8.42773L17.041-9.4043L6.42578 2.27539Q6.16211 2.57812 5.89355 2.61719Q5.625 2.65625 5.27344 2.30469L4.10156 1.14258Q3.75 0.791016 3.79395 0.522461Q3.83789 0.253906 4.14062-0.0195312L15.6152-10.8203L14.6387-11.7871L3.04688-0.898438Q2.30469-0.214844 2.25098 0.498047Q2.19727 1.21094 2.8418 1.86523ZM9.25781-16.3281Q8.94531-16.0254 8.90625-15.6348Q8.86719-15.2441 9.04297-14.9512Q9.21875-14.6777 9.55566-14.541Q9.89258-14.4043 10.3809-14.5215Q11.4746-14.7754 12.5977-14.7314Q13.7207-14.6875 14.7949-13.9844L14.209-12.5293Q13.9551-11.9043 14.0674-11.4404Q14.1797-10.9766 14.5801-10.5664L16.875-8.25195Q17.2363-7.88086 17.5781-7.82227Q17.9199-7.76367 18.3398-7.8418L19.4043-8.03711L20.0684-7.36328L20.0293-6.80664Q20-6.43555 20.1221-6.12305Q20.2441-5.81055 20.6055-5.44922L21.3672-4.70703Q21.7285-4.3457 22.1533-4.33105Q22.5781-4.31641 22.9297-4.66797L25.8398-7.58789Q26.1914-7.93945 26.1816-8.35449Q26.1719-8.76953 25.8105-9.13086L25.0391-9.89258Q24.6875-10.2539 24.3799-10.3857Q24.0723-10.5176 23.7109-10.4883L23.1348-10.4395L22.4902-11.0742L22.7344-12.1973Q22.832-12.6172 22.6953-12.9834Q22.5586-13.3496 22.1191-13.7891L19.9219-15.9766Q18.6719-17.2168 17.2607-17.8369Q15.8496-18.457 14.4189-18.4814Q12.9883-18.5059 11.665-17.959Q10.3418-17.4121 9.25781-16.3281ZM10.752-15.957Q11.6602-16.6211 12.7002-16.9043Q13.7402-17.1875 14.8047-17.085Q15.8691-16.9824 16.8701-16.5137Q17.8711-16.0449 18.7012-15.2051L21.1328-12.793Q21.3086-12.6172 21.3525-12.4512Q21.3965-12.2852 21.3379-12.0312L21.0156-10.5469L22.5195-9.0625L23.5059-9.12109Q23.6914-9.13086 23.7891-9.09668Q23.8867-9.0625 24.0332-8.91602L24.6094-8.33984L22.168-5.89844L21.5918-6.47461Q21.4453-6.62109 21.4062-6.71875Q21.3672-6.81641 21.377-7.01172L21.4453-7.98828L19.9512-9.47266L18.4277-9.21875Q18.1836-9.16992 18.042-9.2041Q17.9004-9.23828 17.7148-9.41406L15.7129-11.416Q15.5176-11.5918 15.4932-11.7529Q15.4688-11.9141 15.5859-12.1875L16.4648-14.2773Q15.293-15.3711 13.8281-15.791Q12.3633-16.2109 10.8398-15.7617Q10.7227-15.7324 10.6885-15.8057Q10.6543-15.8789 10.752-15.957Z"/>
</g>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;font-weight:bold;" transform="matrix(1 0 0 1 1289 1953)">Exporting</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1971)">Symbols should be outlined when exporting to ensure the</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 1289 1989)">design is preserved when submitting to Xcode.</text>
<text id="template-version" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1933)">Template v.3.0</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1951)">Requires Xcode 13 or greater</text>
<text id="descriptive-name" style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1969)">Generated from line.3.horizontal.decrease.circle</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;text-anchor:end;" transform="matrix(1 0 0 1 3036 1987)">Typeset at 100 points</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 726)">Small</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1156)">Medium</text>
<text style="stroke:none;fill:black;font-family:sans-serif;font-size:13;" transform="matrix(1 0 0 1 263 1586)">Large</text>
</g>
<g id="Guides">
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 696)">
<path d="M0.993347 0L3.6377 0L29.3282-67.1326L30.0301-67.1326L30.0301-70.459L28.1227-70.459ZM11.6882-24.4797L46.9818-24.4797L46.2311-26.7288L12.4382-26.7288ZM55.1193 0L57.7637 0L30.6381-70.459L29.4327-70.459L29.4327-67.1326Z"/>
</g>
<line id="Baseline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="696" y2="696"/>
<line id="Capline-S" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="625.541" y2="625.541"/>
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1126)">
<path d="M0.993347 0L3.6377 0L29.3282-67.1326L30.0301-67.1326L30.0301-70.459L28.1227-70.459ZM11.6882-24.4797L46.9818-24.4797L46.2311-26.7288L12.4382-26.7288ZM55.1193 0L57.7637 0L30.6381-70.459L29.4327-70.459L29.4327-67.1326Z"/>
</g>
<line id="Baseline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1126" y2="1126"/>
<line id="Capline-M" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1055.54" y2="1055.54"/>
<g id="H-reference" style="fill:#27AAE1;stroke:none;" transform="matrix(1 0 0 1 339 1556)">
<path d="M0.993347 0L3.6377 0L29.3282-67.1326L30.0301-67.1326L30.0301-70.459L28.1227-70.459ZM11.6882-24.4797L46.9818-24.4797L46.2311-26.7288L12.4382-26.7288ZM55.1193 0L57.7637 0L30.6381-70.459L29.4327-70.459L29.4327-67.1326Z"/>
</g>
<line id="Baseline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1556" y2="1556"/>
<line id="Capline-L" style="fill:none;stroke:#27AAE1;opacity:1;stroke-width:0.5;" x1="263" x2="3036" y1="1485.54" y2="1485.54"/>
<line id="left-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="515.649" x2="515.649" y1="600.785" y2="720.121"/>
<line id="right-margin-Ultralight-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="658.773" x2="658.773" y1="600.785" y2="720.121"/>
<line id="left-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1403.58" x2="1403.58" y1="600.785" y2="720.121"/>
<line id="right-margin-Regular-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="1551.11" x2="1551.11" y1="600.785" y2="720.121"/>
<line id="left-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="2884.57" x2="2884.57" y1="600.785" y2="720.121"/>
<line id="right-margin-Black-S" style="fill:none;stroke:#00AEEF;stroke-width:0.5;opacity:1.0;" x1="3037.23" x2="3037.23" y1="600.785" y2="720.121"/>
</g>
<g id="Symbols">
<g id="Black-S" transform="matrix(1 0 0 1 2884.57 696)">
<path d="M48.8281 6.78711Q57.5195 6.78711 65.1123 3.51562Q72.7051 0.244141 78.4912-5.54199Q84.2773-11.3281 87.5488-18.9209Q90.8203-26.5137 90.8203-35.2051Q90.8203-43.8965 87.5488-51.4893Q84.2773-59.082 78.4912-64.8682Q72.7051-70.6543 65.1123-73.9258Q57.5195-77.1973 48.8281-77.1973Q40.1367-77.1973 32.5439-73.9258Q24.9512-70.6543 19.165-64.8682Q13.3789-59.082 10.1074-51.4893Q6.83594-43.8965 6.83594-35.2051Q6.83594-26.5137 10.1074-18.9209Q13.3789-11.3281 19.165-5.54199Q24.9512 0.244141 32.5439 3.51562Q40.1367 6.78711 48.8281 6.78711ZM48.8281-7.37305Q43.0664-7.37305 38.0127-9.5459Q32.959-11.7188 29.1504-15.5273Q25.3418-19.3359 23.1689-24.3896Q20.9961-29.4434 20.9961-35.2051Q20.9961-40.9668 23.1689-46.0205Q25.3418-51.0742 29.1504-54.8828Q32.959-58.6914 38.0127-60.8643Q43.0664-63.0371 48.8281-63.0371Q54.5898-63.0371 59.6436-60.8643Q64.6973-58.6914 68.5059-54.8828Q72.3145-51.0742 74.4873-46.0205Q76.6602-40.9668 76.6602-35.2051Q76.6602-29.4434 74.4873-24.3896Q72.3145-19.3359 68.5059-15.5273Q64.6973-11.7188 59.6436-9.5459Q54.5898-7.37305 48.8281-7.37305ZM32.7637-41.3086L64.8926-41.3086Q67.0898-41.3086 68.4326-42.5537Q69.7754-43.7988 69.7754-45.8008Q69.7754-47.8516 68.4326-49.0967Q67.0898-50.3418 64.8926-50.3418L32.7637-50.3418Q30.5664-50.3418 29.2236-49.0967Q27.8809-47.8516 27.8809-45.8008Q27.8809-43.7988 29.2236-42.5537Q30.5664-41.3086 32.7637-41.3086ZM36.2305-28.8574L61.4258-28.8574Q63.5742-28.8574 64.9414-30.1025Q66.3086-31.3477 66.3086-33.3496Q66.3086-35.3516 64.9414-36.6211Q63.5742-37.8906 61.4258-37.8906L36.2305-37.8906Q34.082-37.8906 32.7148-36.6211Q31.3477-35.3516 31.3477-33.3496Q31.3477-31.3477 32.7148-30.1025Q34.082-28.8574 36.2305-28.8574ZM39.6973-16.4062L57.959-16.4062Q60.1074-16.4062 61.4746-17.6514Q62.8418-18.8965 62.8418-20.8984Q62.8418-22.9004 61.4746-24.1699Q60.1074-25.4395 57.959-25.4395L39.6973-25.4395Q37.5488-25.4395 36.1816-24.1699Q34.8145-22.9004 34.8145-20.8984Q34.8145-18.8965 36.1816-17.6514Q37.5488-16.4062 39.6973-16.4062Z"/>
<path d="M129.1504-23.6328 142.1387-37.5977Q143.5059-39.1113 143.5303-41.1621 143.5547-43.2129 142.2363-44.4336 140.6738-45.8984 138.6475-45.8984 136.6211-45.8984 135.2539-44.3848L123.8281-32.0801 112.4023-44.3848Q110.9863-45.8984 108.96-45.8984 106.9336-45.8984 105.4199-44.4336 104.1016-43.2129 104.1016-41.1865 104.1016-39.1602 105.5176-37.6465L118.5059-23.6816Q120.6055-21.4355 123.8281-21.4111 127.0508-21.3867 129.1504-23.6328Z"/>
</g>
<g id="Regular-S" transform="matrix(1 0 0 1 1403.58 696)">
<path d="M46.2402 4.15039Q54.3457 4.15039 61.4746 1.07422Q68.6035-2.00195 74.0479-7.4707Q79.4922-12.9395 82.5928-20.0684Q85.6934-27.1973 85.6934-35.2539Q85.6934-43.3105 82.5928-50.4395Q79.4922-57.5684 74.0234-63.0371Q68.5547-68.5059 61.4258-71.582Q54.2969-74.6582 46.1914-74.6582Q38.1348-74.6582 31.0059-71.582Q23.877-68.5059 18.457-63.0371Q13.0371-57.5684 9.93652-50.4395Q6.83594-43.3105 6.83594-35.2539Q6.83594-27.1973 9.93652-20.0684Q13.0371-12.9395 18.4814-7.4707Q23.9258-2.00195 31.0547 1.07422Q38.1836 4.15039 46.2402 4.15039ZM46.2402-3.27148Q39.5996-3.27148 33.8135-5.7373Q28.0273-8.20312 23.6572-12.5977Q19.2871-16.9922 16.8213-22.8027Q14.3555-28.6133 14.3555-35.2539Q14.3555-41.8945 16.7969-47.7051Q19.2383-53.5156 23.6084-57.9102Q27.9785-62.3047 33.7646-64.7705Q39.5508-67.2363 46.1914-67.2363Q52.8809-67.2363 58.667-64.7705Q64.4531-62.3047 68.8477-57.9102Q73.2422-53.5156 75.7324-47.7051Q78.2227-41.8945 78.2227-35.2539Q78.2227-28.6133 75.7568-22.8027Q73.291-16.9922 68.9209-12.5977Q64.5508-8.20312 58.7402-5.7373Q52.9297-3.27148 46.2402-3.27148ZM25.6348-42.2852L66.9434-42.2852Q68.4082-42.2852 69.3359-43.1396Q70.2637-43.9941 70.2637-45.3613Q70.2637-46.7285 69.3359-47.5586Q68.4082-48.3887 66.9434-48.3887L25.6348-48.3887Q24.2188-48.3887 23.291-47.5586Q22.3633-46.7285 22.3633-45.3613Q22.3633-43.9941 23.291-43.1396Q24.2188-42.2852 25.6348-42.2852ZM31.3477-29.5898L61.2305-29.5898Q62.6953-29.5898 63.623-30.4443Q64.5508-31.2988 64.5508-32.666Q64.5508-34.0332 63.623-34.8877Q62.6953-35.7422 61.2305-35.7422L31.3477-35.7422Q29.9316-35.7422 29.0039-34.8877Q28.0762-34.0332 28.0762-32.666Q28.0762-31.2988 29.0039-30.4443Q29.9316-29.5898 31.3477-29.5898ZM37.3047-16.8945L55.3223-16.8945Q56.7383-16.8945 57.666-17.749Q58.5938-18.6035 58.5938-19.9707Q58.5938-21.3379 57.666-22.1924Q56.7383-23.0469 55.3223-23.0469L37.3047-23.0469Q35.8398-23.0469 34.9365-22.1924Q34.0332-21.3379 34.0332-19.9707Q34.0332-18.6035 34.9365-17.749Q35.8398-16.8945 37.3047-16.8945Z"/>
<path d="M125.5371-22.998 140.0879-38.5742Q141.0156-39.5996 141.0645-40.918 141.1133-42.2363 140.1855-43.1152 139.1602-44.1406 137.8174-44.165 136.4746-44.1895 135.5469-43.2129L121.2402-27.9297 106.9336-43.2129Q106.0059-44.1895 104.6143-44.1895 103.2227-44.1895 102.2461-43.1152 101.416-42.1875 101.416-40.8936 101.416-39.5996 102.3926-38.5742L116.8945-22.998Q118.9453-20.8496 121.2158-20.8496 123.4863-20.8496 125.5371-22.998Z"/>
</g>
<g id="Ultralight-S" transform="matrix(1 0 0 1 515.649 696)">
<path d="M44.043 1.95312Q51.7578 1.95312 58.4717-0.927734Q65.1855-3.80859 70.3369-8.95996Q75.4883-14.1113 78.3936-20.8252Q81.2988-27.5391 81.2988-35.2539Q81.2988-42.9688 78.3936-49.6826Q75.4883-56.3965 70.3369-61.5479Q65.1855-66.6992 58.4717-69.5801Q51.7578-72.4609 44.043-72.4609Q36.377-72.4609 29.6387-69.5801Q22.9004-66.6992 17.7734-61.5479Q12.6465-56.3965 9.74121-49.6826Q6.83594-42.9688 6.83594-35.2539Q6.83594-27.5391 9.74121-20.8252Q12.6465-14.1113 17.7734-8.95996Q22.9004-3.80859 29.6387-0.927734Q36.377 1.95312 44.043 1.95312ZM44.043-0.292969Q36.8164-0.292969 30.4688-3.00293Q24.1211-5.71289 19.3115-10.5225Q14.502-15.332 11.7676-21.6797Q9.0332-28.0273 9.0332-35.2539Q9.0332-42.4805 11.7676-48.8281Q14.502-55.1758 19.3115-59.9854Q24.1211-64.7949 30.4688-67.5049Q36.8164-70.2148 44.043-70.2148Q51.2695-70.2148 57.6416-67.5049Q64.0137-64.7949 68.7988-59.9854Q73.584-55.1758 76.3184-48.8281Q79.0527-42.4805 79.0527-35.2539Q79.0527-28.0273 76.3428-21.6797Q73.6328-15.332 68.8232-10.5225Q64.0137-5.71289 57.666-3.00293Q51.3184-0.292969 44.043-0.292969ZM22.2656-45.0195L65.918-45.0195Q66.3574-45.0195 66.6748-45.3369Q66.9922-45.6543 66.9922-46.0938Q66.9922-46.582 66.6748-46.875Q66.3574-47.168 65.918-47.168L22.2656-47.168Q21.7773-47.168 21.46-46.875Q21.1426-46.582 21.1426-46.0938Q21.1426-45.6543 21.46-45.3369Q21.7773-45.0195 22.2656-45.0195ZM27.832-32.4707L60.3516-32.4707Q60.8398-32.4707 61.1572-32.7637Q61.4746-33.0566 61.4746-33.5449Q61.4746-34.0332 61.1572-34.3262Q60.8398-34.6191 60.3516-34.6191L27.832-34.6191Q27.2949-34.6191 26.9775-34.3262Q26.6602-34.0332 26.6602-33.5449Q26.6602-33.0566 26.9775-32.7637Q27.2949-32.4707 27.832-32.4707ZM33.5938-19.7754L54.5898-19.7754Q55.0781-19.7754 55.3955-20.0684Q55.7129-20.3613 55.7129-20.8496Q55.7129-21.3379 55.3955-21.6309Q55.0781-21.9238 54.5898-21.9238L33.5938-21.9238Q33.0566-21.9238 32.7637-21.6309Q32.4707-21.3379 32.4707-20.8496Q32.4707-20.3613 32.7637-20.0684Q33.0566-19.7754 33.5938-19.7754Z"/>
<path d="M120.4102-22.5098 137.6953-40.1367Q138.0371-40.5273 138.0615-40.9668 138.0859-41.4062 137.7441-41.7969 137.4023-42.0898 136.9141-42.1143 136.4258-42.1387 136.0352-41.748L119.043-24.4141 102.002-41.748Q101.6602-42.1387 101.1719-42.1143 100.6836-42.0898 100.3906-41.7969 100-41.4062 100-40.9668 100-40.5273 100.3906-40.1367L117.6758-22.5098Q118.3594-21.8262 119.0674-21.8262 119.7754-21.8262 120.4102-22.5098Z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17503.1" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="Wry-M9-Gep">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="19529" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="Wry-M9-Gep">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17503.1"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="19529"/>
<capability name="NSView safe area layout guides" minToolsVersion="12.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
@ -12,31 +12,31 @@
<objects>
<viewController id="Wry-M9-Gep" customClass="OutlineViewController" customModule="CotEditor" customModuleProvider="target" sceneMemberID="viewController">
<view key="view" translatesAutoresizingMaskIntoConstraints="NO" id="DQy-qv-3Fk">
<rect key="frame" x="0.0" y="0.0" width="220" height="157"/>
<rect key="frame" x="0.0" y="0.0" width="220" height="320"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="YES" translatesAutoresizingMaskIntoConstraints="NO" id="w9Z-gJ-Amp">
<rect key="frame" x="10" y="82" width="48" height="15"/>
<rect key="frame" x="10" y="245" width="48" height="15"/>
<textFieldCell key="cell" controlSize="small" sendsActionOnEndEditing="YES" title="Outline" id="RyV-wo-tpY">
<font key="font" metaFont="systemBold" size="12"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sdS-LF-zK0">
<rect key="frame" x="12" y="12" width="196" height="62"/>
<scrollView autohidesScrollers="YES" horizontalLineScroll="18" horizontalPageScroll="10" verticalLineScroll="18" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sdS-LF-zK0">
<rect key="frame" x="12" y="39" width="196" height="198"/>
<clipView key="contentView" id="kw3-JE-21n">
<rect key="frame" x="1" y="1" width="194" height="60"/>
<rect key="frame" x="1" y="1" width="194" height="196"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" tableStyle="fullWidth" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="16" rowSizeStyle="automatic" usesAutomaticRowHeights="YES" headerView="meP-Ke-T4s" viewBased="YES" autoresizesOutlineColumn="YES" outlineTableColumn="CSX-H0-nFf" id="LBW-lW-4ux">
<rect key="frame" x="0.0" y="0.0" width="194" height="37"/>
<outlineView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="firstColumnOnly" columnReordering="NO" columnResizing="NO" multipleSelection="NO" autosaveColumns="NO" rowHeight="14" rowSizeStyle="automatic" usesAutomaticRowHeights="YES" headerView="meP-Ke-T4s" viewBased="YES" autoresizesOutlineColumn="YES" outlineTableColumn="CSX-H0-nFf" id="LBW-lW-4ux">
<rect key="frame" x="0.0" y="0.0" width="198" height="173"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="6" height="3"/>
<size key="intercellSpacing" width="8" height="4"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="gridColor" name="gridColor" catalog="System" colorSpace="catalog"/>
<tableColumns>
<tableColumn identifier="title" width="182" minWidth="40" maxWidth="1000" id="CSX-H0-nFf">
<tableColumn identifier="title" width="186" minWidth="100" maxWidth="1000" id="CSX-H0-nFf">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Title">
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
@ -48,12 +48,11 @@
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
<prototypeCellViews>
<tableCellView id="nfz-SY-V76">
<rect key="frame" x="3" y="1" width="188" height="16"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<tableCellView verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="nfz-SY-V76">
<rect key="frame" x="4" y="2" width="50" height="14"/>
<subviews>
<textField identifier="title" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="F1F-V6-xxG" customClass="SeparatorTextField" customModule="CotEditor" customModuleProvider="target">
<rect key="frame" x="6" y="1" width="176" height="14"/>
<textField identifier="title" horizontalHuggingPriority="750" verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="F1F-V6-xxG" customClass="SeparatorTextField" customModule="CotEditor" customModuleProvider="target">
<rect key="frame" x="-2" y="0.0" width="54" height="14"/>
<textFieldCell key="cell" controlSize="small" lineBreakMode="truncatingTail" selectable="YES" sendsActionOnEndEditing="YES" title="Item Title" id="opH-Sc-iu8">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
@ -66,10 +65,10 @@
</textField>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="F1F-V6-xxG" secondAttribute="trailing" constant="8" id="LRq-Qi-FwQ"/>
<constraint firstAttribute="bottom" secondItem="F1F-V6-xxG" secondAttribute="bottom" constant="1" id="SYM-2C-9ij"/>
<constraint firstItem="F1F-V6-xxG" firstAttribute="leading" secondItem="nfz-SY-V76" secondAttribute="leading" constant="8" id="WCg-Yf-ZCN"/>
<constraint firstItem="F1F-V6-xxG" firstAttribute="top" secondItem="nfz-SY-V76" secondAttribute="top" constant="1" id="eeZ-K4-Lmi"/>
<constraint firstAttribute="trailing" secondItem="F1F-V6-xxG" secondAttribute="trailing" id="LRq-Qi-FwQ"/>
<constraint firstAttribute="bottom" secondItem="F1F-V6-xxG" secondAttribute="bottom" id="SYM-2C-9ij"/>
<constraint firstItem="F1F-V6-xxG" firstAttribute="leading" secondItem="nfz-SY-V76" secondAttribute="leading" id="WCg-Yf-ZCN"/>
<constraint firstItem="F1F-V6-xxG" firstAttribute="top" secondItem="nfz-SY-V76" secondAttribute="top" id="eeZ-K4-Lmi"/>
</constraints>
<connections>
<outlet property="textField" destination="F1F-V6-xxG" id="zDm-83-cq9"/>
@ -90,8 +89,8 @@
<constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="100" id="xqb-BN-UYB"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Vh9-uN-jKp">
<rect key="frame" x="1" y="25" width="194" height="16"/>
<scroller key="horizontalScroller" wantsLayer="YES" verticalHuggingPriority="750" horizontal="YES" id="Vh9-uN-jKp">
<rect key="frame" x="1" y="181" width="194" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" wantsLayer="YES" verticalHuggingPriority="750" horizontal="NO" id="pN6-MO-ePX">
@ -99,13 +98,27 @@
<autoresizingMask key="autoresizingMask"/>
</scroller>
<tableHeaderView key="headerView" wantsLayer="YES" id="meP-Ke-T4s">
<rect key="frame" x="0.0" y="0.0" width="194" height="23"/>
<rect key="frame" x="0.0" y="0.0" width="198" height="23"/>
<autoresizingMask key="autoresizingMask"/>
</tableHeaderView>
</scrollView>
<searchField wantsLayer="YES" focusRingType="none" verticalHuggingPriority="750" textCompletion="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nSM-iY-aHb">
<rect key="frame" x="12" y="12" width="196" height="19"/>
<searchFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" focusRingType="none" placeholderString="Filter" usesSingleLineMode="YES" bezelStyle="round" sendsSearchStringImmediately="YES" recentsAutosaveName="OutlineSearch" id="GmM-uR-pQ8">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<outlet property="delegate" destination="Wry-M9-Gep" id="g1D-iG-IwL"/>
</connections>
</searchField>
</subviews>
<constraints>
<constraint firstItem="JmM-qV-6D4" firstAttribute="bottom" secondItem="sdS-LF-zK0" secondAttribute="bottom" constant="12" id="1gf-5N-7G7"/>
<constraint firstItem="JmM-qV-6D4" firstAttribute="bottom" secondItem="nSM-iY-aHb" secondAttribute="bottom" constant="12" id="3Vr-Q0-dd1"/>
<constraint firstItem="nSM-iY-aHb" firstAttribute="leading" secondItem="JmM-qV-6D4" secondAttribute="leading" constant="12" id="AQQ-wK-57x"/>
<constraint firstItem="JmM-qV-6D4" firstAttribute="trailing" secondItem="nSM-iY-aHb" secondAttribute="trailing" constant="12" id="KAC-my-FkO"/>
<constraint firstItem="nSM-iY-aHb" firstAttribute="top" secondItem="sdS-LF-zK0" secondAttribute="bottom" constant="8" symbolic="YES" id="NEG-gA-yN8"/>
<constraint firstItem="w9Z-gJ-Amp" firstAttribute="top" secondItem="JmM-qV-6D4" secondAttribute="top" constant="8" id="XMM-ho-3L6"/>
<constraint firstItem="sdS-LF-zK0" firstAttribute="leading" secondItem="JmM-qV-6D4" secondAttribute="leading" constant="12" id="XaZ-Pz-RxG"/>
<constraint firstItem="w9Z-gJ-Amp" firstAttribute="leading" secondItem="JmM-qV-6D4" secondAttribute="leading" constant="12" id="f5I-Dp-Sqh"/>
@ -118,11 +131,12 @@
</view>
<connections>
<outlet property="outlineView" destination="LBW-lW-4ux" id="obz-UQ-pIL"/>
<outlet property="searchField" destination="nSM-iY-aHb" id="nxc-Ov-j4f"/>
</connections>
</viewController>
<customObject id="yJT-Xy-p5x" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="90" y="55"/>
<point key="canvasLocation" x="90" y="88"/>
</scene>
</scenes>
</document>

View File

@ -0,0 +1,48 @@
//
// NSFontManager.swift
//
// CotEditor
// https://coteditor.com
//
// Created by 1024jp on 2020-09-02.
//
// ---------------------------------------------------------------------------
//
// © 2020 1024jp
//
// 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
//
// https://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.
//
import AppKit
extension NSFontManager {
/// Returns a font object whose weight is greater or lesser than that of the given font.
///
/// - Parameters:
/// - level: Tne number of levels to increase/decrease the font weight.
/// - font: The font whose weight is increased or decreased.
/// - Returns: A font with matching traits except for the new weight, or aFont if it cant be converted.
func convertWeight(level: Int, of font: NSFont) -> NSFont {
guard level != 0 else { return font }
var font = font
for _ in 0..<abs(level) {
font = self.convertWeight((level > 0), of: font)
}
return font
}
}

View File

@ -8,7 +8,7 @@
//
// ---------------------------------------------------------------------------
//
// © 2016-2020 1024jp
// © 2016-2022 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -41,6 +41,7 @@ struct OutlineItem: Equatable {
var title: String
var range: NSRange
var style: Style = []
fileprivate(set) var filteredRanges: [NSRange]?
var isSeparator: Bool {
@ -117,4 +118,22 @@ extension BidirectionalCollection where Element == OutlineItem {
return self[self.index(after: currentIndex)...].first { !$0.isSeparator }
}
/// Filter matched outline items abbreviatedly.
///
/// - Parameter searchString: The string to search.
/// - Returns: Mached items.
func filterItems(with searchString: String) -> [OutlineItem] {
self.compactMap { (item) in
item.title.abbreviatedMatch(with: searchString).flatMap { (item: item, result: $0) }
}
.sorted(\.result.score)
.map {
var item = $0.item
item.filteredRanges = $0.result.ranges.map { NSRange($0, in: item.title) }
return item
}
}
}

View File

@ -8,7 +8,7 @@
//
// ---------------------------------------------------------------------------
//
// © 2018-2020 1024jp
// © 2018-2022 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -42,11 +42,14 @@ final class OutlineViewController: NSViewController {
didSet {
guard outlineItems != oldValue, self.isViewShown else { return }
self.filterItems(with: self.filterString)
self.outlineView?.reloadData()
self.invalidateCurrentLocation()
}
}
private var filteredOutlineItems: [OutlineItem] = [] { didSet { self.outlineView?.reloadData() } }
private var documentObserver: AnyCancellable?
private var syntaxStyleObserver: AnyCancellable?
private var selectionObserver: AnyCancellable?
@ -54,6 +57,7 @@ final class OutlineViewController: NSViewController {
private var isOwnSelectionChange = false
@IBOutlet private weak var outlineView: NSOutlineView?
@IBOutlet private weak var searchField: NSSearchField?
@ -76,6 +80,23 @@ final class OutlineViewController: NSViewController {
super.viewDidLoad()
// set up filter field
if let buttonCell = (self.searchField?.cell as? NSSearchFieldCell)?.searchButtonCell {
buttonCell.image = NSImage(named: "filter.chevron")
buttonCell.imageScaling = .scaleProportionallyDown
}
let searchMenu = NSMenu(title: "Recent Filters".localized)
searchMenu.addItem(withTitle: "Recents Filters".localized, action: nil, keyEquivalent: "")
.tag = NSSearchField.recentsTitleMenuItemTag
searchMenu.addItem(withTitle: "", action: nil, keyEquivalent: "")
.tag = NSSearchField.recentsMenuItemTag
searchMenu.addItem(.separator())
searchMenu.addItem(withTitle: "Clear Recents".localized, action: nil, keyEquivalent: "")
.tag = NSSearchField.clearRecentsMenuItemTag
searchMenu.addItem(withTitle: "No Recent Filter".localized, action: nil, keyEquivalent: "")
.tag = NSSearchField.noRecentsMenuItemTag
self.searchField?.searchMenuTemplate = searchMenu
// set accessibility
self.view.setAccessibilityElement(true)
self.view.setAccessibilityRole(.group)
@ -135,6 +156,13 @@ final class OutlineViewController: NSViewController {
}
/// User input string for filtering.
private var filterString: String {
self.searchField?.stringValue ?? ""
}
/// Paragraph style for outline items.
private let itemParagraphStyle: NSParagraphStyle = {
@ -151,7 +179,7 @@ final class OutlineViewController: NSViewController {
private func selectOutlineItem(at row: Int) {
guard
let item = self.outlineItems[safe: row],
let item = self.filterString.isEmpty ? self.outlineItems[safe: row] : self.filteredOutlineItems[safe: row],
item.title != .separator
else { return }
@ -198,6 +226,7 @@ final class OutlineViewController: NSViewController {
/// - Parameter textView: The text view to apply the selection. when nil, the current focused editor will be used (the document can have multiple editors).
private func invalidateCurrentLocation(textView: NSTextView? = nil) {
guard self.filterString.isEmpty else { return }
guard let outlineView = self.outlineView else { return }
guard
@ -209,6 +238,7 @@ final class OutlineViewController: NSViewController {
self.isOwnSelectionChange = true
outlineView.selectRowIndexes([row], byExtendingSelection: false)
outlineView.scrollRowToVisible(row)
self.isOwnSelectionChange = false
}
}
@ -220,10 +250,6 @@ extension OutlineViewController: NSOutlineViewDelegate {
/// selection changed
func outlineViewSelectionDidChange(_ notification: Notification) {
defer {
self.isOwnSelectionChange = false
}
guard
!self.isOwnSelectionChange,
let outlineView = notification.object as? NSOutlineView
@ -248,6 +274,8 @@ extension OutlineViewController: NSOutlineViewDataSource {
/// return number of child items
func outlineView(_ outlineView: NSOutlineView, numberOfChildrenOfItem item: Any?) -> Int {
if !self.filterString.isEmpty { return self.filteredOutlineItems.count }
return self.outlineItems.count
}
@ -262,6 +290,8 @@ extension OutlineViewController: NSOutlineViewDataSource {
/// return child items
func outlineView(_ outlineView: NSOutlineView, child index: Int, ofItem item: Any?) -> Any {
if !self.filterString.isEmpty { return self.filteredOutlineItems[index] }
return self.outlineItems[index]
}
@ -278,9 +308,20 @@ extension OutlineViewController: NSOutlineViewDataSource {
case .title:
let fontSize = UserDefaults.standard[.outlineViewFontSize]
let font = outlineView.font.flatMap { NSFont(name: $0.fontName, size: fontSize) } ?? .systemFont(ofSize: fontSize)
let attrTitle = outlineItem.attributedTitle(for: font, attributes: [.paragraphStyle: self.itemParagraphStyle])
guard let ranges = outlineItem.filteredRanges else { return attrTitle }
let mutableAttrTitle = attrTitle.mutable
let boldFont = NSFontManager.shared.convertWeight(level: 2, of: font)
let attributes: [NSAttributedString.Key: Any] = [.font: boldFont,
.backgroundColor: NSColor.findHighlightColor]
for range in ranges {
mutableAttrTitle.addAttributes(attributes, range: range)
}
return mutableAttrTitle
return outlineItem.attributedTitle(for: font, attributes: [.paragraphStyle: self.itemParagraphStyle])
default:
preconditionFailure()
}
@ -290,6 +331,24 @@ extension OutlineViewController: NSOutlineViewDataSource {
extension OutlineViewController: NSSearchFieldDelegate {
func controlTextDidChange(_ obj: Notification) {
guard let searchField = obj.object as? NSSearchField else { return }
self.filterItems(with: searchField.stringValue)
}
private func filterItems(with searchString: String) {
self.filteredOutlineItems = self.outlineItems.filterItems(with: searchString)
}
}
extension OutlineViewController {
/// Increase outline view's font size.

View File

@ -8,7 +8,7 @@
//
// ---------------------------------------------------------------------------
//
// © 2020 1024jp
// © 2020-2022 1024jp
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@ -29,12 +29,12 @@ import XCTest
final class OutlineTests: XCTestCase {
private let items: [OutlineItem] = [
OutlineItem(title: "a", range: NSRange(location: 10, length: 5)), // 0
OutlineItem(title: "dog", range: NSRange(location: 10, length: 5)), // 0
OutlineItem(title: .separator, range: NSRange(location: 20, length: 5)),
OutlineItem(title: .separator, range: NSRange(location: 30, length: 5)),
OutlineItem(title: "b", range: NSRange(location: 40, length: 5)), // 3
OutlineItem(title: "dogcow", range: NSRange(location: 40, length: 5)), // 3
OutlineItem(title: .separator, range: NSRange(location: 50, length: 5)),
OutlineItem(title: "c", range: NSRange(location: 60, length: 5)), // 5
OutlineItem(title: "cow", range: NSRange(location: 60, length: 5)), // 5
OutlineItem(title: .separator, range: NSRange(location: 70, length: 5)),
]
@ -78,5 +78,14 @@ final class OutlineTests: XCTestCase {
XCTAssertNil(self.items.nextItem(for: NSRange(60..<60)))
XCTAssertNil(self.items.nextItem(for: NSRange(40..<61)))
}
func testFilter() throws {
XCTAssertEqual(self.items.filterItems(with: "").count, 0)
XCTAssertEqual(self.items.filterItems(with: "cat").count, 0)
XCTAssertEqual(self.items.filterItems(with: "dog").count, 2)
XCTAssertEqual(self.items.filterItems(with: "dow").count, 1)
}
}