Hint notification fixes and improvements

Hint notification bold (diff color) headline on multiple lines
Hint notification: Documentation link button.
Hints.ini header
hints logo - clippy 
disabled a preffered modes and techs for hints notifications
Empty hints array check. Fix of #6774.
This commit is contained in:
David Kocik 2021-08-09 17:09:09 +02:00
parent 4efce682e1
commit b43f225ac8
8 changed files with 538 additions and 92 deletions

View File

@ -1,3 +1,54 @@
# THIS DOCUMENT CONTAINS DATA FOR HINTS NOTIFICATIONS
#
# Each notification is divided by
# [hint:*name of notification*]
#
# Each notification MUST have text var in format:
# text = Headline of hint\nBody of hint.
# Headline is divided by new line (\n) from body.
# Headline is automaticaly printed as Bold.
# Body can contain bold marks: <b>text to be bold</b> (currently rendered as diffenert color, not bold due to font limitations)
# Body can contain hypertext: <a>hypertext text</a>
# Hypertext must be max one per notification and must be closed by </a>
#
# Notification can have documentation link:
# documentation_link = https://help.prusa3d.com/en/article/name-of-article
#
# If notification contains hypertext, it needs to be specified by hypertext_type var.
# each type needs to be supported with one or more additional vars.
# These types are possible:
#
# Settings highlight (like search feature)
# hypertext_type = settings
# hypertext_settings_opt = name_of_settings (hover over settings value and copy last line of hover text)
# hypertext_settings_type = 1 (1 - 5 according to settings tab - to be channged to name of tabs instead of numbers)
# hypertext_settings_category = Infill (name of panel - written on left in settings)
#
# Plater top toolbar highlight
# hypertext_type = plater
# hypertext_plater_item = nameofbutton (internal name of GLToolbar items)
#
# Plater gizmos (left) toolbar highlight
# hypertext_type = gizmo
# hypertext_gizmo_item = name (name of svg icon of gizmo in resources without .svg suffix)
#
# Open preferences (might add item to highlight)
# hypertext_type = preferences
# hypertext_preferences_page = 0 (values 0-2 according to prefernces tab to be opened)
#
# Open gallery (no aditional var)
# hypertext_type = gallery
#
#
# Each notification can have disabled and preferred modes and techs - divided by ;
# preferred_mode = simple
# disabled_mode = advanced; expert
# preferred_tech = SLA
# disabled_tech = FFF; MMU
# Algorithm shows hint only if in preffered mode / tech.
# Algorithm shows hint only if not in disabled mode / tech.
# if there are both disabled and preferred, only preferred that are not in disabled are valid.
[hint:Perspective camera]
text = Perspective camera\nDid you know that you can use the <b>K</b> key to quickly switch between an orthographic and perspective camera?
@ -45,12 +96,12 @@ hypertext_plater_item = arrange
[hint:Reload from disk]
text = Reload from disk\nDid you know that if you created a newer version of your model, you can simply reload it in PrusaSlicer? Right-click the model in the 3D view and choose Reload from disk. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/reload-from-disk_120427
documentation_link = https://help.prusa3d.com/en/article/reload-from-disk_120427
[hint:Different layer height for each model]
text = Different layer height for each model\nDid you know that you can print each model on the plater with a different layer height? Right-click the model in the 3D view, choose Layers and Perimeters and adjust the values in the right panel. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/per-model-settings_1674
documentation_link = https://help.prusa3d.com/en/article/per-model-settings_1674
[hint:Solid infill threshold area]
text = Solid infill threshold area\nDid you know that you can make parts of your model with a small cross-section be filled with solid infill automatically? Set the<a>Solid infill threshold area.</a>(Expert mode only.)
@ -91,7 +142,7 @@ text = Load config from G-code\nDid you know that you can use File-Import Config
[hint:Ironing]
text = Ironing\nDid you know that you can smooth top surfaces of prints using Ironing? The nozzle will run a special second infill phase at the same layer to fill in holes and flatten any lifted plastic. Read more in the<a>documentation.</a> (Requires Advanced or Expert mode.)
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/ironing_177488
documentation_link = https://help.prusa3d.com/en/article/ironing_177488
disabled_modes = SLA; simple
[hint:Fuzzy skin]
@ -105,7 +156,7 @@ disabled_modes = SLA
[hint:Negative volume]
text = Negative volume\nDid you know that you can subtract one mesh from another using the Negative volume modifier? That way you can, for example, create easily resizable holes directly in PrusaSlicer. Read more in the<a>documentation.</a>(Requires Advanced or Expert mode.)
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/negative-volume_238503
documentation_link = https://help.prusa3d.com/en/article/negative-volume_238503
disabled_modes = SLA; simple
[hint:Paint-on supports]
@ -123,17 +174,17 @@ disabled_modes = SLA; simple
[hint:Insert Pause]
text = Insert Pause\nDid you know that you can schedule the print to pause at a specific layer? Right-click the layer slider in the Preview and select Add pause print (M601). This can be used to insert magnets, weights or nuts into your prints. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/insert-pause-or-custom-g-code-at-layer_120490#insert-pause-at-layer
documentation_link = https://help.prusa3d.com/en/article/insert-pause-or-custom-g-code-at-layer_120490#insert-pause-at-layer
[hint:Insert Custom G-code]
text = Insert Custom G-code\nDid you know that you can insert a custom G-code at a specific layer? Right-click the layer in the Preview and select Add custom G-code. With this function you can, for example, create a temperature tower. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/insert-pause-or-custom-g-code-at-layer_120490#insert-custom-g-code-at-layer
documentation_link = https://help.prusa3d.com/en/article/insert-pause-or-custom-g-code-at-layer_120490#insert-custom-g-code-at-layer
[hint:Configuration snapshots]
text = Configuration snapshots\nDid you know that roll back to a complete backup of all system and user profiles? You can view and move back and forth between snapshots using the Configuration - Configuration snapshots menu. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/configuration-snapshots_1776
documentation_link = https://help.prusa3d.com/en/article/configuration-snapshots_1776
[hint:Minimum wall thickness]
text = Minimum wall thickness\nDid you know that instead of the number of top and bottom layers, you can define the<a>Minimum shell thickness</a>in millimeters? This feature is especially useful when using the variable layer height function.
@ -151,7 +202,7 @@ hypertext_preferences_page = 2
[hint:Adaptive infills]
text = Adaptive infills\nDid you know that you can use the Adaptive cubic and Support cubic infills to decrease the print time and lower the filament consumption? Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/infill-patterns_177130
documentation_link = https://help.prusa3d.com/en/article/infill-patterns_177130
[hint:Fullscreen mode]
text = Fullscreen mode\nDid you know that you can switch PrusaSlicer to fullscreen mode? Use the <b>F11</b> hotkey.
@ -159,7 +210,7 @@ text = Fullscreen mode\nDid you know that you can switch PrusaSlicer to fullscre
[hint:Simplify mesh]
text = Simplify mesh\nDid you know that you can reduce the number of triangles in a mesh using the Simplify mesh feature? Right-click the model and select Simplify model. Read more in the<a>documentation.</a>
hypertext_type = link
hypertext_link = https://help.prusa3d.com/en/article/simplify-mesh_238941
documentation_link = https://help.prusa3d.com/en/article/simplify-mesh_238941
#[hint:]
#text =

View File

@ -0,0 +1,49 @@
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100">
<polygon points="79.4 24.3 89.6 66.5 58.1 96.5 16.4 84.2 6.2 41.9 37.7 11.9 79.4 24.3" style="fill: #fff"/>
<path d="M51.4,15.9c-6.3-.1-23.2,14.7-19.1,42S43.4,95,52.8,94.7s13.8-6.1,13-16.1S62.7,63.8,64.9,59s3.7-7.1,4.4-7.7-10.2-5.1-11.6-8c-4.1-8.5,6.3-17.7,1.8-22.2S51.4,15.9,51.4,15.9Z" style="fill: #fff"/>
<path d="M49.3,35.8c-.8,1.8-2,11.3,7.3,13.8s13.1-4.9,13.6-10.4-6.9-4.9-10.6-5.1S50.5,33.2,49.3,35.8Z" style="fill: #fff"/>
<path d="M24.3,27.7s-2.2,5.1-2.2,6.3.7,6,1.8,7.4,7,3.4,7.5,3.4,9.3-.2,12-8.3-17.2-9.6-17.2-9.6Z" style="fill: #fff"/>
<path d="M69.7,26.4c10-16.9-30-22.5-40.8-11.5-2.6,2.7,2.6,15.4,7,11,.5-.8.7-1.5,1.3-2.4,4-6.3,7.1-6.4,13.5-5.8,9.1-.1,10.1.3,14.8,9.2C65.9,27.7,69.4,26.7,69.7,26.4Z"/>
<path d="M39.7,91h-.1C31.3,77.7,29,60.4,30.2,45c.1-1.2,3.7-.2,4.6-.1-.6,13.7.5,45.9,17.8,48.1a10.3,10.3,0,0,0,9.9-6.3c3.6-12-5.6-26.6,4.9-36.9h0c1.9-2.1,5.4.5,3.6,2.8s-2.9,3.6-3.5,5.9c-3.1,9.2,2.8,18.9-.1,28.1s-16.1,14.3-24.3,7.7h0" style="fill: #ed6b21"/>
<path d="M57.9,22.7C56,18,49.5,16.2,45.4,19.1l-.9,1a45.2,45.2,0,0,0-4.7-1.8c3.9-5.8,12.2-6.5,17.9-3l2.5,2.4h0A13.1,13.1,0,0,1,63,26.9a22.2,22.2,0,0,0-4.9-1.8c.1,0,.3,0,.3-.1A15.5,15.5,0,0,0,57.9,22.7Z" style="fill: #ed6b21"/>
<path d="M43.1,94.3l.6.4Z" style="fill: #b6d2fb"/>
<path d="M42.8,94.1l.3.2Z" style="fill: #b6d2fb"/>
<path d="M42.2,93.5v0Z" style="fill: #b6d2fb"/>
<path d="M54.7,14h0Z" style="fill: #b6d2fb"/>
<path d="M54.1,13.8a.1.1,0,0,0-.1-.1A.1.1,0,0,1,54.1,13.8Z" style="fill: #b6d2fb"/>
<path d="M42.2,71.1c-.8-2.9-4.1-22,2.6-18.1,1.9,2.2.1,5.8.6,8.5.6,4.2.2,10.6,4.7,12.5,6.7.5,3-8.6,2.9-12.4s-.2-6.8-.2-10.1a4.7,4.7,0,0,0-.3-2.6c3.1,1.8,5.1,1.7,8.9,2.1-6.5.8-.4,17.8-3.3,22.9C54.6,81.8,43.8,78.8,42.2,71.1Z" style="fill: #ed6b21"/>
<path d="M55.2,37.1c5.6-3.2,10.7,5.4,5.1,8.7S49.6,40.4,55.2,37.1Z"/>
<path d="M38.7,29c-1.5.3-2.9-1.1-4.2-1.4L36,23.7c1.9,0,3.7-.5,5.6-.1C40.4,24.8,39.4,27.5,38.7,29Z" style="fill: #ed6b21"/>
<path d="M57.6,30l2.9,1.3,1.7,1.1a.6.6,0,0,0-.7.7c-.2,1.1-.2,1.1-1.3.8l-3-.6h-.6Z" style="fill: #ed6b21"/>
<path d="M53.4,38.8c-1.5,3.5,1.4,9,5.7,7.4C54.5,48,50.8,42.3,53.4,38.8Z" style="fill: #ccc"/>
<path d="M62.6,32.7l.6.6Z" style="fill: #909097"/>
<path d="M64.2,33.6h0Z" style="fill: #909097"/>
<path d="M63.3,33.3l.6.3Z" style="fill: #909097"/>
<path d="M65.8,33.4l.3-.2Z" style="fill: #909097"/>
<path d="M66.6,29.9v0Z" style="fill: #909097"/>
<path d="M66.6,32.5l.2-.2Z" style="fill: #909097"/>
<path d="M65.3,33.6h0Z" style="fill: #909097"/>
<path d="M57.9,22.7a.3.3,0,0,0,.1.2A.3.3,0,0,1,57.9,22.7Z" style="fill: #90bdfe"/>
<path d="M57.7,22.2v0Z" style="fill: #90bdfe"/>
<path d="M46.2,20.8h0Z" style="fill: #909097"/>
<path d="M46.3,22.4h0Z" style="fill: #909097"/>
<path d="M66.9,31.9v0Z" style="fill: #909097"/>
<path d="M42.4,23.7h0Z" style="fill: #909097"/>
<path d="M31,32.6c5.3-3.9,11.4,4.2,6,7.9s-10.9-3.8-6.2-7.8Z"/>
<path d="M29.4,34.5a5.9,5.9,0,0,0,6.3,6.8A5.1,5.1,0,0,1,29.4,34.5Z" style="fill: #c9c9c9"/>
<path d="M37.7,43.3l1.4-.6-.3.4H37.7Z" style="fill: #909097"/>
<path d="M35.2,64.1a.4.4,0,0,1,.1.3A.4.4,0,0,0,35.2,64.1Z" style="fill: #b6d2fb"/>
<path d="M39.1,42.7l.8-.4Z" style="fill: #909097"/>
<path d="M41.9,70v0Z" style="fill: #b6d2fb"/>
<path d="M42.4,38.8v0Z" style="fill: #b6d2fb"/>
<path d="M41.8,69.4v0Z" style="fill: #b6d2fb"/>
<path d="M42.5,38.3v0Z" style="fill: #b6d2fb"/>
<path d="M42.6,36.2v0Z" style="fill: #b6d2fb"/>
<path d="M38.6,43.2h0Z" style="fill: #b6d2fb"/>
<path d="M42.2,71.1v0Z" style="fill: #b6d2fb"/>
<path d="M58.6,72.1v0Z" style="fill: #b6d2fb"/>
<path d="M74.5,36.3c-6.3-1.7-12.8-3.3-19.3-3.6-3.2.3-6.3,1-9.4-.3-6.3-3.4-13.2-6.5-20.5-6.2a19.8,19.8,0,0,1-3.5-.3c-.4,1.4-.1.1-.6,2a7.3,7.3,0,0,1,.6,2.1c-.9,4.3-.8,10,3.1,12.9a11.7,11.7,0,0,0,15.9-1.3c.8-.8,1.3-1.8,2-2.6s1.6-3.1,3.2-2.9a2.5,2.5,0,0,1,2.1,2.4c.3,3.8,1,8.4,4.4,10.7,8.4,4.1,15,2.3,18-7a5.2,5.2,0,0,1,3.8-3.1C74.8,38.7,74.5,37,74.5,36.3ZM42.8,35.2c-1.2,4.6-5.6,8.8-10.5,8.9s-9.1-2.1-9.5-6.6.7-9.3,4.7-9.8S43,29.7,42.8,35.2Zm26.5,5.1c-.4,5-4.6,10.2-10,9.2-3.9-.6-8.3-2.7-9.2-6.8s-.8-8.2,5.2-8.2C58.7,34.5,69.3,34.3,69.3,40.3Z"/>
<path d="M69.1,26.9c7-20-29.5-19.9-40.4-11.8C33.2,4.8,48.2-.5,58.3,4.1,65.9,8.2,78.2,19.9,69.1,26.9Z" style="fill: #4e595f"/>
<path d="M39.8,18.3c2.5.7,6.9.3,6.5,4s-4,1.2-6,1.1C30.9,25.9,30.4,17.8,39.8,18.3Z" style="fill: #4e595f"/>
<path d="M57.8,24.8c3.4.8,11.2,3.6,9.3,8s-6.3-2.4-9.7-2.7S53.1,23.6,57.8,24.8Z" style="fill: #4e595f"/>
</svg>

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
sodipodi:docname="notification_documentation.svg"
xml:space="preserve"
style="enable-background:new 0 0 100 100;"
viewBox="0 0 100 100"
y="0px"
x="0px"
id="minimalize_window"
version="1.1"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
inkscape:current-layer="minimalize_window"
inkscape:window-maximized="1"
inkscape:window-y="-8"
inkscape:window-x="-8"
inkscape:cy="50"
inkscape:cx="50"
inkscape:zoom="10.08"
showgrid="false"
id="namedview19"
inkscape:window-height="1377"
inkscape:window-width="2560"
inkscape:pageshadow="2"
inkscape:pageopacity="0"
guidetolerance="10"
gridtolerance="10"
objecttolerance="10"
borderopacity="1"
bordercolor="#666666"
pagecolor="#ffffff" />
<style
id="style2"
type="text/css">
.st0{fill:#ED6B21;}
.st1{fill:#EB6B21;}
.st2{fill:none;stroke:#ED6B21;stroke-width:2.8346;stroke-miterlimit:10;}
</style>
<g
id="g6">
<path
id="path4"
d="M80,92.8H20c-7.1,0-12.8-5.8-12.8-12.8V20c0-7.1,5.8-12.8,12.8-12.8h60c7.1,0,12.8,5.8,12.8,12.8v60 C92.8,87.1,87.1,92.8,80,92.8z M20,12.8c-4,0-7.2,3.2-7.2,7.2v60c0,3.9,3.2,7.2,7.2,7.2h60c3.9,0,7.2-3.2,7.2-7.2V20 c0-4-3.2-7.2-7.2-7.2H20z"
class="st0" />
</g>
<g
id="g10">
<path
id="path8"
d="M31.9,67.7H65c0.1,0,0.2,0,0.3,0c0,0,0,0,0,0c0.7,0,1.3-0.6,1.3-1.3V47.9C57.1,50.8,51.6,43.4,47,36 c-1.8-2.7,2-4.6,2.8-7.1H33.9h-2c-3.4,0-6.2,2.8-6.2,6.2c0,0,0,0.1,0,0.1c0,3.1,0,32.1,0,35.9c0,0.1,0,0.1,0,0.2 c0,3.3,2.6,6,5.8,6.2c0.1,0,0.1,0,0.2,0h33.6c0.7,0,1.3-0.6,1.3-1.3v-4.8c0-0.7-0.6-1.3-1.3-1.3c-0.7,0-1.3,0.6-1.3,1.3v3.5H31.9 c-1.9,0-3.5-1.5-3.6-3.5c0,0,0-0.1,0-0.1c0-0.1,0-0.1,0-0.3C28.4,69.2,29.9,67.7,31.9,67.7z M32.7,35.1c0-0.7,0.6-1.3,1.3-1.3 c0.7,0,1.3,0.6,1.3,1.3v26c0,0.7-0.6,1.3-1.3,1.3c-0.7,0-1.3-0.6-1.3-1.3V35.1z"
class="st1" />
</g>
<polygon
id="polygon12"
points="71.1,19.8 54.9,19.8 46.9,33.8 54.9,47.8 71.1,47.8 79.2,33.8 "
class="st2" />
<g
id="g16">
<path
id="path14"
d="M59.6,31.6c1.6-0.4,2.9-0.6,3.8-0.6c0.6,0,1,0.1,1.4,0.3c0.3,0.2,0.5,0.5,0.5,1c0,0.2,0,0.4-0.1,0.5l-1.7,8.3 c0,0.2-0.1,0.4-0.1,0.5c0,0.4,0.1,0.6,0.4,0.7c0.3,0.1,0.8,0.2,1.6,0.2l-0.1,0.6c-1.5,0.4-2.7,0.6-3.6,0.6c-0.7,0-1.2-0.1-1.5-0.4 c-0.4-0.3-0.5-0.6-0.5-1.2c0-0.2,0-0.6,0.1-0.9l1.6-7.6c0.1-0.4,0.1-0.6,0.1-0.7c0-0.2-0.1-0.4-0.3-0.5s-0.8-0.1-1.7-0.1L59.6,31.6 z M66.2,26.3c0,0.6-0.2,1.1-0.6,1.5s-0.8,0.6-1.4,0.6c-0.5,0-1-0.2-1.3-0.5s-0.5-0.8-0.5-1.3c0-0.6,0.2-1.1,0.6-1.5 c0.4-0.4,0.8-0.5,1.4-0.5c0.5,0,1,0.2,1.3,0.5C66,25.3,66.2,25.7,66.2,26.3z"
class="st0" />
</g>
<path
id="path25"
d="M 18.75,92.696085 C 16.846525,92.418222 15.645289,92.057103 14.248486,91.342827 10.768164,89.563113 8.3399658,86.370876 7.4768461,82.440476 7.2982304,81.627112 7.2916667,80.477245 7.2916667,50 c 0,-30.186048 0.00806,-31.633856 0.1805113,-32.417478 C 8.6132236,12.397531 12.392318,8.6115694 17.559524,7.4768461 18.372888,7.2982304 19.522755,7.2916667 50,7.2916667 c 30.186048,0 31.633856,0.00806 32.417478,0.1805113 3.232976,0.7114715 5.949953,2.4425305 7.826838,4.98669 1.078165,1.461476 1.917759,3.360629 2.286745,5.172592 0.168029,0.825133 0.177272,2.515491 0.177272,32.418143 0,30.365281 -0.0069,31.579027 -0.184138,32.385657 -0.592788,2.697863 -1.665191,4.687627 -3.53325,6.555685 -1.820587,1.820588 -3.639881,2.823244 -6.352056,3.500774 l -0.843254,0.210654 -31.39881,0.01496 C 33.12748,92.725556 18.886409,92.716002 18.75,92.696085 Z m 63.033409,-5.68899 c 2.670161,-0.682912 4.81496,-2.945768 5.315692,-5.608285 0.08202,-0.436105 0.104156,-8.923253 0.08281,-31.746032 L 87.152778,18.501984 86.882499,17.708333 C 86.496691,16.575445 85.97299,15.736341 85.118324,14.881675 84.26366,14.02701 83.424556,13.503308 82.291667,13.117501 L 81.498016,12.847222 H 50 18.501984 l -0.793651,0.270279 c -1.132888,0.385807 -1.971992,0.909509 -2.826658,1.764174 -0.854665,0.854666 -1.378367,1.69377 -1.764174,2.826658 l -0.270279,0.793651 -0.02736,31.200397 c -0.0307,35.008562 -0.09842,31.873352 0.723863,33.513124 0.958398,1.911204 2.60508,3.255124 4.642945,3.789286 0.689685,0.180778 1.691694,0.186837 31.772663,0.192128 30.5793,0.0054 31.07235,0.0024 31.82408,-0.189824 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path27"
d="M 31.10119,77.410956 C 29.236131,77.16359 27.26527,75.760742 26.456573,74.104943 25.743058,72.644028 25.793651,74.24 25.793651,53.192882 c 0,-21.105337 -0.05179,-19.498035 0.673442,-20.901215 0.516693,-0.999701 1.719795,-2.185863 2.699574,-2.661563 1.41717,-0.688061 1.004089,-0.66185 10.430458,-0.66185 h 8.503851 l 3.004296,-5.257937 3.004296,-5.257936 h 8.891965 8.891965 l 4.392702,7.595571 c 2.415987,4.177565 4.398432,7.65483 4.405434,7.727255 0.007,0.07243 -1.973876,3.572492 -4.401951,7.777925 l -4.414683,7.646241 -2.65377,0.0035 -2.65377,0.0035 v 8.690364 c 0,9.52089 0.02413,9.12352 -0.578983,9.532993 -0.251764,0.17093 -1.088238,0.181768 -17.674985,0.229024 l -17.410714,0.0496 -0.545635,0.26067 c -0.808178,0.386097 -1.334723,0.894639 -1.70493,1.646635 -0.956715,1.943364 -0.03137,4.335797 1.966064,5.083131 0.535211,0.200248 0.68474,0.202025 17.004492,0.202025 h 16.464533 v -1.970748 c 0,-1.848306 0.01287,-1.987112 0.207172,-2.234125 0.246407,-0.313256 0.686109,-0.557032 1.004726,-0.557032 0.370158,0 0.891455,0.335976 1.086984,0.700561 0.162558,0.303108 0.181276,0.610677 0.181276,2.978657 0,2.58018 -0.0052,2.648365 -0.225191,2.977738 -0.123856,0.1854 -0.380553,0.415147 -0.570437,0.510549 -0.32502,0.163295 -1.341884,0.172595 -17.359134,0.158746 -9.357638,-0.0081 -17.147817,-0.03247 -17.311508,-0.05418 z m 3.7961,-15.349752 0.370567,-0.339589 0.02942,-13.474895 c 0.03317,-15.191489 0.09901,-13.919802 -0.741808,-14.326836 -0.714682,-0.345971 -1.475711,-0.06077 -1.77979,0.666999 -0.209076,0.500389 -0.203248,26.569953 0.0061,27.070877 0.19169,0.458779 0.677232,0.742196 1.272308,0.742663 0.400151,2.97e-4 0.529552,-0.05174 0.843254,-0.339219 z m 39.069271,-21.92944 c 1.987042,-3.435962 3.612804,-6.287187 3.612804,-6.336054 0,-0.04887 -1.638286,-2.918428 -3.640635,-6.376803 l -3.640635,-6.287955 -7.296865,10e-4 -7.296865,0.001 -3.521825,6.16072 c -1.937004,3.388396 -3.561749,6.244218 -3.610545,6.346273 -0.07048,0.147404 0.651296,1.481256 3.510617,6.487682 l 3.599337,6.302129 7.335903,-0.02543 7.335903,-0.02543 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path29"
d="m 60.760765,43.552387 c -0.165409,-0.05195 -0.442153,-0.232699 -0.614986,-0.401675 -0.568258,-0.555577 -0.556378,-0.699058 0.458545,-5.537922 0.499397,-2.380983 0.907009,-4.491004 0.905804,-4.688936 -0.0031,-0.504502 -0.187277,-0.612246 -1.131453,-0.661803 l -0.817141,-0.04289 0.04188,-0.285344 c 0.04934,-0.336185 0.171481,-0.37906 1.942233,-0.681785 1.404394,-0.240093 2.132279,-0.2524 2.821555,-0.04771 0.613954,0.182325 0.859926,0.494928 0.849606,1.079751 -0.0039,0.222429 -0.415921,2.361006 -0.915544,4.752394 -0.885195,4.236877 -0.985384,4.85158 -0.830464,5.09522 0.114081,0.179414 0.50949,0.301375 1.225775,0.378083 0.616868,0.06606 0.646862,0.08131 0.603738,0.306901 -0.04922,0.257458 -0.168385,0.303858 -1.51063,0.588184 -0.90986,0.192734 -2.619763,0.276018 -3.028918,0.147529 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path31"
d="m 63.669778,28.27496 c -0.763916,-0.230278 -1.194145,-0.869586 -1.183525,-1.758685 0.0075,-0.627237 0.328621,-1.275203 0.77853,-1.570898 0.617142,-0.405606 1.675768,-0.348886 2.29435,0.122929 1.508376,1.150494 -0.03285,3.766287 -1.889355,3.206654 z"
style="fill:#ed6b21;stroke-width:0.0992064" /></svg>

After

Width:  |  Height:  |  Size: 8.0 KiB

View File

@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="minimalize_window"
x="0px"
y="0px"
viewBox="0 0 100 100"
style="enable-background:new 0 0 100 100;"
xml:space="preserve"
sodipodi:docname="notification_documentation_hover.svg"
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"><metadata
id="metadata23"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
id="defs21" /><sodipodi:namedview
inkscape:document-rotation="0"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="2560"
inkscape:window-height="1377"
id="namedview19"
showgrid="false"
inkscape:zoom="10.08"
inkscape:cx="50"
inkscape:cy="50"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="minimalize_window" />
<style
type="text/css"
id="style2">
.st0{fill:#ED6B21;}
.st1{fill:#EB6B21;}
.st2{fill:none;stroke:#ED6B21;stroke-width:2.8346;stroke-miterlimit:10;}
</style>
<g
id="g6"
transform="matrix(1.15,0,0,1.15,-7.5,-7.5)">
<path
class="st0"
d="M 80,92.8 H 20 C 12.9,92.8 7.2,87 7.2,80 V 20 C 7.2,12.9 13,7.2 20,7.2 h 60 c 7.1,0 12.8,5.8 12.8,12.8 v 60 c 0,7.1 -5.7,12.8 -12.8,12.8 z m -60,-80 c -4,0 -7.2,3.2 -7.2,7.2 v 60 c 0,3.9 3.2,7.2 7.2,7.2 h 60 c 3.9,0 7.2,-3.2 7.2,-7.2 V 20 C 87.2,16 84,12.8 80,12.8 Z"
id="path4" />
</g>
<g
id="g10"
transform="matrix(1.15,0,0,1.15,-7.5,-7.5)">
<path
class="st1"
d="M 31.9,67.7 H 65 c 0.1,0 0.2,0 0.3,0 0,0 0,0 0,0 0.7,0 1.3,-0.6 1.3,-1.3 V 47.9 C 57.1,50.8 51.6,43.4 47,36 c -1.8,-2.7 2,-4.6 2.8,-7.1 h -15.9 -2 c -3.4,0 -6.2,2.8 -6.2,6.2 0,0 0,0.1 0,0.1 0,3.1 0,32.1 0,35.9 0,0.1 0,0.1 0,0.2 0,3.3 2.6,6 5.8,6.2 0.1,0 0.1,0 0.2,0 h 33.6 c 0.7,0 1.3,-0.6 1.3,-1.3 v -4.8 c 0,-0.7 -0.6,-1.3 -1.3,-1.3 -0.7,0 -1.3,0.6 -1.3,1.3 v 3.5 H 31.9 c -1.9,0 -3.5,-1.5 -3.6,-3.5 0,0 0,-0.1 0,-0.1 0,-0.1 0,-0.1 0,-0.3 0.1,-1.8 1.6,-3.3 3.6,-3.3 z m 0.8,-32.6 c 0,-0.7 0.6,-1.3 1.3,-1.3 0.7,0 1.3,0.6 1.3,1.3 v 26 c 0,0.7 -0.6,1.3 -1.3,1.3 -0.7,0 -1.3,-0.6 -1.3,-1.3 z"
id="path8" />
</g>
<polygon
class="st2"
points="54.9,19.8 46.9,33.8 54.9,47.8 71.1,47.8 79.2,33.8 71.1,19.8 "
id="polygon12"
transform="matrix(1.15,0,0,1.15,-7.5,-7.5)" />
<g
id="g16"
transform="matrix(1.15,0,0,1.15,-7.5,-7.5)">
<path
class="st0"
d="m 59.6,31.6 c 1.6,-0.4 2.9,-0.6 3.8,-0.6 0.6,0 1,0.1 1.4,0.3 0.3,0.2 0.5,0.5 0.5,1 0,0.2 0,0.4 -0.1,0.5 l -1.7,8.3 c 0,0.2 -0.1,0.4 -0.1,0.5 0,0.4 0.1,0.6 0.4,0.7 0.3,0.1 0.8,0.2 1.6,0.2 l -0.1,0.6 c -1.5,0.4 -2.7,0.6 -3.6,0.6 -0.7,0 -1.2,-0.1 -1.5,-0.4 -0.4,-0.3 -0.5,-0.6 -0.5,-1.2 0,-0.2 0,-0.6 0.1,-0.9 l 1.6,-7.6 c 0.1,-0.4 0.1,-0.6 0.1,-0.7 0,-0.2 -0.1,-0.4 -0.3,-0.5 -0.2,-0.1 -0.8,-0.1 -1.7,-0.1 z m 6.6,-5.3 c 0,0.6 -0.2,1.1 -0.6,1.5 -0.4,0.4 -0.8,0.6 -1.4,0.6 -0.5,0 -1,-0.2 -1.3,-0.5 -0.3,-0.3 -0.5,-0.8 -0.5,-1.3 0,-0.6 0.2,-1.1 0.6,-1.5 0.4,-0.4 0.8,-0.5 1.4,-0.5 0.5,0 1,0.2 1.3,0.5 0.3,0.2 0.5,0.6 0.5,1.2 z"
id="path14" />
</g>
<path
id="path15"
d="M 14.048833,99.095468 C 10.758797,98.776287 7.5585129,97.246225 5.156144,94.843856 2.702378,92.39009 1.2229673,89.248663 0.90064133,85.807586 c -0.14895496,-1.590207 -0.14895496,-70.024965 0,-71.615172 C 1.5626661,7.1247937 7.1461659,1.5575143 14.236111,0.89568416 c 1.551488,-0.14482788 70.023035,-0.14008542 71.571475,0.004957 4.714923,0.44164734 8.90055,3.11165724 11.36025,7.24669874 1.053844,1.7716328 1.752116,4.0052851 1.940273,6.2065901 0.07688,0.899426 0.09971,11.568412 0.07809,36.489324 -0.02915,33.604835 -0.03884,35.26143 -0.211522,36.160714 -0.593346,3.090004 -1.947825,5.664097 -4.12722,7.843492 -2.179385,2.179385 -4.753372,3.533814 -7.843492,4.127235 -0.900554,0.172942 -2.523851,0.181552 -36.507936,0.193651 -19.561012,0.007 -35.962251,-0.02583 -36.447199,-0.07288 z m 71.469642,-6.342539 c 3.509574,-0.435077 6.434988,-3.150322 7.155917,-6.641818 0.109946,-0.532474 0.133148,-6.842325 0.133148,-36.210317 V 14.335317 L 92.58317,13.492063 C 91.76058,10.400506 89.599494,8.2394197 86.507937,7.4168301 L 85.664683,7.1924603 H 50 14.335317 L 13.492063,7.4168301 C 10.424882,8.2329338 8.2941745,10.346391 7.4172519,13.44246 l -0.2247916,0.793651 -0.029436,35.119048 c -0.020768,24.777514 0.00225,35.396574 0.078183,36.061508 0.432718,3.78947 3.4199857,6.848151 7.1628477,7.334081 0.970581,0.12601 70.098451,0.128129 71.114421,0.0022 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path17"
d="m 27.402334,81.347356 c -2.46563,-0.645993 -4.441405,-2.667097 -5.08098,-5.19755 -0.195316,-0.772763 -0.198338,-1.11524 -0.198338,-22.479171 0,-21.262694 0.0039,-21.709667 0.195519,-22.458924 0.630167,-2.46393 2.411238,-4.32372 4.963211,-5.182573 0.512441,-0.172459 1.154556,-0.186717 10.55483,-0.23436 l 10.009195,-0.05073 3.433266,-6.023277 3.433265,-6.023276 10.227283,-0.0035 10.227284,-0.0035 4.947674,8.556548 c 2.72122,4.706101 5.022042,8.690476 5.112937,8.854166 l 0.165263,0.29762 -5.085935,8.779761 -5.085937,8.779762 -3.085249,0.02621 -3.08525,0.02621 -0.02618,10.15999 c -0.02599,10.086364 -0.02766,10.161975 -0.230721,10.433928 -0.112498,0.150664 -0.327816,0.365981 -0.478485,0.478479 l -0.273943,0.204542 -20.007625,0.0496 -20.007626,0.0496 -0.64532,0.30517 c -0.863407,0.408303 -1.610615,1.150455 -2.012489,1.998871 -0.297084,0.627187 -0.318048,0.74183 -0.313398,1.713816 0.0041,0.850376 0.04647,1.141866 0.230898,1.587301 0.503415,1.215869 1.462305,2.105354 2.676354,2.482637 0.61847,0.1922 0.988675,0.195935 19.419643,0.195935 h 18.789153 v -2.217472 c 0,-2.136287 0.0082,-2.229479 0.223214,-2.545442 0.333394,-0.489856 0.678773,-0.704629 1.143441,-0.711041 0.472685,-0.0065 0.949227,0.238892 1.251943,0.644742 0.200471,0.26877 0.209871,0.405024 0.236118,3.422619 0.02536,2.915086 0.01385,3.167854 -0.15889,3.489927 -0.102423,0.190972 -0.33338,0.447669 -0.513236,0.570437 l -0.327012,0.223214 -19.950606,-0.0055 c -19.303761,-0.0053 -19.974038,-0.0116 -20.673273,-0.194797 z m 4.918865,-17.249815 c 0.21646,-0.110429 0.46075,-0.351687 0.591286,-0.583944 l 0.222436,-0.395771 -0.0016,-15.313873 -0.0016,-15.313874 -0.221583,-0.386498 c -0.57383,-1.000911 -2.022858,-1.00842 -2.605918,-0.0135 l -0.244632,0.417435 V 47.812673 63.11783 l 0.209179,0.372185 c 0.407473,0.725 1.302779,0.990007 2.052496,0.60753 z M 76.611628,40.277778 c 1.786692,-3.082838 3.676401,-6.349242 4.199352,-7.258677 l 0.95082,-1.653518 -4.19361,-7.250805 -4.193609,-7.250805 -8.434517,0.02535 -8.434516,0.02536 -4.093798,7.142857 c -2.547059,4.444106 -4.082321,7.220788 -4.063423,7.349119 0.03558,0.241604 8.073435,14.342072 8.237262,14.45028 0.06096,0.04027 3.86084,0.06259 8.444173,0.0496 l 8.333333,-0.02361 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path19"
d="m 62.103975,42.442311 c -0.622813,-0.321464 -0.893312,-0.762703 -0.895015,-1.459958 -8.07e-4,-0.330477 0.427325,-2.594263 1.056162,-5.58455 1.288645,-6.127847 1.317398,-5.681554 -0.373774,-5.801597 -0.808155,-0.05736 -0.87932,-0.07931 -0.877924,-0.270784 0.0028,-0.3827 0.164573,-0.474726 1.244533,-0.707914 2.655322,-0.573345 4.18941,-0.539022 4.89721,0.109569 0.324612,0.297458 0.354127,0.36998 0.347372,0.853564 -0.0041,0.290667 -0.461556,2.693665 -1.01666,5.339994 -0.555103,2.646329 -1.036614,5.017302 -1.070022,5.268827 -0.11023,0.829884 0.170767,1.055853 1.449222,1.165421 l 0.744048,0.06377 -0.03233,0.296879 c -0.01778,0.163282 -0.0401,0.303981 -0.0496,0.312662 -0.0095,0.0087 -0.552989,0.138865 -1.207751,0.289294 -0.864367,0.198586 -1.54376,0.284648 -2.480158,0.314172 -1.198015,0.03777 -1.321357,0.02431 -1.735311,-0.189347 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
id="path21"
d="m 65.653905,25.00115 c -1.412607,-0.425822 -1.792539,-2.40789 -0.681087,-3.553165 0.738955,-0.761443 1.931874,-0.828272 2.893189,-0.16208 0.479355,0.332193 0.68558,0.775979 0.68558,1.47533 0,0.66711 -0.157427,1.080128 -0.606778,1.591911 -0.565433,0.643992 -1.462474,0.897729 -2.290904,0.648004 z"
style="fill:#ed6b21;stroke-width:0.0992064" /><path
style="fill:#000000;fill-opacity:0;stroke-width:0.0992064"
d="m 56.2668,45.16369 c -0.213828,-0.368303 -2.006867,-3.504464 -3.984532,-6.969246 -1.977664,-3.464781 -3.665189,-6.419326 -3.750055,-6.565655 -0.152861,-0.263568 -0.115931,-0.333262 3.955354,-7.464657 l 4.109655,-7.198605 8.365484,0.02418 8.365485,0.02418 4.155528,7.183237 c 2.414733,4.174103 4.125947,7.233027 4.084913,7.302091 -0.03884,0.06537 -1.922726,3.317288 -4.186416,7.226485 l -4.115798,7.107631 h -8.305421 -8.30542 z m 9.060581,-2.54511 c 0.381944,-0.07091 1.057974,-0.209062 1.502288,-0.307016 0.805389,-0.177555 0.808018,-0.179166 0.864998,-0.530295 0.03143,-0.193709 0.03824,-0.371112 0.01513,-0.394228 -0.02312,-0.02312 -0.390044,-0.07712 -0.815395,-0.120015 -1.267326,-0.127799 -1.521223,-0.342968 -1.372926,-1.163511 0.03691,-0.204255 0.516108,-2.536551 1.064875,-5.18288 0.548766,-2.646329 1.016471,-4.990079 1.039344,-5.208333 0.128191,-1.223204 -1.101585,-1.796204 -3.302095,-1.538575 -0.912954,0.106886 -3.201538,0.552099 -3.289335,0.639896 -0.02147,0.02147 -0.06257,0.214441 -0.09132,0.428823 l -0.05228,0.389786 0.967632,0.05773 c 1.140886,0.06807 1.29529,0.164771 1.268794,0.79465 -0.0097,0.229992 -0.467226,2.546734 -1.016782,5.148317 -1.027858,4.865846 -1.126212,5.58727 -0.843081,6.183925 0.142543,0.300386 0.665851,0.741863 1.034364,0.872619 0.292418,0.103755 2.343938,0.05569 3.025794,-0.07089 z M 67.07349,25.083729 c 0.915135,-0.311219 1.577304,-1.268088 1.577304,-2.279289 0,-0.651129 -0.118532,-1.027765 -0.428235,-1.360722 -0.523722,-0.563041 -1.606209,-0.838493 -2.42525,-0.617133 -1.308437,0.353627 -1.971739,2.041196 -1.30878,3.329792 0.438649,0.852604 1.590098,1.265685 2.584961,0.927352 z"
id="path18" /><path
id="path20"
d="m 56.2668,45.16369 c -0.213828,-0.368303 -2.006867,-3.504464 -3.984532,-6.969246 -1.977664,-3.464781 -3.665189,-6.419326 -3.750055,-6.565655 -0.152861,-0.263568 -0.115931,-0.333262 3.955354,-7.464657 l 4.109655,-7.198605 8.365484,0.02418 8.365485,0.02418 4.155528,7.183237 c 2.414733,4.174103 4.125947,7.233027 4.084913,7.302091 -0.03884,0.06537 -1.922726,3.317288 -4.186416,7.226485 l -4.115798,7.107631 h -8.305421 -8.30542 z m 9.060581,-2.54511 c 0.381944,-0.07091 1.057974,-0.209062 1.502288,-0.307016 0.805389,-0.177555 0.808018,-0.179166 0.864998,-0.530295 0.03143,-0.193709 0.03824,-0.371112 0.01513,-0.394228 -0.02312,-0.02312 -0.390044,-0.07712 -0.815395,-0.120015 -1.267326,-0.127799 -1.521223,-0.342968 -1.372926,-1.163511 0.03691,-0.204255 0.516108,-2.536551 1.064875,-5.18288 0.548766,-2.646329 1.016471,-4.990079 1.039344,-5.208333 0.128191,-1.223204 -1.101585,-1.796204 -3.302095,-1.538575 -0.912954,0.106886 -3.201538,0.552099 -3.289335,0.639896 -0.02147,0.02147 -0.06257,0.214441 -0.09132,0.428823 l -0.05228,0.389786 0.967632,0.05773 c 1.140886,0.06807 1.29529,0.164771 1.268794,0.79465 -0.0097,0.229992 -0.467226,2.546734 -1.016782,5.148317 -1.027858,4.865846 -1.126212,5.58727 -0.843081,6.183925 0.142543,0.300386 0.665851,0.741863 1.034364,0.872619 0.292418,0.103755 2.343938,0.05569 3.025794,-0.07089 z M 67.07349,25.083729 c 0.915135,-0.311219 1.577304,-1.268088 1.577304,-2.279289 0,-0.651129 -0.118532,-1.027765 -0.428235,-1.360722 -0.523722,-0.563041 -1.606209,-0.838493 -2.42525,-0.617133 -1.308437,0.353627 -1.971739,2.041196 -1.30878,3.329792 0.438649,0.852604 1.590098,1.265685 2.584961,0.927352 z"
style="fill:#000000;fill-opacity:0;stroke-width:0.0992064" /></svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -124,32 +124,34 @@ namespace ImGui
const char ColorMarkerEnd = 0x3; // ETX
// Special ASCII characters are used here as an ikons markers
const char PrintIconMarker = 0x4;
const char PrinterIconMarker = 0x5;
const char PrinterSlaIconMarker = 0x6;
const char FilamentIconMarker = 0x7;
const char MaterialIconMarker = 0x8;
const char CloseNotifButton = 0xB;
const char CloseNotifHoverButton = 0xC;
const char MinimalizeButton = 0xE;
const char MinimalizeHoverButton = 0xF;
const char WarningMarker = 0x10;
const char ErrorMarker = 0x11;
const char EjectButton = 0x12;
const char EjectHoverButton = 0x13;
const char CancelButton = 0x14;
const char CancelHoverButton = 0x15;
const char VarLayerHeightMarker = 0x16;
const wchar_t PrintIconMarker = 0x4;
const wchar_t PrinterIconMarker = 0x5;
const wchar_t PrinterSlaIconMarker = 0x6;
const wchar_t FilamentIconMarker = 0x7;
const wchar_t MaterialIconMarker = 0x8;
const wchar_t CloseNotifButton = 0xB;
const wchar_t CloseNotifHoverButton = 0xC;
const wchar_t MinimalizeButton = 0xE;
const wchar_t MinimalizeHoverButton = 0xF;
const wchar_t WarningMarker = 0x10;
const wchar_t ErrorMarker = 0x11;
const wchar_t EjectButton = 0x12;
const wchar_t EjectHoverButton = 0x13;
const wchar_t CancelButton = 0x14;
const wchar_t CancelHoverButton = 0x15;
const wchar_t VarLayerHeightMarker = 0x16;
const char RightArrowButton = 0x18;
const char RightArrowHoverButton = 0x19;
const char PreferencesButton = 0x1A;
const char PreferencesHoverButton = 0x1B;
const char SinkingObjectMarker = 0x1C;
const char CustomSupportsMarker = 0x1D;
const char CustomSeamMarker = 0x1E;
const char MmuSegmentationMarker = 0x1F;
const wchar_t RightArrowButton = 0x18;
const wchar_t RightArrowHoverButton = 0x19;
const wchar_t PreferencesButton = 0x1A;
const wchar_t PreferencesHoverButton = 0x1B;
const wchar_t SinkingObjectMarker = 0x1C;
const wchar_t CustomSupportsMarker = 0x1D;
const wchar_t CustomSeamMarker = 0x1E;
const wchar_t MmuSegmentationMarker = 0x1F;
const wchar_t DocumentationButton = 0x2600;
const wchar_t DocumentationHoverButton = 0x2601;
const wchar_t ClippyMarker = 0x2602;
// void MyFunction(const char* name, const MyMatrix44& v);

View File

@ -31,9 +31,9 @@ inline void push_style_color(ImGuiCol idx, const ImVec4& col, bool fading_out, f
ImGui::PushStyleColor(idx, col);
}
// return true if NOT in disabled mode.
inline bool disabled_modes_check(const std::string& disabled_modes)
inline bool mode_and_tech_check(const std::string& disabled_mode, const std::string& preferred_mode, const std::string& disabled_tech, const std::string& preferred_tech)
{
if (disabled_modes.empty())
if (disabled_mode.empty() && preferred_mode.empty() && disabled_tech.empty() && preferred_tech.empty())
return true;
// simple / advanced / expert
@ -43,19 +43,37 @@ inline bool disabled_modes_check(const std::string& disabled_modes)
else if (config_mode == ConfigOptionMode::comAdvanced) mode_name = "advanced";
else if (config_mode == ConfigOptionMode::comExpert) mode_name = "expert";
if (!mode_name.empty() && disabled_modes.find(mode_name) != std::string::npos)
if (!preferred_mode.empty() && !mode_name.empty() && preferred_mode.find(mode_name) == std::string::npos)
return false;
if (!mode_name.empty() && disabled_mode.find(mode_name) != std::string::npos)
return false;
// fff / sla
// tchnology
const PrinterTechnology tech = wxGetApp().preset_bundle->printers.get_edited_preset().printer_technology();
if (tech == ptFFF) {
if (disabled_modes.find("FFF") != std::string::npos)
return false;
// MMU
bool is_mmu = wxGetApp().extruders_edited_cnt() > 1;
if (is_mmu)
{
if (!preferred_tech.empty() && preferred_tech.find("MMU") == std::string::npos)
return false;
if (is_mmu && disabled_tech.find("MMU") != std::string::npos)
return false;
} else {
// only FFF - does not show if MMU preffered
if (!preferred_tech.empty() && preferred_tech.find("FFF") == std::string::npos)
return false;
if (disabled_tech.find("FFF") != std::string::npos)
return false;
}
} else {
if (disabled_modes.find("SLA") != std::string::npos)
return false;
}
// SLA
if (!preferred_tech.empty() && preferred_tech.find("SLA") == std::string::npos)
return false;
if (disabled_tech.find("SLA") != std::string::npos)
return false;
}
return true;
}
} //namespace
@ -96,7 +114,11 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path)
std::string text1;
std::string hypertext_text;
std::string follow_text;
std::string disabled_modes;
std::string disabled_mode;
std::string preferred_mode;
std::string disabled_tech;
std::string preferred_tech;
std::string documentation_link;
unescape_string_cstyle(_utf8(dict["text"]), fulltext);
// replace <b> and </b> for imgui markers
std::string marker_s(1, ImGui::ColorMarkerStart);
@ -143,8 +165,20 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path)
text1 = fulltext;
}
if (dict.find("disabled_modes") != dict.end()) {
disabled_modes = dict["disabled_modes"];
if (dict.find("disabled_mode") != dict.end()) {
disabled_mode = dict["disabled_mode"];
}
if (dict.find("preferred_mode") != dict.end()) {
preferred_mode = dict["preferred_mode"];
}
if (dict.find("disabled_tech") != dict.end()) {
disabled_tech = dict["disabled_tech"];
}
if (dict.find("preferred_tech") != dict.end()) {
preferred_tech = dict["preferred_tech"];
}
if (dict.find("documentation_link") != dict.end()) {
documentation_link = dict["documentation_link"];
}
// create HintData
@ -152,37 +186,37 @@ void HintDatabase::load_hints_from_file(const boost::filesystem::path& path)
//link to internet
if(dict["hypertext_type"] == "link") {
std::string hypertext_link = dict["hypertext_link"];
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, false, [hypertext_link]() { wxLaunchDefaultBrowser(hypertext_link); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, false, documentation_link, [hypertext_link]() { wxLaunchDefaultBrowser(hypertext_link); } };
m_loaded_hints.emplace_back(hint_data);
// highlight settings
} else if (dict["hypertext_type"] == "settings") {
std::string opt = dict["hypertext_settings_opt"];
Preset::Type type = static_cast<Preset::Type>(std::atoi(dict["hypertext_settings_type"].c_str()));
std::wstring category = boost::nowide::widen(dict["hypertext_settings_category"]);
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, true, [opt, type, category]() { GUI::wxGetApp().sidebar().jump_to_option(opt, type, category); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, true, documentation_link, [opt, type, category]() { GUI::wxGetApp().sidebar().jump_to_option(opt, type, category); } };
m_loaded_hints.emplace_back(hint_data);
// open preferences
} else if(dict["hypertext_type"] == "preferences") {
int page = static_cast<Preset::Type>(std::atoi(dict["hypertext_preferences_page"].c_str()));
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, false, [page]() { wxGetApp().open_preferences(page); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, false, documentation_link, [page]() { wxGetApp().open_preferences(page); } };
m_loaded_hints.emplace_back(hint_data);
} else if (dict["hypertext_type"] == "plater") {
std::string item = dict["hypertext_plater_item"];
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, true, [item]() { wxGetApp().plater()->canvas3D()->highlight_toolbar_item(item); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, true, documentation_link, [item]() { wxGetApp().plater()->canvas3D()->highlight_toolbar_item(item); } };
m_loaded_hints.emplace_back(hint_data);
} else if (dict["hypertext_type"] == "gizmo") {
std::string item = dict["hypertext_gizmo_item"];
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, true, [item]() { wxGetApp().plater()->canvas3D()->highlight_gizmo(item); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, true, documentation_link, [item]() { wxGetApp().plater()->canvas3D()->highlight_gizmo(item); } };
m_loaded_hints.emplace_back(hint_data);
}
else if (dict["hypertext_type"] == "gallery") {
HintData hint_data{ text1, hypertext_text, follow_text, disabled_modes, false, []() { wxGetApp().obj_list()->load_shape_object_from_gallery(); } };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, false, documentation_link, []() { wxGetApp().obj_list()->load_shape_object_from_gallery(); } };
m_loaded_hints.emplace_back(hint_data);
}
} else {
// plain text without hypertext
HintData hint_data{ text1 };
HintData hint_data{ text1, hypertext_text, follow_text, disabled_mode, preferred_mode, disabled_tech, preferred_tech, false, documentation_link };
m_loaded_hints.emplace_back(hint_data);
}
}
@ -194,6 +228,12 @@ HintData* HintDatabase::get_hint(bool up)
init();
//return false;
}
if (m_loaded_hints.empty())
{
BOOST_LOG_TRIVIAL(error) << "There were no hints loaded from hints.ini file.";
return nullptr;
}
// shift id
m_hint_id = (up ? m_hint_id + 1 : (m_hint_id == 0 ? m_loaded_hints.size() - 1 : m_hint_id - 1));
m_hint_id %= m_loaded_hints.size();
@ -220,12 +260,16 @@ void NotificationManager::HintNotification::count_spaces()
std::string text;
text = ImGui::WarningMarker;
float picture_width = ImGui::CalcTextSize(text.c_str()).x;
m_left_indentation = picture_width + m_line_height / 2;
m_left_indentation = picture_width * 2 + m_line_height / 2;
// no left button picture
//m_left_indentation = m_line_height;
m_window_width_offset = m_left_indentation + m_line_height * 3.f;// 5.5f; // no right arrow
if (m_documentation_link.empty())
m_window_width_offset = m_left_indentation + m_line_height * 3.f;
else
m_window_width_offset = m_left_indentation + m_line_height * 5.5f;
m_window_width = m_line_height * 25;
}
@ -387,12 +431,12 @@ void NotificationManager::HintNotification::set_next_window_size(ImGuiWrapper& i
m_window_height += 1 * m_line_height; // top and bottom
*/
m_window_height = std::max((m_lines_count + 1.f) * m_line_height, 4.f * m_line_height);
m_window_height = std::max((m_lines_count + 1.f) * m_line_height, 5.f * m_line_height);
}
bool NotificationManager::HintNotification::on_text_click()
{
if (m_hypertext_callback != nullptr && (!m_runtime_disable || disabled_modes_check(m_disabled_modes)))
if (m_hypertext_callback != nullptr && (!m_runtime_disable || mode_and_tech_check(m_disabled_mode, m_preferred_mode, m_disabled_tech, m_preferred_tech)))
m_hypertext_callback();
return false;
}
@ -405,7 +449,7 @@ void NotificationManager::HintNotification::render_text(ImGuiWrapper& imgui, con
float x_offset = m_left_indentation;
int last_end = 0;
float starting_y = (m_lines_count == 2 ? win_size_y / 2 - m_line_height :(m_lines_count == 1 ? win_size_y / 2 - m_line_height / 2: m_line_height / 2));
float starting_y = (m_lines_count < 4 ? m_line_height / 2 * (4 - m_lines_count + 1) : m_line_height / 2);
float shift_y = m_line_height;
std::string line;
@ -425,8 +469,8 @@ void NotificationManager::HintNotification::render_text(ImGuiWrapper& imgui, con
// regural line
line = m_text1.substr(last_end, m_endlines[i] - last_end);
}
// first line is headline
if (i == 0) {
// first line is headline (for hint notification it must be divided by \n)
if (m_text1.find('\n') >= m_endlines[i]) {
line = ImGui::ColorMarkerStart + line + ImGui::ColorMarkerEnd;
}
// Add ImGui::ColorMarkerStart if there is ImGui::ColorMarkerEnd first (start was at prev line)
@ -534,6 +578,11 @@ void NotificationManager::HintNotification::render_close_button(ImGuiWrapper& im
render_right_arrow_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
render_logo(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
render_preferences_button(imgui, win_pos_x, win_pos_y);
if (!m_documentation_link.empty())
{
render_documentation_button(imgui, win_size_x, win_size_y, win_pos_x, win_pos_y);
}
}
void NotificationManager::HintNotification::render_preferences_button(ImGuiWrapper& imgui, const float win_pos_x, const float win_pos_y)
@ -576,7 +625,6 @@ void NotificationManager::HintNotification::render_preferences_button(ImGuiWrapp
// preferences button is in place of minimize button
m_minimize_b_visible = true;
}
void NotificationManager::HintNotification::render_right_arrow_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
{
// Used for debuging
@ -621,12 +669,14 @@ void NotificationManager::HintNotification::render_logo(ImGuiWrapper& imgui, con
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f));
std::string button_text;
button_text = ImGui::ErrorMarker;//LeftArrowButton;
ImVec2 button_pic_size = ImGui::CalcTextSize(button_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
ImGui::SetCursorPosY(win_size.y / 2 - button_size.y);
std::wstring button_text;
button_text = ImGui::ClippyMarker;//LeftArrowButton;
std::string placeholder_text;
placeholder_text = ImGui::EjectButton;
ImVec2 button_pic_size = ImGui::CalcTextSize(placeholder_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f * 2.f, button_pic_size.y * 1.25f * 2.f);
ImGui::SetCursorPosY(win_size.y / 2 - button_size.y * 1.1f);
ImGui::SetCursorPosX(0);
// shouldnt it render as text?
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
@ -639,10 +689,81 @@ void NotificationManager::HintNotification::render_logo(ImGuiWrapper& imgui, con
ImGui::PopStyleColor();
ImGui::PopStyleColor();
}
void NotificationManager::HintNotification::render_documentation_button(ImGuiWrapper& imgui, const float win_size_x, const float win_size_y, const float win_pos_x, const float win_pos_y)
{
ImVec2 win_size(win_size_x, win_size_y);
ImVec2 win_pos(win_pos_x, win_pos_y);
ImGui::PushStyleColor(ImGuiCol_Button, ImVec4(.0f, .0f, .0f, .0f));
ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4(.0f, .0f, .0f, .0f));
push_style_color(ImGuiCol_Text, ImVec4(1.f, 1.f, 1.f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
push_style_color(ImGuiCol_TextSelectedBg, ImVec4(0, .75f, .75f, 1.f), m_state == EState::FadingOut, m_current_fade_opacity);
ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4(.0f, .0f, .0f, .0f));
std::wstring button_text;
button_text = ImGui::DocumentationButton;
std::string placeholder_text;
placeholder_text = ImGui::EjectButton;
if (ImGui::IsMouseHoveringRect(ImVec2(win_pos.x - m_line_height * 5.f, win_pos.y),
ImVec2(win_pos.x - m_line_height * 2.5f, win_pos.y + win_size.y - 2 * m_line_height),
true))
{
button_text = ImGui::DocumentationHoverButton;
// tooltip
long time_now = wxGetLocalTime();
if (m_hover_time > 0 && m_hover_time < time_now) {
ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGuiWrapper::COL_WINDOW_BACKGROUND);
ImGui::BeginTooltip();
imgui.text(_u8L("Open Documentation in web browser"));
ImGui::EndTooltip();
ImGui::PopStyleColor();
}
if (m_hover_time == 0)
m_hover_time = time_now;
}
else
m_hover_time = 0;
ImVec2 button_pic_size = ImGui::CalcTextSize(placeholder_text.c_str());
ImVec2 button_size(button_pic_size.x * 1.25f, button_pic_size.y * 1.25f);
ImGui::SetCursorPosX(win_size.x - m_line_height * 5.0f);
ImGui::SetCursorPosY(win_size.y / 2 - button_size.y);
if (imgui.button(button_text.c_str(), button_size.x, button_size.y))
{
open_documentation();
}
//invisible large button
ImGui::SetCursorPosX(win_size.x - m_line_height * 4.625f);
ImGui::SetCursorPosY(0);
if (imgui.button(" ", m_line_height * 2.f, win_size.y - 2 * m_line_height))
{
open_documentation();
}
ImGui::PopStyleColor();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
ImGui::PopStyleColor();
}
void NotificationManager::HintNotification::open_documentation()
{
if (!m_documentation_link.empty())
{
wxLaunchDefaultBrowser(m_documentation_link);
}
}
void NotificationManager::HintNotification::retrieve_data(size_t recursion_counter)
{
HintData* hint_data = HintDatabase::get_instance().get_hint(true);
if (hint_data != nullptr && !disabled_modes_check(hint_data->disabled_modes))
if (hint_data == nullptr)
close();
if (hint_data != nullptr && !mode_and_tech_check(hint_data->disabled_mode, hint_data->preferred_mode, hint_data->disabled_tech, hint_data->preferred_tech))
{
// Content for different user - retrieve another
size_t count = HintDatabase::get_instance().get_count();
@ -661,12 +782,15 @@ void NotificationManager::HintNotification::retrieve_data(size_t recursion_count
hint_data->text,
hint_data->hypertext, nullptr,
hint_data->follow_text };
update(nd);
m_hypertext_callback = hint_data->callback;
m_disabled_modes = hint_data->disabled_modes;
m_disabled_mode = hint_data->disabled_mode;
m_preferred_mode = hint_data->preferred_mode;
m_disabled_tech = hint_data->disabled_tech;
m_preferred_tech = hint_data->preferred_tech;
m_runtime_disable = hint_data->runtime_disable;
m_documentation_link = hint_data->documentation_link;
m_has_hint_data = true;
update(nd);
}
}
} //namespace Slic3r

View File

@ -12,9 +12,13 @@ struct HintData
std::string text;
std::string hypertext;
std::string follow_text;
std::string disabled_modes;
std::string disabled_mode;
std::string preferred_mode;
std::string disabled_tech;
std::string preferred_tech;
bool runtime_disable; // if true - hyperlink will check before every click if not in disabled mode
std::function<void(void)> callback{ nullptr };
std::string documentation_link;
std::function<void(void)> callback { nullptr };
};
class HintDatabase
@ -77,18 +81,27 @@ protected:
void render_right_arrow_button(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y);
void render_documentation_button(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y);
void render_logo(ImGuiWrapper& imgui,
const float win_size_x, const float win_size_y,
const float win_pos_x, const float win_pos_y);
void retrieve_data(size_t recursion_counter = 0);
void open_documentation();
bool m_has_hint_data { false };
std::function<void(void)> m_hypertext_callback;
std::string m_disabled_modes;
std::string m_disabled_mode;
std::string m_preferred_mode;
std::string m_disabled_tech;
std::string m_preferred_tech;
bool m_runtime_disable;
std::string m_documentation_link;
float m_close_b_y { 0 };
float m_close_b_w { 0 };
// hover of buttons
size_t m_hover_time { 0 };
};
} //namespace Slic3r

View File

@ -36,7 +36,7 @@ namespace Slic3r {
namespace GUI {
static const std::map<const char, std::string> font_icons = {
static const std::map<const wchar_t, std::string> font_icons = {
{ImGui::PrintIconMarker , "cog" },
{ImGui::PrinterIconMarker , "printer" },
{ImGui::PrinterSlaIconMarker , "sla_printer" },
@ -49,21 +49,27 @@ static const std::map<const char, std::string> font_icons = {
{ImGui::PreferencesButton , "notification_preferences" },
{ImGui::PreferencesHoverButton , "notification_preferences_hover"},
};
static const std::map<const char, std::string> font_icons_large = {
{ImGui::CloseNotifButton , "notification_close" },
{ImGui::CloseNotifHoverButton , "notification_close_hover" },
{ImGui::EjectButton , "notification_eject_sd" },
{ImGui::EjectHoverButton , "notification_eject_sd_hover" },
{ImGui::WarningMarker , "notification_warning" },
{ImGui::ErrorMarker , "notification_error" },
{ImGui::CancelButton , "notification_cancel" },
{ImGui::CancelHoverButton , "notification_cancel_hover" },
{ImGui::SinkingObjectMarker , "move" },
{ImGui::CustomSupportsMarker , "fdm_supports" },
{ImGui::CustomSeamMarker , "seam" },
{ImGui::MmuSegmentationMarker , "move" },
{ImGui::VarLayerHeightMarker , "layers" },
static const std::map<const wchar_t, std::string> font_icons_large = {
{ImGui::CloseNotifButton , "notification_close" },
{ImGui::CloseNotifHoverButton , "notification_close_hover" },
{ImGui::EjectButton , "notification_eject_sd" },
{ImGui::EjectHoverButton , "notification_eject_sd_hover" },
{ImGui::WarningMarker , "notification_warning" },
{ImGui::ErrorMarker , "notification_error" },
{ImGui::CancelButton , "notification_cancel" },
{ImGui::CancelHoverButton , "notification_cancel_hover" },
{ImGui::SinkingObjectMarker , "move" },
{ImGui::CustomSupportsMarker , "fdm_supports" },
{ImGui::CustomSeamMarker , "seam" },
{ImGui::MmuSegmentationMarker , "move" },
{ImGui::VarLayerHeightMarker , "layers" },
{ImGui::DocumentationButton , "notification_documentation" },
{ImGui::DocumentationHoverButton, "notification_documentation_hover"},
};
static const std::map<const wchar_t, std::string> font_icons_extra_large = {
{ImGui::ClippyMarker , "notification_clippy" },
};
const ImVec4 ImGuiWrapper::COL_GREY_DARK = { 0.333f, 0.333f, 0.333f, 1.0f };
@ -989,6 +995,8 @@ void ImGuiWrapper::init_font(bool compress)
io.Fonts->AddCustomRectFontGlyph(font, icon.first, icon_sz, icon_sz, 3.0 * font_scale + icon_sz);
for (auto& icon : font_icons_large)
io.Fonts->AddCustomRectFontGlyph(font, icon.first, icon_sz * 2, icon_sz * 2, 3.0 * font_scale + icon_sz * 2);
for (auto& icon : font_icons_extra_large)
io.Fonts->AddCustomRectFontGlyph(font, icon.first, icon_sz * 4, icon_sz * 4, 3.0 * font_scale + icon_sz * 4);
// Build texture atlas
unsigned char* pixels;
@ -1027,6 +1035,22 @@ void ImGuiWrapper::init_font(bool compress)
rect_id++;
}
icon_sz *= 2; // default size of extra large icon is 64 px
for (auto icon : font_icons_extra_large) {
if (const ImFontAtlas::CustomRect* rect = io.Fonts->GetCustomRectByIndex(rect_id)) {
assert(rect->Width == icon_sz);
assert(rect->Height == icon_sz);
std::vector<unsigned char> raw_data = load_svg(icon.second, icon_sz, icon_sz);
const ImU32* pIn = (ImU32*)raw_data.data();
for (int y = 0; y < icon_sz; y++) {
ImU32* pOut = (ImU32*)pixels + (rect->Y + y) * width + (rect->X);
for (int x = 0; x < icon_sz; x++)
*pOut++ = *pIn++;
}
}
rect_id++;
}
// Upload texture to graphics system
GLint last_texture;
glsafe(::glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture));