From c4402a9f6a8a210d1f662ff23147d195746cc90a Mon Sep 17 00:00:00 2001 From: juanis2112 Date: Sun, 28 Apr 2019 18:06:22 -0500 Subject: [PATCH] Added icons for Latex file type --- NOTICE.txt | 33 +++++++++++++++++++++++++++ spyder/images/file_type_light_tex.svg | 1 + spyder/images/file_type_tex.svg | 1 + spyder/utils/icon_manager.py | 7 ++++++ 4 files changed, 42 insertions(+) create mode 100644 spyder/images/file_type_light_tex.svg create mode 100644 spyder/images/file_type_tex.svg diff --git a/NOTICE.txt b/NOTICE.txt index 2293faf2502..62fb23ea89f 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -1675,6 +1675,39 @@ spyder/images/notebook_light.svg spyder/images/notebook_dark.svg +------------------------------------------------------------------------------- + + + +Latex Logo +---------- + + +Copyright (c) 2016 Roberto Huertas + + +Author: Roberto Huertas | https://github.com/vscode-icons/vscode-icons +Site: https://github.com/vscode-icons +Source: https://github.com/vscode-icons +License: The MIT License (MIT) +https://opensource.org/licenses/MIT + + +Distributed under the terms of The MIT License (MIT) + + +See below for the full text of The MIT License (MIT). + +The current version of the original file can be viewed at: +https://github.com/vscode-icons/vscode-icons/blob/master/icons/file_type_tex.svg + + +Files covered: + +spyder/images/file_type_light_tex.svg +spyder/images/file_type_tex.svg + + =============================================================================== diff --git a/spyder/images/file_type_light_tex.svg b/spyder/images/file_type_light_tex.svg new file mode 100644 index 00000000000..5d1d9ffddbd --- /dev/null +++ b/spyder/images/file_type_light_tex.svg @@ -0,0 +1 @@ +file_type_light_tex \ No newline at end of file diff --git a/spyder/images/file_type_tex.svg b/spyder/images/file_type_tex.svg new file mode 100644 index 00000000000..952a2decc05 --- /dev/null +++ b/spyder/images/file_type_tex.svg @@ -0,0 +1 @@ +file_type_tex \ No newline at end of file diff --git a/spyder/utils/icon_manager.py b/spyder/utils/icon_manager.py index 5a88e657fb8..56f3f500ced 100644 --- a/spyder/utils/icon_manager.py +++ b/spyder/utils/icon_manager.py @@ -432,6 +432,13 @@ def get_icon_by_extension(fname, scale_factor): else: icon_by_extension = QIcon( get_image_path('notebook_light.svg')) + elif extension == '.tex': + if is_dark_interface(): + icon_by_extension = QIcon( + get_image_path('file_type_tex.svg')) + else: + icon_by_extension = QIcon( + get_image_path('file_type_light_tex.svg')) elif mime_type is not None: try: # Fix for issue 5080. Even though