Skip to content

Commit 167fa07

Browse files
committed
icons
1 parent 33453db commit 167fa07

16 files changed

Lines changed: 15 additions & 18 deletions

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,16 @@ share/python-wheels/
2626
.installed.cfg
2727
*.egg
2828
MANIFEST
29-
.spec
29+
media/ori
30+
media/re
31+
3032
# PyInstaller
3133
# Usually these files are written by a python script from a template
3234
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3335
*.manifest
3436
*.spec
37+
.spec
38+
3539

3640
# Installer logs
3741
pip-log.txt

GUI.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from picklescan.src.picklescan.scanner import scan_huggingface_model
99
from picklescan.src.picklescan.scanner import scanned_files
1010
from picklescan.src.picklescan.scanner import infected_files
11-
11+
import util.icons as ic
1212
COLOR_DARK_GREEN = '#78BA04'
1313
COLOR_DARK_BLUE = '#4974a5'
1414
COLOR_RED_ORANGE = '#C13515'
@@ -24,16 +24,6 @@
2424

2525
right_click_menu = ['', ['Copy', 'Paste', 'Cut']]
2626

27-
def image_bio(filename,size):
28-
if os.path.exists(filename):
29-
image1 = Image.open(filename)
30-
if size[0]>0:
31-
image1.thumbnail(size)
32-
bio = io.BytesIO()
33-
image1.save(bio,format="PNG")
34-
del image1
35-
return bio.getvalue()
36-
3727
def do_clipboard_operation(event, window, element):
3828
if event == 'Select All':
3929
element.Widget.selection_clear()
@@ -58,7 +48,6 @@ def do_clipboard_operation(event, window, element):
5848
except:
5949
# print('Nothing selected')
6050
window['-status_info-'].update(value='Nothing selected')
61-
6251
def main():
6352
ver = '0.1.0'
6453
sg.theme('Dark Gray 15')
@@ -109,11 +98,10 @@ def browse_layout(type_,visible_,disabled=False):
10998
sg.Radio('Directory','-type_selector_input_radio-',default=False,k='-directory_radio-',enable_events=True),
11099
sg.Frame('',[
111100
[
112-
sg.Button(image_data=image_bio('./media/buymeacoffee.png',(133,500)),expand_x=False,visible=True,enable_events=True,key="-buymeacoffee-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
113-
sg.Button(image_data=image_bio('./media/kofi.png',(60,500)),expand_x=False,visible=True,enable_events=True,key="-kofi-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
114-
sg.Button(image_data=image_bio('./media/coindrop.png',(95,500)),expand_x=False,visible=True,enable_events=True,key="-coindrop-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
115-
116-
sg.Button(image_data=image_bio('./media/github.png',(80,500)),expand_x=False,visible=True,enable_events=True,key="-github-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
101+
sg.Button(image_data=ic.buymeacoffee,expand_x=False,visible=True,enable_events=True,key="-buymeacoffee-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
102+
sg.Button(image_data=ic.kofi,expand_x=False,visible=True,enable_events=True,key="-kofi-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
103+
sg.Button(image_data=ic.coindrop,expand_x=False,visible=True,enable_events=True,key="-coindrop-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900)),
104+
sg.Button(image_data=ic.github,expand_x=False,visible=True,enable_events=True,key="-github-",button_color=(COLOR_GRAY_9900,COLOR_GRAY_9900))
117105
],
118106
],expand_x=True,expand_y=False,relief=sg.RELIEF_SOLID,border_width=1,visible=True,background_color=COLOR_GRAY_9900,element_justification="r")
119107

23.3 MB
Binary file not shown.

media/buymeacoffee.png

-11.1 KB
Binary file not shown.

media/coindrop.png

-8 KB
Binary file not shown.

media/github.png

-6.28 KB
Binary file not shown.

media/kofi.png

-4.21 KB
Binary file not shown.

media/patron.png

-1.76 KB
Binary file not shown.

0 commit comments

Comments
 (0)