summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJabier Arraiza <jabier.arraiza@marker.es>2019-02-04 22:51:54 +0000
committerJabier Arraiza <jabier.arraiza@marker.es>2019-02-18 21:18:27 +0000
commitb41e95304a0269c587f6ba7b6cf3727c3ecfff1c (patch)
tree4d3ef2da78d2875cb873b1bd8d6af29fe8f5f16b
parentadd sorting and favorites (diff)
downloadinkscape-b41e95304a0269c587f6ba7b6cf3727c3ecfff1c.tar.gz
inkscape-b41e95304a0269c587f6ba7b6cf3727c3ecfff1c.zip
Working with event boxes
-rw-r--r--share/icons/hicolor/symbolic/actions/hatches-symbolic.svg87
-rw-r--r--share/icons/hicolor/symbolic/actions/infopop-outline-symbolic.svg (renamed from share/icons/hicolor/symbolic/actions/info-symbolic.svg)0
-rw-r--r--share/icons/hicolor/symbolic/actions/infopop-symbolic.svg65
-rw-r--r--share/ui/dialog-livepatheffect-add-effect.ui337
-rw-r--r--share/ui/dialog-livepatheffect-add.ui14
-rw-r--r--share/ui/style.css18
-rw-r--r--src/ui/dialog/livepatheffect-add.cpp198
-rw-r--r--src/ui/dialog/livepatheffect-add.h6
8 files changed, 476 insertions, 249 deletions
diff --git a/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg b/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg
new file mode 100644
index 000000000..7edd30fda
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/hatches-symbolic.svg
@@ -0,0 +1,87 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py -->
+<svg xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" id="svg1" width="16" height="16" viewBox="0 0 16 16">
+<sodipodi:namedview
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ id="namedview"
+ showgrid="true"
+ inkscape:zoom="27.166187"
+ inkscape:cx="7.4837792"
+ inkscape:cy="8.9906751"
+ inkscape:window-x="0"
+ inkscape:window-y="27">
+ <inkscape:grid type="xygrid" id="grid"/>
+ </sodipodi:namedview>
+ <metadata
+ id="metadata1906">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <cc:license
+ rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
+ <dc:title>LiveEffect Icons proposal</dc:title>
+ <dc:date>13 Jan 2019</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Ramón Miranda</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:rights>
+ <cc:Agent>
+ <dc:title>see the license tab</dc:title>
+ </cc:Agent>
+ </dc:rights>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>icon ui</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ <dc:description>This is a contribution with Inkscape Project from
+Ramon Miranda www.ramonmiranda.com (design and SVG file)
+Jabiertxo (SVG stuff to integrate them in UI)</dc:description>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title></dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <dc:identifier></dc:identifier>
+ <dc:source />
+ <dc:relation />
+ <dc:language>-</dc:language>
+ <dc:coverage />
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Ramon Miranda
+Jabier Arraiza</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Reproduction" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#Distribution" />
+ <cc:permits
+ rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g inkscape:groupmode="layer"
+ id="layercompo"
+ inkscape:label="hatches">
+ <path
+ id="rect22048"
+ d="M 0,0 H 16 V 16 H 0 Z"
+ style="opacity:0;fill:none" />
+ <path
+ id="path9609"
+ d="M 5.9658851,2.133748 C 5.819022,2.1338088 5.687937,2.2044414 5.5903636,2.2955329 5.4927994,2.3866056 5.4164874,2.5017095 5.344268,2.6350508 5.1998224,2.9017451 5.0749908,3.2514902 4.9514285,3.6613585 4.7042946,4.4811138 4.4656075,5.5371902 4.1830651,6.5361114 4.1471363,6.6631387 4.1095905,6.7857163 4.0727773,6.9107229 L 5.2791001,7.2484209 C 5.4863991,6.4425046 5.6491802,5.6419644 5.7749358,4.9756872 5.8289598,4.6894605 5.8650869,4.5026785 5.9075514,4.2765961 5.9190782,4.4872901 5.9403863,4.6498939 5.9385429,4.9187209 5.9337526,5.6162906 5.8791687,6.4838539 5.7758458,7.3874182 L 6.4585311,7.5783698 C 6.6157775,6.299298 6.662344,5.013422 6.6134814,4.0268559 6.588328,3.5189451 6.5394935,3.0924027 6.4635454,2.7745055 6.4255702,2.6155628 6.3817127,2.4833251 6.317254,2.3711823 6.2527978,2.2590417 6.1401836,2.1336758 5.9658851,2.133748 Z M 3.0929545,2.5006105 C 2.923269,2.5006105 2.7696462,2.5928056 2.6727704,2.7088801 2.5758946,2.8249454 2.5153887,2.9639684 2.4658682,3.1172155 2.3668316,3.4237003 2.3182888,3.7981881 2.284943,4.1663082 2.2182116,4.9030268 2.216128,5.6269283 2.216128,5.6269283 2.2137035,5.8930253 2.5871017,5.9551343 2.6709481,5.70258 2.6709481,5.70258 2.7663959,5.4115909 2.8172371,5.2600635 2.8054701,5.5017281 2.7947391,5.7331352 2.781236,5.981032 L 1.9723121,5.757724 1.9098764,5.9828544 1.5375445,7.3322743 2.6627464,7.6430828 C 2.5797541,8.7415585 2.5042493,9.9305141 2.5725113,10.733854 2.5901048,10.940906 2.6210775,11.103273 2.6777849,11.240171 2.7344898,11.377075 2.833083,11.508996 2.9895057,11.551892 3.1459167,11.594786 3.2905724,11.5321 3.4010306,11.452085 3.5114866,11.372073 3.6092443,11.264832 3.7095595,11.129883 4.1108387,10.590103 4.5561599,9.5973546 4.9532509,8.3863813 5.0270778,8.1612323 5.0947308,7.9310828 5.1596982,7.700049 L 3.9392493,7.3582514 C 3.7279579,8.0430297 3.5137499,8.6659791 3.334038,9.1146392 3.3275816,9.130744 3.3249356,9.1317636 3.3185423,9.1474531 3.3210483,8.7711755 3.3104432,8.4482617 3.3445194,7.9502466 3.3758072,7.4929577 3.4122237,7.0194544 3.4461482,6.5570765 L 3.5468647,6.1924914 3.471668,6.1715263 C 3.4847231,5.9784257 3.5008605,5.7735744 3.5099488,5.5959392 3.5496087,4.8209374 3.5579481,4.1027036 3.5286343,3.5683886 3.5139855,3.3012277 3.4903604,3.0817276 3.4511602,2.9103132 3.4315648,2.8246118 3.4113487,2.7510787 3.3700391,2.677891 3.3287297,2.604701 3.2371179,2.5006105 3.0929545,2.5006105 Z M 8.6583477,2.8638283 C 8.4965559,2.8637583 8.3796367,2.9649345 8.3015093,3.0670859 8.2233912,3.1692351 8.1637347,3.290618 8.1050883,3.4375954 7.9877981,3.7315385 7.8800722,4.1256964 7.7660253,4.5933289 7.5519364,5.4712126 7.3175916,6.6058808 7.0186248,7.7346852 L 8.1123801,8.0409367 C 8.1611167,7.7880792 8.2043162,7.538311 8.2600387,7.2716633 8.2273417,7.5452526 8.2065445,7.8009335 8.180285,8.0596222 L 9.6960466,8.4839081 C 9.9571339,7.4559625 10.145953,6.4519593 10.28394,5.6697662 10.330222,5.4074119 10.362877,5.2441944 10.399698,5.0394901 10.413305,5.221477 10.4341,5.3561016 10.437523,5.5854555 10.450044,6.4242485 10.389983,7.5366379 10.259787,8.6415909 L 10.952044,8.8352772 C 10.98757,8.5551709 11.020409,8.2699778 11.047291,7.9830604 11.158384,6.7973527 11.173479,5.5985409 11.105625,4.683109 11.071698,4.2253886 11.019149,3.8395233 10.938826,3.5497056 10.898673,3.4047909 10.852966,3.2835923 10.785245,3.1791938 10.717524,3.0747953 10.601279,2.9641784 10.439345,2.9640898 10.283427,2.9640011 10.149574,3.0469539 10.05334,3.1482047 9.9571083,3.2494555 9.8818863,3.3747677 9.8104363,3.5237284 9.6675263,3.8216662 9.5434506,4.2187852 9.4175947,4.6881211 9.2920584,5.1562577 9.1464484,5.7947005 9.0147288,6.3674922 9.057863,5.7865525 9.1528908,5.1338692 9.1491691,4.6621439 9.1454218,4.1866107 9.1203756,3.7877137 9.0730623,3.492737 9.0494092,3.3452509 9.0224335,3.223525 8.9787252,3.1190378 8.9568734,3.0667942 8.9310364,3.0172294 8.8853005,2.9672795 8.8395669,2.9173389 8.7567145,2.8638726 8.6583477,2.8638283 Z M 12.928096,4.6174837 C 12.839989,4.6242924 12.763919,4.6718624 12.723015,4.7122759 12.668471,4.7661598 12.637746,4.8212408 12.605893,4.8827197 12.478495,5.1286168 12.372542,5.5098201 12.265006,5.9368245 12.157467,6.3638382 12.057938,6.8264308 11.977439,7.1755039 11.845559,7.7473763 11.676688,8.3726287 11.49573,8.9874906 L 12.459147,9.2568286 12.333365,9.7066348 11.359468,9.4341068 C 11.225531,9.8708251 11.089375,10.298356 10.957512,10.682355 10.800492,11.139637 10.659421,11.505491 10.533683,11.810291 10.553145,11.614696 10.563549,11.451843 10.602953,11.186849 10.681937,10.655678 10.789742,10.001201 10.887786,9.3024011 L 10.199632,9.1096272 C 10.057125,10.156923 9.8636116,11.17641 9.7484562,11.96524 9.685145,12.398929 9.6464888,12.761416 9.6573108,13.042134 9.6627241,13.182496 9.6760548,13.301853 9.7311376,13.419022 9.7862213,13.536191 9.9323124,13.655057 10.082507,13.655091 10.345101,13.655136 10.572829,13.514645 10.787068,13.319219 11.001315,13.12378 11.207315,12.860746 11.408687,12.5545 11.811429,11.941999 12.190946,11.152703 12.48011,10.391144 12.480973,10.388869 12.48108,10.387474 12.481935,10.38522 L 12.598144,10.416208 C 12.398042,12.117759 12.1374,13.188423 12.1374,13.188423 12.048739,13.434754 12.370608,13.617893 12.537076,13.415833 12.537076,13.415833 12.566537,13.361333 12.573079,13.35203 H 12.574902 C 12.574902,13.35203 12.576718,13.347025 12.576727,13.347018 12.601992,13.310851 12.637034,13.268219 12.705698,13.117783 12.795114,12.921899 12.908053,12.616299 13.019241,12.156646 13.114673,11.762145 13.207308,11.245552 13.281742,10.597134 L 13.783047,10.730207 14.201409,9.1510978 13.408435,8.9410057 C 13.430397,8.4215845 13.440956,7.8465971 13.436235,7.206493 13.427831,6.0668735 13.386257,5.4141249 13.306806,5.0499715 13.286947,4.9589337 13.265479,4.8864624 13.231155,4.8170944 13.196831,4.747724 13.144224,4.6601747 13.019241,4.6261428 12.987997,4.6176331 12.957463,4.6152134 12.928096,4.6174837 Z M 2.2981614,6.3319438 2.9726426,6.5183384 2.786703,7.1928219 2.1117667,7.0064274 Z M 5.7161449,7.8554544 C 5.6881704,8.0663282 5.661771,8.2769942 5.6281895,8.4880102 5.4241805,9.7699661 5.1146459,11.036407 4.9085907,11.991217 4.8055571,12.468622 4.7277354,12.866531 4.7035106,13.166093 4.6914029,13.315872 4.6874595,13.437744 4.7190063,13.560299 4.7347751,13.621582 4.7609856,13.687845 4.8188106,13.748062 4.8766448,13.808285 4.9723959,13.847831 5.0548797,13.847866 5.3560117,13.847998 5.5678002,13.640949 5.802278,13.365701 6.0367557,13.090455 6.2827323,12.713963 6.5309931,12.263287 7.0275172,11.361955 7.5305699,10.166286 7.8968211,8.9460201 7.9433922,8.790841 7.9814445,8.6427553 8.0153106,8.4984916 L 6.8951232,8.1854034 C 6.5788313,9.3060389 6.2016509,10.398569 5.879752,11.222853 5.8154194,11.387592 5.7717695,11.476017 5.7129551,11.617518 5.740939,11.481036 5.7501347,11.402838 5.7835949,11.247008 5.9696511,10.380511 6.2218973,9.2352265 6.3938181,8.0450388 Z M 8.1224065,8.5285707 C 8.1059961,8.643698 8.0887456,8.7599056 8.0654402,8.8822171 7.8362988,10.084909 7.5047235,11.275533 7.2542389,12.16713 7.1290013,12.612918 7.0253144,12.982456 6.9616585,13.250401 6.9298316,13.38438 6.9061645,13.489457 6.8978578,13.58263 6.8937022,13.62922 6.8897635,13.671736 6.9046922,13.736211 6.9121635,13.768453 6.9248803,13.80922 6.9666728,13.856525 7.0084653,13.903829 7.0909071,13.942623 7.1562571,13.942658 7.3252893,13.942747 7.4087273,13.855467 7.4939527,13.769024 7.5791804,13.682581 7.6613982,13.572036 7.7505296,13.436341 7.9288042,13.164938 8.1286318,12.79242 8.3379678,12.344408 8.7566305,11.448378 9.2100554,10.25543 9.5520374,9.0389898 9.5617207,9.0045404 9.5694231,8.9704549 9.5789245,8.9359937 Z M 12.954071,9.3037685 13.630832,9.4828714 13.451274,10.159632 12.77497,9.9800741 Z"
+ style="opacity:1;" />
+ </g>
+</svg>
diff --git a/share/icons/hicolor/symbolic/actions/info-symbolic.svg b/share/icons/hicolor/symbolic/actions/infopop-outline-symbolic.svg
index a660d5ef8..a660d5ef8 100644
--- a/share/icons/hicolor/symbolic/actions/info-symbolic.svg
+++ b/share/icons/hicolor/symbolic/actions/infopop-outline-symbolic.svg
diff --git a/share/icons/hicolor/symbolic/actions/infopop-symbolic.svg b/share/icons/hicolor/symbolic/actions/infopop-symbolic.svg
new file mode 100644
index 000000000..3d5dfe2ba
--- /dev/null
+++ b/share/icons/hicolor/symbolic/actions/infopop-symbolic.svg
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) and export_objects.py -->
+
+<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="svg1" width="16" height="16" viewBox="0 0 16 16" sodipodi:docname="infopop-symbolic.svg" inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+<defs id="defs9" />
+<sodipodi:namedview objecttolerance="10" gridtolerance="10" guidetolerance="10" id="namedview" showgrid="true" inkscape:zoom="27.16619" inkscape:cx="7.594211" inkscape:cy="8.990675" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-width="1280" inkscape:window-height="960" inkscape:window-maximized="1" inkscape:current-layer="layer">
+<inkscape:grid type="xygrid" id="grid" />
+</sodipodi:namedview>
+<metadata id="metadata1906">
+<rdf:RDF>
+<cc:Work rdf:about="">
+<dc:format>image/svg+xml</dc:format>
+<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+<cc:license rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
+<dc:title>fe Editor new Icons proposal</dc:title>
+<dc:date>13 Nov 2018</dc:date>
+<dc:creator>
+<cc:Agent>
+<dc:title>Ramón Miranda</dc:title>
+</cc:Agent>
+</dc:creator>
+<dc:rights>
+<cc:Agent>
+<dc:title>see the license tab</dc:title>
+</cc:Agent>
+</dc:rights>
+<dc:subject>
+<rdf:Bag>
+<rdf:li>icon ui</rdf:li>
+</rdf:Bag>
+</dc:subject>
+<dc:description>This is a little contribution with Inkscape Project
+Ramon Miranda www.ramonmiranda.com (design and SVG file)
+Jabiertxo (SVG stuff to integrate them in UI)</dc:description>
+<dc:publisher>
+<cc:Agent>
+<dc:title />
+</cc:Agent>
+</dc:publisher>
+<dc:identifier />
+<dc:source />
+<dc:relation />
+<dc:language>-</dc:language>
+<dc:coverage />
+<dc:contributor>
+<cc:Agent>
+<dc:title>Ramon Miranda
+Jabier Arraiza</dc:title>
+</cc:Agent>
+</dc:contributor>
+</cc:Work>
+<cc:License rdf:about="http://creativecommons.org/publicdomain/zero/1.0/">
+<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
+<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
+<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
+</cc:License>
+</rdf:RDF>
+</metadata>
+<g inkscape:groupmode="layer" id="layer" inkscape:label="info">
+<path id="rect22048" d="M 0,0 H 16 V 16 H 0 Z" style="opacity:0;fill:none" />
+<path style="opacity:1;fill:#000000" d="m 3.070313,0.9472656 c -0.654299,0 -1.191407,0.5537514 -1.191407,1.2070314 V 13.96094 c 0,0.65328 0.535471,1.20898 1.191407,1.20898 h 9.335937 c 0.65593,0 1.18945,-0.55731 1.18945,-1.20898 V 13.5918 l 1.61914,-1.39258 -0.36132,-0.35938 C 14.58961,11.57593 13.78846,10.82987 13.5957,10.65039 V 2.154297 c 10e-6,-0.65168 -0.53515,-1.2070314 -1.18945,-1.2070314 z" id="path4934" />
+<path style="opacity:1;fill:#ffffff" d="m 8.931641,3.919922 c -0.08296,-0.01028 -0.167602,-0.0088 -0.25,0.002 C 8.283826,3.973972 7.937171,4.261488 7.826172,4.650391 7.730567,4.98744 7.825424,5.38839 8.097656,5.582031 8.412425,5.80758 8.872844,5.789979 9.212891,5.574219 9.64911,5.297936 9.779155,4.718787 9.544922,4.304687 9.416402,4.077684 9.180512,3.950767 8.931641,3.919922 Z" id="path4930" />
+<path style="opacity:1;fill:#ffffff" d="M 7.988281,6.195312 C 7.610721,6.229422 7.075456,6.340752 6.472656,6.839844 6.245797,7.027814 5.62927,7.61644 5.564453,7.888672 5.537716,7.999671 5.667053,8.137185 5.791016,8.058594 6.011394,7.919237 6.400246,7.280925 6.808594,7.060547 7.010337,6.951979 7.192001,7.015935 7.142578,7.269531 7.115679,7.408078 6.770287,8.203903 6.591797,8.673828 6.283105,9.486473 5.889877,10.2807 5.757812,11.14844 c -0.04456,0.29573 0.01295,0.64727 0.328125,0.78906 0.373509,0.17014 0.884535,0.0494 1.273438,-0.11914 C 8.064261,11.51291 8.959497,10.72814 9.185547,10.20312 9.241452,10.07349 9.116671,9.880582 9,9.964844 8.714805,10.17064 8.305005,10.81886 7.935547,10.96875 7.71922,11.05463 7.611657,10.91127 7.722656,10.57422 7.819072,10.2793 8.379533,8.80706 8.667969,8.019531 8.829201,7.574724 9.052104,7.054805 8.873047,6.603516 8.737093,6.260885 8.323791,6.164678 7.988281,6.195312 Z" id="path8690" />
+</g>
+</svg>
diff --git a/share/ui/dialog-livepatheffect-add-effect.ui b/share/ui/dialog-livepatheffect-add-effect.ui
index 77a11b4b8..08edbe792 100644
--- a/share/ui/dialog-livepatheffect-add-effect.ui
+++ b/share/ui/dialog-livepatheffect-add-effect.ui
@@ -2,195 +2,234 @@
<!-- Generated with glade 3.22.1 -->
<interface>
<requires lib="gtk+" version="3.20"/>
- <object class="GtkBox" id="LPESelectorEffect">
- <property name="width_request">200</property>
+ <object class="GtkEventBox" id="LPESelectorEffect">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="double_buffered">False</property>
- <property name="halign">center</property>
- <property name="hexpand">False</property>
- <property name="orientation">vertical</property>
- <property name="baseline_position">top</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="visible_window">False</property>
<child>
- <object class="GtkOverlay">
+ <object class="GtkBox" id="LPESelectorEffectBox">
+ <property name="width_request">200</property>
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can_focus">True</property>
+ <property name="double_buffered">False</property>
+ <property name="halign">center</property>
+ <property name="hexpand">False</property>
+ <property name="orientation">vertical</property>
+ <property name="baseline_position">top</property>
<child>
- <object class="GtkImage" id="LPEIcon">
+ <object class="GtkOverlay">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">center</property>
- <property name="valign">start</property>
- <property name="pixel_size">80</property>
- <property name="icon_name">align-vertical-baseline</property>
- <property name="icon_size">6</property>
- </object>
- <packing>
- <property name="index">1</property>
- </packing>
- </child>
- <child type="overlay">
- <object class="GtkEventBox" id="LPESelectorEffectFavLauncherTop">
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="halign">end</property>
- <property name="valign">start</property>
<child>
- <object class="GtkImage">
+ <object class="GtkImage" id="LPEIcon">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="halign">start</property>
+ <property name="halign">center</property>
<property name="valign">start</property>
- <property name="pixel_size">30</property>
- <property name="icon_name">draw-star</property>
- <property name="icon_size">2</property>
- <style>
- <class name="fab"/>
- </style>
+ <property name="pixel_size">80</property>
+ <property name="icon_name">align-vertical-baseline</property>
+ <property name="icon_size">6</property>
</object>
+ <packing>
+ <property name="index">1</property>
+ </packing>
</child>
- </object>
- <packing>
- <property name="index">2</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LPEName">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">LPEName</property>
- <property name="justify">center</property>
- <style>
- <class name="lpename"/>
- </style>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="LPEDescription">
- <property name="width_request">200</property>
- <property name="can_focus">False</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Description</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="max_width_chars">20</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="padding">10</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkButtonBox">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="layout_style">start</property>
- <child>
- <object class="GtkEventBox" id="LPESelectorEffectInfoLauncher">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkImage">
+ <child type="overlay">
+ <object class="GtkEventBox" id="LPESelectorEffectEventFavTop">
+ <property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="halign">end</property>
- <property name="pixel_size">30</property>
- <property name="icon_name">info</property>
- <property name="icon_size">2</property>
- <style>
- <class name="info"/>
- </style>
+ <property name="valign">start</property>
+ <child>
+ <object class="GtkImage" id="LPESelectorEffectFavTop">
+ <property name="name">LPESelectorEffectFavTop</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="pixel_size">30</property>
+ <property name="icon_name">draw-star</property>
+ <property name="icon_size">2</property>
+ <style>
+ <class name="fab"/>
+ </style>
+ </object>
+ </child>
</object>
+ <packing>
+ <property name="index">2</property>
+ </packing>
</child>
</object>
<packing>
<property name="expand">False</property>
- <property name="fill">False</property>
+ <property name="fill">True</property>
<property name="position">0</property>
- <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkEventBox" id="LPESelectorEffectFavLauncher">
+ <object class="GtkLabel" id="LPEName">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <child>
- <object class="GtkImage">
- <property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="pixel_size">30</property>
- <property name="icon_name">draw-star-outline</property>
- <property name="icon_size">2</property>
- <style>
- <class name="fab"/>
- </style>
- </object>
- </child>
+ <property name="label" translatable="yes">LPEName</property>
+ <property name="justify">center</property>
+ <property name="ellipsize">end</property>
+ <property name="width_chars">14</property>
+ <style>
+ <class name="lpename"/>
+ </style>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
<property name="position">1</property>
- <property name="non_homogeneous">True</property>
</packing>
</child>
<child>
- <object class="GtkImage">
+ <object class="GtkLabel" id="LPEDescription">
+ <property name="width_request">200</property>
<property name="can_focus">False</property>
- <property name="halign">end</property>
- <property name="pixel_size">30</property>
- <property name="icon_name">on</property>
- <property name="icon_size">2</property>
- <style>
- <class name="apply"/>
- </style>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Description</property>
+ <property name="justify">center</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">20</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="padding">10</property>
<property name="position">2</property>
- <property name="non_homogeneous">True</property>
</packing>
</child>
+ <child>
+ <object class="GtkCheckButton" id="LPEExperimental">
+ <property name="label" translatable="yes">Experimental</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButtonBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="baseline_position">top</property>
+ <property name="layout_style">center</property>
+ <child>
+ <object class="GtkEventBox" id="LPESelectorEffectEventInfo">
+ <property name="name">LPESelectorEffectEventInfo</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="visible_window">False</property>
+ <child>
+ <object class="GtkImage" id="LPESelectorEffectInfo">
+ <property name="name">LPESelectorEffectInfo</property>
+ <property name="can_focus">False</property>
+ <property name="halign">end</property>
+ <property name="valign">start</property>
+ <property name="pixel_size">30</property>
+ <property name="icon_name">infopop-outline</property>
+ <property name="icon_size">2</property>
+ <style>
+ <class name="info"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ <property name="non_homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEventBox" id="LPESelectorEffectEventFav">
+ <property name="name">LPESelectorEffectEventFav</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="visible_window">False</property>
+ <child>
+ <object class="GtkImage" id="LPESelectorEffectFav">
+ <property name="name">LPESelectorEffectFav</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ <property name="valign">start</property>
+ <property name="pixel_size">30</property>
+ <property name="icon_name">draw-star-outline</property>
+ <property name="icon_size">2</property>
+ <style>
+ <class name="fab"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">1</property>
+ <property name="non_homogeneous">True</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkEventBox" id="LPESelectorEffectEventApply">
+ <property name="name">LPESelectorEffectEventApply</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="visible_window">False</property>
+ <child>
+ <object class="GtkImage">
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">start</property>
+ <property name="pixel_size">30</property>
+ <property name="icon_name">on</property>
+ <property name="icon_size">2</property>
+ <style>
+ <class name="apply"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">2</property>
+ <property name="non_homogeneous">True</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ <style>
+ <class name="lpeselectoreffect"/>
+ </style>
</object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
- <property name="position">3</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="LPEExperimental">
- <property name="label" translatable="yes">Experimental</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="no_show_all">True</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">5</property>
- </packing>
</child>
- <style>
- <class name="lpeselectoreffect"/>
- </style>
</object>
</interface>
diff --git a/share/ui/dialog-livepatheffect-add.ui b/share/ui/dialog-livepatheffect-add.ui
index 0fbdb6a6f..2a695c8cf 100644
--- a/share/ui/dialog-livepatheffect-add.ui
+++ b/share/ui/dialog-livepatheffect-add.ui
@@ -126,8 +126,8 @@
</child>
<child>
<object class="GtkLabel" id="LPEInfo">
- <property name="visible">True</property>
<property name="can_focus">False</property>
+ <property name="no_show_all">True</property>
<property name="label" translatable="yes">Message</property>
<property name="justify">center</property>
<property name="ellipsize">end</property>
@@ -160,9 +160,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
- <property name="column_spacing">10</property>
- <property name="row_spacing">10</property>
- <property name="min_children_per_line">4</property>
+ <property name="column_spacing">2</property>
+ <property name="row_spacing">2</property>
+ <property name="min_children_per_line">3</property>
+ <property name="max_children_per_line">20</property>
</object>
</child>
</object>
@@ -191,9 +192,8 @@
<class name="colordefault"/>
</style>
</object>
- <object class="GtkPopover" id="LPESelectorEffectInfo">
- <property name="name">LPESelectorEffectInfo</property>
- <property name="visible">True</property>
+ <object class="GtkPopover" id="LPESelectorEffectInfoPop">
+ <property name="name">LPESelectorEffectInfoPop</property>
<property name="can_focus">False</property>
<property name="no_show_all">True</property>
<property name="valign">start</property>
diff --git a/share/ui/style.css b/share/ui/style.css
index 64779bd39..15d088da9 100644
--- a/share/ui/style.css
+++ b/share/ui/style.css
@@ -219,14 +219,14 @@ spinbutton undershoot {
border-right-width:0;
}
-#lpeflow GtkFlowBoxChild,
-#lpeflow flowboxchild{
- border-width:0px;
- border-radius:6px;
- margin:10px;
- margin-bottom:30px;
- padding-bottom:10px;
-}
+ #lpeflow GtkFlowBoxChild,
+ #lpeflow flowboxchild{
+ border-width:0px;
+ border-radius:6px;
+ margin:10px;
+ margin-bottom:30px;
+ padding-bottom:10px;
+ }
#lpeflow GtkFlowBoxChild.lpeactive,
#lpeflow flowboxchild.lpeactive{
@@ -268,7 +268,7 @@ spinbutton undershoot {
padding:20px;
}
-#LPESelectorEffectInfo{
+#LPESelectorEffectInfoPop{
padding:15px;
}
#LPESelectorEffectInfoName{
diff --git a/src/ui/dialog/livepatheffect-add.cpp b/src/ui/dialog/livepatheffect-add.cpp
index 9137f529d..c438cfa3e 100644
--- a/src/ui/dialog/livepatheffect-add.cpp
+++ b/src/ui/dialog/livepatheffect-add.cpp
@@ -54,6 +54,25 @@ void sp_remove_fav(Glib::ustring effect){
}
}
+bool
+LivePathEffectAdd::mouseover(GdkEventCrossing* evt, GtkWidget *wdg)
+{
+ GdkDisplay *display = gdk_display_get_default();
+ GdkCursor *cursor = gdk_cursor_new_for_display(display, GDK_HAND2);
+ GdkWindow *window = gtk_widget_get_window(wdg);
+ gdk_window_set_cursor(window, cursor);
+ g_object_unref(cursor);
+ return true;
+}
+
+bool
+LivePathEffectAdd::mouseout(GdkEventCrossing* evt, GtkWidget *wdg)
+{
+ GdkWindow *window = gtk_widget_get_window(wdg);
+ gdk_window_set_cursor(window, nullptr);
+ return true;
+}
+
LivePathEffectAdd::LivePathEffectAdd()
: converter(Inkscape::LivePathEffect::LPETypeConverter)
{
@@ -66,12 +85,14 @@ LivePathEffectAdd::LivePathEffectAdd()
}
_builder->get_widget("LPEDialogSelector", _LPEDialogSelector);
_builder->get_widget("LPESelectorFlowBox", _LPESelectorFlowBox);
- _builder->get_widget("LPESelectorEffectInfo", _LPESelectorEffectInfo);
+ _builder->get_widget("LPESelectorEffectInfoPop", _LPESelectorEffectInfoPop);
_builder->get_widget("LPEFilter", _LPEFilter);
_builder->get_widget("LPEInfo", _LPEInfo);
_builder->get_widget("LPEExperimentals", _LPEExperimentals);
_builder->get_widget("LPEScrolled", _LPEScrolled);
_LPEFilter->signal_search_changed().connect(sigc::mem_fun(*this, &LivePathEffectAdd::on_search));
+ _LPESelectorFlowBox->signal_child_activated().connect(sigc::mem_fun(*this, &LivePathEffectAdd::on_activate));
+ _LPEDialogSelector->add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK );
Glib::ustring effectgladefile = get_filename(Inkscape::IO::Resource::UIS, "dialog-livepatheffect-add-effect.ui");
for (int i = 0; i < static_cast<int>(converter._length); ++i) {
Glib::RefPtr<Gtk::Builder> builder_effect;
@@ -81,7 +102,7 @@ LivePathEffectAdd::LivePathEffectAdd()
g_warning("Glade file loading failed for filter effect dialog");
return;
}
- Gtk::Box *LPESelectorEffect;
+ Gtk::EventBox *LPESelectorEffect;
builder_effect->get_widget("LPESelectorEffect", LPESelectorEffect);
const LivePathEffect::EnumEffectData<LivePathEffect::EffectType> *data = &converter.data(i);
Gtk::Label *LPEName;
@@ -97,25 +118,28 @@ LivePathEffectAdd::LivePathEffectAdd()
Gtk::Image *LPEIcon;
builder_effect->get_widget("LPEIcon", LPEIcon);
LPEIcon->set_from_icon_name(converter.get_icon(data->id), Gtk::BuiltinIconSize(Gtk::ICON_SIZE_DIALOG));
- Gtk::EventBox *LPESelectorEffectInfoLauncher;
- builder_effect->get_widget("LPESelectorEffectInfoLauncher", LPESelectorEffectInfoLauncher);
- LPESelectorEffectInfoLauncher->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::pop_description), builder_effect));
- Gtk::EventBox *LPESelectorEffectFavLauncher;
- builder_effect->get_widget("LPESelectorEffectFavLauncher", LPESelectorEffectFavLauncher);
- Gtk::EventBox *LPESelectorEffectFavLauncherTop;
- builder_effect->get_widget("LPESelectorEffectFavLauncherTop", LPESelectorEffectFavLauncherTop);
- LPESelectorEffectFavLauncher ->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::fav_toggler), builder_effect));
- LPESelectorEffectFavLauncherTop->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::fav_toggler), builder_effect));
+ Gtk::EventBox *LPESelectorEffectEventInfo;
+ //LPESelectorEffectEventFav->add_events(Gdk::BUTTON_PRESS_MASK);
+ builder_effect->get_widget("LPESelectorEffectEventInfo", LPESelectorEffectEventInfo);
+ LPESelectorEffectEventInfo->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::pop_description), builder_effect));
+ Gtk::EventBox *LPESelectorEffectEventFav;
+ builder_effect->get_widget("LPESelectorEffectEventFav", LPESelectorEffectEventFav);
+ // LPESelectorEffectEventFav->add_events(Gdk::BUTTON_PRESS_MASK);
+ Gtk::EventBox *LPESelectorEffectEventFavTop;
+ builder_effect->get_widget("LPESelectorEffectEventFavTop", LPESelectorEffectEventFavTop);
+ //LPESelectorEffectFavTop->add_events(Gdk::BUTTON_PRESS_MASK);
+ LPESelectorEffectEventFav ->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::fav_toggler), builder_effect));
+ LPESelectorEffectEventFavTop->signal_button_press_event().connect(sigc::bind<Glib::RefPtr<Gtk::Builder> >(sigc::mem_fun(*this, &LivePathEffectAdd::fav_toggler), builder_effect));
+ LPESelectorEffect->signal_enter_notify_event().connect(sigc::bind<GtkWidget *>(sigc::mem_fun(*this, &LivePathEffectAdd::mouseover), GTK_WIDGET(LPESelectorEffect->gobj())));
+ LPESelectorEffect->signal_leave_notify_event().connect(sigc::bind<GtkWidget *>(sigc::mem_fun(*this, &LivePathEffectAdd::mouseout), GTK_WIDGET(LPESelectorEffect->gobj())));
_LPESelectorFlowBox->insert(*LPESelectorEffect, i);
}
_visiblelpe = _LPESelectorFlowBox->get_children().size();
- _LPESelectorFlowBox->signal_child_activated().connect(sigc::mem_fun(*this, &LivePathEffectAdd::on_activate));
- _LPEDialogSelector->show_all_children();
- _LPEDialogSelector->add_events(Gdk::POINTER_MOTION_MASK | Gdk::BUTTON_PRESS_MASK | Gdk::BUTTON_RELEASE_MASK | Gdk::ENTER_NOTIFY_MASK | Gdk::LEAVE_NOTIFY_MASK );
_LPEInfo->set_visible(false);
_LPESelectorFlowBox->set_sort_func(sigc::mem_fun(*this, &LivePathEffectAdd::on_sort));
_LPESelectorFlowBox->set_filter_func(sigc::mem_fun(*this, &LivePathEffectAdd::on_filter));
_LPEExperimentals->property_active().signal_changed().connect(sigc::mem_fun(*this, &LivePathEffectAdd::reload_effect_list));
+ _LPEDialogSelector->show_all_children();
}
void LivePathEffectAdd::on_activate(Gtk::FlowBoxChild *child)
@@ -125,12 +149,15 @@ void LivePathEffectAdd::on_activate(Gtk::FlowBoxChild *child)
leitem->get_style_context()->remove_class("lpeactive");
leitem->get_style_context()->remove_class("colorinverse");
leitem->get_style_context()->remove_class("backgroundinverse");
- Gtk::Box *box = dynamic_cast<Gtk::Box *>(leitem->get_child());
- if (box) {
- std::vector<Gtk::Widget *> contents = box->get_children();
- Gtk::Box *actions = dynamic_cast<Gtk::Box *>(contents[4]);
- if (actions) {
- actions->set_visible(false);
+ Gtk::EventBox *eventbox = dynamic_cast<Gtk::EventBox *>(leitem->get_child());
+ if (eventbox) {
+ Gtk::Box *box = dynamic_cast<Gtk::Box *>(eventbox->get_child());
+ if (box) {
+ std::vector<Gtk::Widget *> contents = box->get_children();
+ Gtk::Box *actions = dynamic_cast<Gtk::Box *>(contents[4]);
+ if (actions) {
+ actions->set_visible(false);
+ }
}
}
}
@@ -142,9 +169,9 @@ void LivePathEffectAdd::on_activate(Gtk::FlowBoxChild *child)
bool LivePathEffectAdd::pop_description(GdkEventButton* evt, Glib::RefPtr<Gtk::Builder> builder_effect)
{
- Gtk::EventBox *LPESelectorEffectInfoLauncher;
- builder_effect->get_widget("LPESelectorEffectInfoLauncher", LPESelectorEffectInfoLauncher);
- _LPESelectorEffectInfo->set_relative_to(*LPESelectorEffectInfoLauncher->get_children()[0]);
+ Gtk::Image *LPESelectorEffectInfo;
+ builder_effect->get_widget("LPESelectorEffectInfo", LPESelectorEffectInfo);
+ _LPESelectorEffectInfoPop->set_relative_to(*LPESelectorEffectInfo);
Gtk::Label *LPEName;
builder_effect->get_widget("LPEName", LPEName);
@@ -165,35 +192,33 @@ bool LivePathEffectAdd::pop_description(GdkEventButton* evt, Glib::RefPtr<Gtk::B
_builder->get_widget("LPESelectorEffectInfoDescription", LPESelectorEffectInfoDescription);
LPESelectorEffectInfoDescription->set_text(LPEDescription->get_text());
- _LPESelectorEffectInfo->show();
+ _LPESelectorEffectInfoPop->show();
return true;
}
bool LivePathEffectAdd::fav_toggler(GdkEventButton* evt, Glib::RefPtr<Gtk::Builder> builder_effect)
{
- Gtk::Box *LPESelectorEffect;
+ Gtk::EventBox *LPESelectorEffect;
builder_effect->get_widget("LPESelectorEffect", LPESelectorEffect);
Gtk::Label *LPEName;
builder_effect->get_widget("LPEName", LPEName);
- Gtk::EventBox *LPESelectorEffectFavLauncher;
- builder_effect->get_widget("LPESelectorEffectFavLauncher", LPESelectorEffectFavLauncher);
- Gtk::Image *favimg = dynamic_cast<Gtk::Image *>(LPESelectorEffectFavLauncher->get_child());
- Gtk::EventBox *LPESelectorEffectFavLauncherTop;
- builder_effect->get_widget("LPESelectorEffectFavLauncherTop", LPESelectorEffectFavLauncherTop);
- Gtk::Image *favimgtop = dynamic_cast<Gtk::Image *>(LPESelectorEffectFavLauncherTop->get_child());
- if (favimg && favimgtop) {
+ Gtk::Image *LPESelectorEffectFav;
+ builder_effect->get_widget("LPESelectorEffectFav", LPESelectorEffectFav);
+ Gtk::EventBox *LPESelectorEffectEventFavTop;
+ builder_effect->get_widget("LPESelectorEffectEventFavTop", LPESelectorEffectEventFavTop);
+ if (LPESelectorEffectFav && LPESelectorEffectEventFavTop) {
if (sp_has_fav(LPEName->get_text())){
//favimg->set_from_icon_name("draw-star-outline", Gtk::IconSize(30));
- LPESelectorEffectFavLauncherTop->set_visible(false);
- LPESelectorEffectFavLauncherTop->hide();
+ LPESelectorEffectEventFavTop->set_visible(false);
+ LPESelectorEffectEventFavTop->hide();
sp_remove_fav(LPEName->get_text());
LPESelectorEffect->get_parent()->get_style_context()->remove_class("lpefav");
_LPESelectorFlowBox->invalidate_sort();
} else {
//favimg->set_from_icon_name("draw-star", Gtk::IconSize(30));
- LPESelectorEffectFavLauncherTop->set_visible(true);
- LPESelectorEffectFavLauncherTop->show();
+ LPESelectorEffectEventFavTop->set_visible(true);
+ LPESelectorEffectEventFavTop->show();
sp_add_fav(LPEName->get_text());
LPESelectorEffect->get_parent()->get_style_context()->add_class("lpefav");
Glib::RefPtr< Gtk::Adjustment > vadjust = _LPEScrolled->get_vadjustment();
@@ -206,33 +231,36 @@ bool LivePathEffectAdd::fav_toggler(GdkEventButton* evt, Glib::RefPtr<Gtk::Build
bool LivePathEffectAdd::on_filter(Gtk::FlowBoxChild *child)
{
- Gtk::Box *box = dynamic_cast<Gtk::Box *>(child->get_child());
- if (box) {
- std::vector<Gtk::Widget *> contents = box->get_children();
- Gtk::ToggleButton *experimental = dynamic_cast<Gtk::ToggleButton *>(contents[3]);
- if (experimental) {
- if (experimental->get_active() && !_LPEExperimentals->get_active()) {
- return false;
+ Gtk::EventBox *eventbox = dynamic_cast<Gtk::EventBox *>(child->get_child());
+ if (eventbox) {
+ Gtk::Box *box = dynamic_cast<Gtk::Box *>(eventbox->get_child());
+ if (box) {
+ std::vector<Gtk::Widget *> contents = box->get_children();
+ Gtk::ToggleButton *experimental = dynamic_cast<Gtk::ToggleButton *>(contents[3]);
+ if (experimental) {
+ if (experimental->get_active() && !_LPEExperimentals->get_active()) {
+ return false;
+ }
}
- }
- if (_LPEFilter->get_text().length() < 1) {
- _visiblelpe++;
- return true;
- }
- Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
- if (lpename) {
- size_t s = lpename->get_text().uppercase().find(_LPEFilter->get_text().uppercase(), 0);
- if (s != -1) {
+ if (_LPEFilter->get_text().length() < 1) {
_visiblelpe++;
return true;
}
- }
- Gtk::Label *lpedesc = dynamic_cast<Gtk::Label *>(contents[2]);
- if (lpedesc) {
- size_t s = lpedesc->get_text().uppercase().find(_LPEFilter->get_text().uppercase(), 0);
- if (s != -1) {
- _visiblelpe++;
- return true;
+ Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
+ if (lpename) {
+ size_t s = lpename->get_text().uppercase().find(_LPEFilter->get_text().uppercase(), 0);
+ if (s != -1) {
+ _visiblelpe++;
+ return true;
+ }
+ }
+ Gtk::Label *lpedesc = dynamic_cast<Gtk::Label *>(contents[2]);
+ if (lpedesc) {
+ size_t s = lpedesc->get_text().uppercase().find(_LPEFilter->get_text().uppercase(), 0);
+ if (s != -1) {
+ _visiblelpe++;
+ return true;
+ }
}
}
}
@@ -262,33 +290,39 @@ int LivePathEffectAdd::on_sort(Gtk::FlowBoxChild *child1, Gtk::FlowBoxChild *chi
{
Glib::ustring name1 = "";
Glib::ustring name2 = "";
- Gtk::Box *box = dynamic_cast<Gtk::Box *>(child1->get_child());
- if (box) {
- std::vector<Gtk::Widget *> contents = box->get_children();
- Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
- name1 = lpename->get_text();
- Gtk::Overlay *overlay = dynamic_cast<Gtk::Overlay *>(contents[0]);
- if (overlay) {
- std::vector<Gtk::Widget *> contents_overlay = overlay->get_children();
- Gtk::EventBox *LPESelectorEffectFavLauncherTop = dynamic_cast<Gtk::EventBox *>(contents_overlay[1]);
- if (LPESelectorEffectFavLauncherTop) {
- if (sp_has_fav(name1)){
- LPESelectorEffectFavLauncherTop->set_visible(true);
- LPESelectorEffectFavLauncherTop->show();
- child1->get_style_context()->add_class("lpefav");
- } else {
- LPESelectorEffectFavLauncherTop->set_visible(false);
- LPESelectorEffectFavLauncherTop->hide();
- child1->get_style_context()->remove_class("lpefav");
+ Gtk::EventBox *eventbox = dynamic_cast<Gtk::EventBox *>(child1->get_child());
+ if (eventbox) {
+ Gtk::Box *box = dynamic_cast<Gtk::Box *>(eventbox->get_child());
+ if (box) {
+ std::vector<Gtk::Widget *> contents = box->get_children();
+ Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
+ name1 = lpename->get_text();
+ Gtk::Overlay *overlay = dynamic_cast<Gtk::Overlay *>(contents[0]);
+ if (overlay) {
+ std::vector<Gtk::Widget *> contents_overlay = overlay->get_children();
+ Gtk::EventBox *LPESelectorEffectEventFavTop = dynamic_cast<Gtk::EventBox *>(contents_overlay[1]);
+ if (LPESelectorEffectEventFavTop) {
+ if (sp_has_fav(name1)){
+ LPESelectorEffectEventFavTop->set_visible(true);
+ LPESelectorEffectEventFavTop->show();
+ child1->get_style_context()->add_class("lpefav");
+ } else {
+ LPESelectorEffectEventFavTop->set_visible(false);
+ LPESelectorEffectEventFavTop->hide();
+ child1->get_style_context()->remove_class("lpefav");
+ }
}
}
}
}
- box = dynamic_cast<Gtk::Box *>(child2->get_child());
- if (box) {
- std::vector<Gtk::Widget *> contents = box->get_children();
- Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
- name2 = lpename->get_text();
+ eventbox = dynamic_cast<Gtk::EventBox *>(child2->get_child());
+ if (eventbox) {
+ Gtk::Box *box = dynamic_cast<Gtk::Box *>(eventbox->get_child());
+ if (box) {
+ std::vector<Gtk::Widget *> contents = box->get_children();
+ Gtk::Label *lpename = dynamic_cast<Gtk::Label *>(contents[1]);
+ name2 = lpename->get_text();
+ }
}
std::vector<Glib::ustring> effect;
diff --git a/src/ui/dialog/livepatheffect-add.h b/src/ui/dialog/livepatheffect-add.h
index b99c40ece..f0f75ee3d 100644
--- a/src/ui/dialog/livepatheffect-add.h
+++ b/src/ui/dialog/livepatheffect-add.h
@@ -42,7 +42,7 @@ namespace Dialog {
class LivePathEffectAdd {
public:
LivePathEffectAdd();
- ~LivePathEffectAdd(){};
+ ~LivePathEffectAdd()= default;;
/**
* Show the dialog
@@ -63,6 +63,8 @@ public:
void on_activate(Gtk::FlowBoxChild *child);
bool pop_description(GdkEventButton* evt, Glib::RefPtr<Gtk::Builder> builder_effect);
bool fav_toggler(GdkEventButton* evt, Glib::RefPtr<Gtk::Builder> builder_effect);
+ bool mouseover(GdkEventCrossing* evt, GtkWidget *wdg);
+ bool mouseout(GdkEventCrossing* evt, GtkWidget *wdg);
void reload_effect_list();
/**
* Add button was clicked
@@ -83,7 +85,7 @@ private:
Gtk::Dialog *_LPEDialogSelector;
Glib::RefPtr<Gtk::Builder> _builder;
Gtk::FlowBox *_LPESelectorFlowBox;
- Gtk::Popover *_LPESelectorEffectInfo;
+ Gtk::Popover *_LPESelectorEffectInfoPop;
Gtk::Switch * _LPEExperimentals;
Gtk::SearchEntry *_LPEFilter;
Gtk::ScrolledWindow *_LPEScrolled;