Skip to content

Commit

Permalink
Merge pull request #1 from Alexander-Wilms/templateMultiIcon
Browse files Browse the repository at this point in the history
Template multi icon
  • Loading branch information
octaeder authored Feb 13, 2024
2 parents 41774b0 + 1194a94 commit 7498099
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 4 deletions.
1 change: 1 addition & 0 deletions images-ng/colibre/builtin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions images-ng/colibre/folder-cloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions images-ng/colibre/mapping.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
colibre,texstudio
sc_compilebasic,builtin
onlineupdate_16,folder-cloud
sc_flowchartshapes.flowchart-multidocument,view-pages-overview
1 change: 1 addition & 0 deletions images-ng/colibre/view-pages-overview.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions images-ng/colibre/view-pages-single.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
Binary file added images-ng/view-pages-single.svgz
Binary file not shown.
9 changes: 7 additions & 2 deletions images.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<file>images-ng/highlight.svg</file>
<file>images-ng/home.svg</file>
<file>images-ng/image.svg</file>
<file>images-ng/internet.svg</file>
<file>images-ng/folder-cloud.svg</file>
<file>images-ng/italic.svg</file>
<file>images-ng/itemize.svgz</file>
<file>images-ng/item.svgz</file>
Expand Down Expand Up @@ -147,7 +147,7 @@
<file>images-ng/math.svg</file>
<file>images-ng/metapost.svg</file>
<file>images-ng/modified.svgz</file>
<file>images-ng/multifile.svg</file>
<file>images-ng/view-pages-overview.svg</file>
<file>images-ng/non-comment_dm.svg</file>
<file>images-ng/non-comment.svg</file>
<file>images-ng/non-math.svg</file>
Expand Down Expand Up @@ -187,6 +187,7 @@
<file>images-ng/syncSource.svg</file>
<file>images-ng/syncViewer-off.svg</file>
<file>images-ng/syncViewer.svg</file>
<file>images-ng/view-pages-single.svgz</file>
<file>images-ng/tikz.svg</file>
<file>images-ng/toc.svg</file>
<file>images-ng/underline.svg</file>
Expand Down Expand Up @@ -309,6 +310,7 @@
<file>images-ng/colibre/bookmarks.svg</file>
<file>images-ng/colibre/build_dm.svg</file>
<file>images-ng/colibre/build.svg</file>
<file>images-ng/colibre/builtin.svg</file>
<file>images-ng/colibre/case_dm.svg</file>
<file>images-ng/colibre/case.svg</file>
<file>images-ng/colibre/chapter_dm.svg</file>
Expand Down Expand Up @@ -459,6 +461,7 @@
<file>images-ng/colibre/image.svg</file>
<file>images-ng/colibre/include_dm.svg</file>
<file>images-ng/colibre/include.svg</file>
<file>images-ng/colibre/folder-cloud.svg</file>
<file>images-ng/colibre/italic_dm.svg</file>
<file>images-ng/colibre/italic.svg</file>
<file>images-ng/colibre/item_dm.svg</file>
Expand Down Expand Up @@ -517,6 +520,7 @@
<file>images-ng/colibre/metapost.svg</file>
<file>images-ng/colibre/modified_dm.svg</file>
<file>images-ng/colibre/modified.svg</file>
<file>images-ng/colibre/view-pages-overview.svg</file>
<file>images-ng/colibre/newline_dm.svg</file>
<file>images-ng/colibre/newline.svg</file>
<file>images-ng/colibre/non-comment_dm.svg</file>
Expand Down Expand Up @@ -591,6 +595,7 @@
<file>images-ng/colibre/syncViewer-off_dm.svg</file>
<file>images-ng/colibre/syncViewer-off.svg</file>
<file>images-ng/colibre/syncViewer.svg</file>
<file>images-ng/colibre/view-pages-single.svg</file>
<file>images-ng/colibre/tikz_dm.svg</file>
<file>images-ng/colibre/tikz.svg</file>
<file>images-ng/colibre/toc_dm.svg</file>
Expand Down
5 changes: 3 additions & 2 deletions src/templateselector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("<loading...>"));
topitem->addChild(twi);
Expand Down Expand Up @@ -308,7 +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(".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
Expand Down

0 comments on commit 7498099

Please sign in to comment.