adding icons for splitting presentations
Some checks failed
/ test (push) Has been cancelled

This commit is contained in:
Chris Cochrun 2025-10-18 07:20:59 -05:00
parent 2d5362a015
commit de81283ae4
6 changed files with 135 additions and 2 deletions

BIN
res/chad.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 673 KiB

6
res/list-add-above.svg Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" enable-background="new 0 0 76.00 76.00" xml:space="preserve">
<path fill="#000000" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 19,35L 19,43L 27,43L 27,35L 19,35 Z M 30.9999,35L 30.9999,43L 56.9998,43L 56.9999,35L 30.9999,35 Z M 31,32L 57,32L 57,24L 31,24L 31,32 Z M 32,31L 32,25L 56,25L 56,31L 32,31 Z M 21,33L 25,33L 25,30L 28,30L 28,26L 25,26L 25,23L 21,23L 21,26L 18,26L 18,30L 21,30L 21,33 Z M 22,32L 22,29L 19,29L 19,27L 22,27L 22,24L 24,24L 24,27L 27,27L 27,29L 24,29L 24,32L 22,32 Z M 19.0001,46L 19.0001,54L 27.0001,54L 27.0001,46L 19.0001,46 Z M 31.0001,46L 31.0001,54L 57,54L 57,46L 31.0001,46 Z "/>
</svg>

After

Width:  |  Height:  |  Size: 1,022 B

6
res/list-add-below.svg Normal file
View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg width="800px" height="800px" viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" enable-background="new 0 0 76.00 76.00" xml:space="preserve">
<path fill="#000000" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 19,42L 19,34L 27,34L 27,42L 19,42 Z M 30.9999,42L 30.9999,34L 56.9999,34L 56.9999,42L 30.9999,42 Z M 31,45L 57,45L 57,53L 31,53L 31,45 Z M 32,46L 32,52L 56,52L 56,46L 32,46 Z M 21,44L 25,44L 25,47L 28,47L 28,51L 25,51L 25,54L 21,54L 21,51L 18,51L 18,47L 21,47L 21,44 Z M 22,45L 22,48L 19,48L 19,50L 22,50L 22,53L 24,53L 24,50L 27,50L 27,48L 24,48L 24,45L 22,45 Z M 19.0001,31L 19.0001,23L 27.0001,23L 27.0001,31L 19.0001,31 Z M 31.0001,31L 31.0001,23L 57,23L 57,31L 31.0001,31 Z "/>
</svg>

After

Width:  |  Height:  |  Size: 1,022 B

54
res/split-above.svg Normal file
View file

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
width="800px"
height="800px"
viewBox="0 0 76 76"
version="1.1"
enable-background="new 0 0 76.00 76.00"
xml:space="preserve"
id="svg1"
sodipodi:docname="split-above.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.74629807"
inkscape:cx="252.58004"
inkscape:cy="447.54236"
inkscape:window-width="1463"
inkscape:window-height="909"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" />
<path
fill="#000000"
fill-opacity="1"
stroke-width="0.404256"
stroke-linejoin="round"
d="M 3.8256403,28.314338 V 46.261937 H 18.394593 V 28.314338 Z m 21.8532467,0 v 17.947599 h 47.348916 l 1.82e-4,-17.947599 z m 1.83e-4,-6.730349 H 73.028167 V 3.6363892 H 25.67907 Z m 1.821118,-2.243451 V 5.8798398 h 43.70686 V 19.340538 Z M 3.8258225,52.992286 V 70.939887 H 18.394774 V 52.992286 Z m 21.8534285,0 V 70.939887 H 73.028167 V 52.992286 Z"
id="path1"
sodipodi:nodetypes="cccccccccccccccccccccccccccccc" />
<path
d="M 3.5834285,21.523408 H 18.345395 V 3.5758086 H 3.5834285 Z M 5.3255032,19.102699 V 5.7129051 L 16.732439,5.5582305 16.783963,19.315409 Z"
style="fill:#000000;fill-opacity:1;stroke-width:0.225723;stroke-linejoin:round"
id="path1-2"
sodipodi:nodetypes="cccccccccc" /><rect
style="fill:#000000;stroke-width:0.11759"
id="rect1"
width="72.699356"
height="1.642724"
x="1.9440452"
y="24.184471" /></svg>

After

Width:  |  Height:  |  Size: 2 KiB

60
res/split-below.svg Normal file
View file

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
<svg
width="800px"
height="800px"
viewBox="0 0 76 76"
version="1.1"
enable-background="new 0 0 76.00 76.00"
xml:space="preserve"
id="svg1"
sodipodi:docname="split-below.svg"
inkscape:version="1.4.2 (ebf0e940d0, 2025-05-08)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs1" /><sodipodi:namedview
id="namedview1"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:zoom="0.76425252"
inkscape:cx="252.53433"
inkscape:cy="367.67952"
inkscape:window-width="1463"
inkscape:window-height="909"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="svg1" />
<path
fill="#000000"
fill-opacity="1"
stroke-width="0.404256"
stroke-linejoin="round"
d="M 3.8256403,28.314338 V 46.261937 H 18.394593 V 28.314338 Z m 21.8532467,0 v 17.947599 h 47.348916 l 1.82e-4,-17.947599 z"
id="path1"
sodipodi:nodetypes="cccccccccc" />
<path
d="M 3.8,71.717599 H 18.561966 V 53.77 H 3.8 Z M 5.5420747,69.29689 V 55.907096 L 16.94901,55.752421 17.00053,69.5096 Z"
style="fill:#000000;fill-opacity:1;stroke-width:0.225723;stroke-linejoin:round"
id="path1-2"
sodipodi:nodetypes="cccccccccc" /><rect
style="fill:#000000;stroke-width:0.11759"
id="rect1"
width="72.699356"
height="1.642724"
x="1.9440452"
y="49.006992" /><path
d="M 3.8,3.924661 V 21.872262 H 18.368951 V 3.924661 Z m 21.853428,0 V 21.872262 H 73.002344 V 3.924661 Z"
style="fill:#000000;fill-opacity:1;stroke-width:0.404256;stroke-linejoin:round"
id="path1-7" /><path
d="M 25.65,71.7176 H 72.999097 V 53.77 H 25.65 Z m 1.821118,-2.243451 V 56.013451 h 43.70686 v 13.460698 z"
style="fill:#000000;fill-opacity:1;stroke-width:0.404256;stroke-linejoin:round"
id="path1-6" /></svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

@ -76,6 +76,7 @@ impl menu::Action for MenuAction {
} }
} }
} }
impl PresentationEditor { impl PresentationEditor {
pub fn new() -> Self { pub fn new() -> Self {
Self { Self {
@ -395,15 +396,21 @@ impl PresentationEditor {
items: Element<'b, Message>, items: Element<'b, Message>,
) -> Element<'b, Message> { ) -> Element<'b, Message> {
if self.context_menu_id.is_some() { if self.context_menu_id.is_some() {
let before_icon =
icon::from_path("./res/split-above.svg".into())
.symbolic(true);
let after_icon =
icon::from_path("./res/split-below.svg".into())
.symbolic(true);
let menu_items = vec![ let menu_items = vec![
menu::Item::Button( menu::Item::Button(
"Spit Before", "Spit Before",
None, Some(before_icon),
MenuAction::SplitBefore, MenuAction::SplitBefore,
), ),
menu::Item::Button( menu::Item::Button(
"Split After", "Split After",
None, Some(after_icon),
MenuAction::SplitAfter, MenuAction::SplitAfter,
), ),
]; ];