From 54217a0f87dd613c88f7d7867d08b03e6bdc2da2 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Tue, 13 Feb 2024 21:35:46 +0100 Subject: [PATCH 1/3] Add Colibre icons for template dialog --- images-ng/colibre/builtin.svg | 1 + images-ng/colibre/internet.svg | 1 + images-ng/colibre/mapping.csv | 4 +++ images-ng/colibre/multifile.svg | 1 + images-ng/colibre/tex-template.svg | 54 +++++++++++++++++++++++++++++ images-ng/tex-template.svgz | Bin 0 -> 3254 bytes images.qrc | 5 +++ src/templateselector.cpp | 1 + 8 files changed, 67 insertions(+) create mode 100644 images-ng/colibre/builtin.svg create mode 100755 images-ng/colibre/internet.svg create mode 100644 images-ng/colibre/mapping.csv create mode 100644 images-ng/colibre/multifile.svg create mode 100644 images-ng/colibre/tex-template.svg create mode 100644 images-ng/tex-template.svgz diff --git a/images-ng/colibre/builtin.svg b/images-ng/colibre/builtin.svg new file mode 100644 index 0000000000..8bf7023110 --- /dev/null +++ b/images-ng/colibre/builtin.svg @@ -0,0 +1 @@ +/&amp;amp;amp;amp;gt; \ No newline at end of file diff --git a/images-ng/colibre/internet.svg b/images-ng/colibre/internet.svg new file mode 100755 index 0000000000..55e07a1bdc --- /dev/null +++ b/images-ng/colibre/internet.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images-ng/colibre/mapping.csv b/images-ng/colibre/mapping.csv new file mode 100644 index 0000000000..a151bdcb4c --- /dev/null +++ b/images-ng/colibre/mapping.csv @@ -0,0 +1,4 @@ +colibre,texstudio +sc_compilebasic,builtin +onlineupdate_16,internet +sc_flowchartshapes.flowchart-multidocument,multifile diff --git a/images-ng/colibre/multifile.svg b/images-ng/colibre/multifile.svg new file mode 100644 index 0000000000..3b96968f36 --- /dev/null +++ b/images-ng/colibre/multifile.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/images-ng/colibre/tex-template.svg b/images-ng/colibre/tex-template.svg new file mode 100644 index 0000000000..4d6ec8f6ea --- /dev/null +++ b/images-ng/colibre/tex-template.svg @@ -0,0 +1,54 @@ + + + + + + + + diff --git a/images-ng/tex-template.svgz b/images-ng/tex-template.svgz new file mode 100644 index 0000000000000000000000000000000000000000..4b9086ed54a687aa1f39005ff7e215d2476f010b GIT binary patch literal 3254 zcmV;n3`z4JiwFP!000000Nq+ybK5u)ejfh{t@1Ldl_;Df;MkdpWjmFs%+Azij(tnf zA|!J|lPZ$3<^1~X1`m-GDO-tm9!8u=hz8I=e|@mg$k|WZyJ&Q8(kx8k^D%YEcx2*5 z5`^*UeEj=w*HbkfWw{>*ew4)Kd>kj^pWdFF{bM>Ey*IH*{X9ueNAH5<#*98h(I(3+ zX+)Vr95NYw`s4lRYP(L-eDrIySxrC0BgYc|DAqh3xeg(ti%l2>BT0o&uScWl^zF&X zS$4lV8I78oqhln5!TI>3|7g}R;$~JFJxVp`E?fcL?TqN7`F&PoqmKs$Z z32RFfzqrv)@6qY!>+UVKBQi z*_S+7&oVHFn`Aqyb}|Kkn6r*oz09`3Iy@gU=E&ae$96a18fT}~p!4xwj*(d+rTqo(D<_2bv z+4${QV3t|su=q}i1S+6r{Pcb52O+S>{$fO%?s|g2;0)}o7y_=4KSp2?NSZE^2;$Bw zLPS8w8%s*S8p8bXl)M>NGm_;pGY|?$O~Hk5G_Ysm(X72dqf_nkC=K+8ozORXOMJTw zv`+?M7nrr7>xXz%wth?fI0O5?J0IWqc^YniBojKB(g~SNxpuTxazX{fZo>5Ia?M9} zKAv*Lq1UTW*dmQ_M^cwET@9qWfz^h$NK*nC3c|=f)Aiv^!uj(ADGShn;-6+;j3ln-QFl18&^Q-)E(i?h~%07T=>T z;D68@2)TKNIUJ!aM4U8`W~za)^y=&Y;jR0=4OXgL7jQlK;fEh;*(L3rXPnJTP(1|NQ*%!{ul8`3R_5*miMm>BK6lEoVEz_n>!u zef6%4*fl0>53Y6~?`1QeciD*J(5a3{z%eolSj>+e{Ku@46we)}x2b{S!K(sA{dv%s z7}NAfh_!Iwi`~ST5(XsUHLzB$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|R%)KD*BZk{&r&MSxU}E8XU#hB?VHS?S>fUGsOU#fgz&PTCbi zoRofdJ?CvsY>*S>(i`G*!RPbK&Yr|DCyx(ux)fLJs*MvHMx2rIG}puFYJSbGWt-D5 z;*fsHAx_r-({Ur|B?=JlAIp1 zC&>pnDItdaN6pd4Rm-5n5sb9ERTLSFhh=U3@{%3Hel#W z0JE#LHY%;(3yU}O4I6}oYktAopHxqM8!YT7Slk9IVh2m3Y}+i_9tDh25aipRWHlVL z2pPP;dZp&-s*_Hsp`Znv;9M}o>D|S<`MVCM;m-u+VlZ`?%egxjZB7S16O;~q3@ zX$N;b{F&f{4&nsC9iBF)VZ;SJ@agj4aoe1R5tptv_`$ip#HY<^2=N2Aa(h0e^?-Yv zt;>IngCp_XmAcRqw0|BkKGCC(@RvgbQPiDKMxm_)B&y6d=GgE^(NGd~2d`MZ)Yyc; zX`6xym`AC?w+RFi=zzIMfRRXmiO_^s7ui*>u#BCj%YDFKUq?;B>pNOUzJcRtga;G+ z*+%1LxHzhw!lCTPSGx*nQNqpl%f28lbzRph%fAE?d@A^4svRvAhu>t%9nPraf_47& zYMcZH4|@yjoZ!I?d;d=U+*+PZ7_jwGEoRb-2zad?Rkh$)t+M;z^mGx zLR4*wYO4{T0Pq#1QVK1U;?_!`g;Ly7DX_LIm118jrF8eCD&17Z#KlWP!(Mk3+dxVc zcQ$fD5ehUlt|7U@CRH_VV2fbN+-=i}`yG^KN2MMdTah~NP^AmU+2#T;rm?!^*GIR3`POHEUFk)`E(Aa|t@>Cgc~?r0KPhFyUp3g45Fm|}QWR1u z?OBS8QbNPNSt&sdB5_6;E;_N||0bpEN~y@xx&$M&D)UfEML;HLrIaWM%3V(4iC207TO{`arG-^j!m#09~FtEG9UZ5HT on8U0^BTg0z^ldN|*images-ng/syncSource.svg images-ng/syncViewer-off.svg images-ng/syncViewer.svg +images-ng/tex-template.svgz images-ng/tikz.svg images-ng/toc.svg images-ng/underline.svg @@ -309,6 +310,7 @@ images-ng/colibre/bookmarks.svg images-ng/colibre/build_dm.svg images-ng/colibre/build.svg +images-ng/colibre/builtin.svg images-ng/colibre/case_dm.svg images-ng/colibre/case.svg images-ng/colibre/chapter_dm.svg @@ -459,6 +461,7 @@ images-ng/colibre/image.svg images-ng/colibre/include_dm.svg images-ng/colibre/include.svg +images-ng/colibre/internet.svg images-ng/colibre/italic_dm.svg images-ng/colibre/italic.svg images-ng/colibre/item_dm.svg @@ -517,6 +520,7 @@ images-ng/colibre/metapost.svg images-ng/colibre/modified_dm.svg images-ng/colibre/modified.svg +images-ng/colibre/multifile.svg images-ng/colibre/newline_dm.svg images-ng/colibre/newline.svg images-ng/colibre/non-comment_dm.svg @@ -591,6 +595,7 @@ images-ng/colibre/syncViewer-off_dm.svg images-ng/colibre/syncViewer-off.svg images-ng/colibre/syncViewer.svg +images-ng/colibre/tex-template.svg images-ng/colibre/tikz_dm.svg images-ng/colibre/tikz.svg images-ng/colibre/toc_dm.svg diff --git a/src/templateselector.cpp b/src/templateselector.cpp index d7f69674ae..09bcad7daa 100644 --- a/src/templateselector.cpp +++ b/src/templateselector.cpp @@ -308,6 +308,7 @@ void TemplateSelector::onRequestCompleted() if(i<0) continue; auto *item=rootItem->child(i); item->setData(0,TexRole,dd["download_url"].toString()); + if (name.endsWith(".tex")) item->setIcon(0,getRealIcon("tex-template")); if (name.endsWith(".zip")) item->setIcon(0,getRealIcon("multifile")); } }else{ From 114f1cea0bbc3374905f68a1963312f7e9e9a630 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Tue, 13 Feb 2024 21:44:31 +0100 Subject: [PATCH 2/3] Online template repository: Use Freedesktop icon name --- images-ng/colibre/{internet.svg => folder-cloud.svg} | 0 images-ng/colibre/mapping.csv | 2 +- images-ng/{internet.svg => folder-cloud.svg} | 0 images.qrc | 4 ++-- src/templateselector.cpp | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename images-ng/colibre/{internet.svg => folder-cloud.svg} (100%) rename images-ng/{internet.svg => folder-cloud.svg} (100%) diff --git a/images-ng/colibre/internet.svg b/images-ng/colibre/folder-cloud.svg similarity index 100% rename from images-ng/colibre/internet.svg rename to images-ng/colibre/folder-cloud.svg diff --git a/images-ng/colibre/mapping.csv b/images-ng/colibre/mapping.csv index a151bdcb4c..c8607489f3 100644 --- a/images-ng/colibre/mapping.csv +++ b/images-ng/colibre/mapping.csv @@ -1,4 +1,4 @@ colibre,texstudio sc_compilebasic,builtin -onlineupdate_16,internet +onlineupdate_16,folder-cloud sc_flowchartshapes.flowchart-multidocument,multifile diff --git a/images-ng/internet.svg b/images-ng/folder-cloud.svg similarity index 100% rename from images-ng/internet.svg rename to images-ng/folder-cloud.svg diff --git a/images.qrc b/images.qrc index 4b2487897c..7d3ef1ca3a 100644 --- a/images.qrc +++ b/images.qrc @@ -119,7 +119,7 @@ images-ng/highlight.svg images-ng/home.svg images-ng/image.svg -images-ng/internet.svg +images-ng/folder-cloud.svg images-ng/italic.svg images-ng/itemize.svgz images-ng/item.svgz @@ -461,7 +461,7 @@ images-ng/colibre/image.svg images-ng/colibre/include_dm.svg images-ng/colibre/include.svg -images-ng/colibre/internet.svg +images-ng/colibre/folder-cloud.svg images-ng/colibre/italic_dm.svg images-ng/colibre/italic.svg images-ng/colibre/item_dm.svg diff --git a/src/templateselector.cpp b/src/templateselector.cpp index 09bcad7daa..5805c82136 100644 --- a/src/templateselector.cpp +++ b/src/templateselector.cpp @@ -135,7 +135,7 @@ void TemplateSelector::addOnlineRepository() topitem->setData(0, ResourceRole, tr("Online available template files")); topitem->setData(0, UrlRole, QString("https://api.github.com/repos/texstudio-org/texstudio-template/contents")); topitem->setData(0, PathRole, QString("")); - topitem->setIcon(0,getRealIcon("internet")); + topitem->setIcon(0,getRealIcon("folder-cloud")); ui.templatesTree->addTopLevelItem(topitem); QTreeWidgetItem *twi = new QTreeWidgetItem(QStringList() << tr("")); topitem->addChild(twi); From 1194a9440520414e868220e99fb299d11770b502 Mon Sep 17 00:00:00 2001 From: Alexander Wilms Date: Tue, 13 Feb 2024 23:55:59 +0100 Subject: [PATCH 3/3] Template dialog: Use FDO icon names --- images-ng/colibre/mapping.csv | 2 +- .../{multifile.svg => view-pages-overview.svg} | 0 .../{tex-template.svg => view-pages-single.svg} | 0 .../{multifile.svg => view-pages-overview.svg} | 0 .../{tex-template.svgz => view-pages-single.svgz} | Bin images.qrc | 8 ++++---- src/templateselector.cpp | 4 ++-- 7 files changed, 7 insertions(+), 7 deletions(-) rename images-ng/colibre/{multifile.svg => view-pages-overview.svg} (100%) rename images-ng/colibre/{tex-template.svg => view-pages-single.svg} (100%) rename images-ng/{multifile.svg => view-pages-overview.svg} (100%) rename images-ng/{tex-template.svgz => view-pages-single.svgz} (100%) diff --git a/images-ng/colibre/mapping.csv b/images-ng/colibre/mapping.csv index c8607489f3..e34d8c0aa9 100644 --- a/images-ng/colibre/mapping.csv +++ b/images-ng/colibre/mapping.csv @@ -1,4 +1,4 @@ colibre,texstudio sc_compilebasic,builtin onlineupdate_16,folder-cloud -sc_flowchartshapes.flowchart-multidocument,multifile +sc_flowchartshapes.flowchart-multidocument,view-pages-overview diff --git a/images-ng/colibre/multifile.svg b/images-ng/colibre/view-pages-overview.svg similarity index 100% rename from images-ng/colibre/multifile.svg rename to images-ng/colibre/view-pages-overview.svg diff --git a/images-ng/colibre/tex-template.svg b/images-ng/colibre/view-pages-single.svg similarity index 100% rename from images-ng/colibre/tex-template.svg rename to images-ng/colibre/view-pages-single.svg diff --git a/images-ng/multifile.svg b/images-ng/view-pages-overview.svg similarity index 100% rename from images-ng/multifile.svg rename to images-ng/view-pages-overview.svg diff --git a/images-ng/tex-template.svgz b/images-ng/view-pages-single.svgz similarity index 100% rename from images-ng/tex-template.svgz rename to images-ng/view-pages-single.svgz diff --git a/images.qrc b/images.qrc index 7d3ef1ca3a..ba190aa37a 100644 --- a/images.qrc +++ b/images.qrc @@ -147,7 +147,7 @@ images-ng/math.svg images-ng/metapost.svg images-ng/modified.svgz -images-ng/multifile.svg +images-ng/view-pages-overview.svg images-ng/non-comment_dm.svg images-ng/non-comment.svg images-ng/non-math.svg @@ -187,7 +187,7 @@ images-ng/syncSource.svg images-ng/syncViewer-off.svg images-ng/syncViewer.svg -images-ng/tex-template.svgz +images-ng/view-pages-single.svgz images-ng/tikz.svg images-ng/toc.svg images-ng/underline.svg @@ -520,7 +520,7 @@ images-ng/colibre/metapost.svg images-ng/colibre/modified_dm.svg images-ng/colibre/modified.svg -images-ng/colibre/multifile.svg +images-ng/colibre/view-pages-overview.svg images-ng/colibre/newline_dm.svg images-ng/colibre/newline.svg images-ng/colibre/non-comment_dm.svg @@ -595,7 +595,7 @@ images-ng/colibre/syncViewer-off_dm.svg images-ng/colibre/syncViewer-off.svg images-ng/colibre/syncViewer.svg -images-ng/colibre/tex-template.svg +images-ng/colibre/view-pages-single.svg images-ng/colibre/tikz_dm.svg images-ng/colibre/tikz.svg images-ng/colibre/toc_dm.svg diff --git a/src/templateselector.cpp b/src/templateselector.cpp index 5805c82136..36d080d1be 100644 --- a/src/templateselector.cpp +++ b/src/templateselector.cpp @@ -308,8 +308,8 @@ void TemplateSelector::onRequestCompleted() if(i<0) continue; auto *item=rootItem->child(i); item->setData(0,TexRole,dd["download_url"].toString()); - if (name.endsWith(".tex")) item->setIcon(0,getRealIcon("tex-template")); - if (name.endsWith(".zip")) item->setIcon(0,getRealIcon("multifile")); + if (name.endsWith(".tex")) item->setIcon(0,getRealIcon("view-pages-single")); + if (name.endsWith(".zip")) item->setIcon(0,getRealIcon("view-pages-overview")); } }else{ // folder