-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
icons.go
1180 lines (954 loc) · 39.7 KB
/
icons.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package theme
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/internal/svg"
)
const (
// IconNameCancel is the name of theme lookup for cancel icon.
//
// Since: 2.0
IconNameCancel fyne.ThemeIconName = "cancel"
// IconNameConfirm is the name of theme lookup for confirm icon.
//
// Since: 2.0
IconNameConfirm fyne.ThemeIconName = "confirm"
// IconNameDelete is the name of theme lookup for delete icon.
//
// Since: 2.0
IconNameDelete fyne.ThemeIconName = "delete"
// IconNameSearch is the name of theme lookup for search icon.
//
// Since: 2.0
IconNameSearch fyne.ThemeIconName = "search"
// IconNameSearchReplace is the name of theme lookup for search and replace icon.
//
// Since: 2.0
IconNameSearchReplace fyne.ThemeIconName = "searchReplace"
// IconNameMenu is the name of theme lookup for menu icon.
//
// Since: 2.0
IconNameMenu fyne.ThemeIconName = "menu"
// IconNameMenuExpand is the name of theme lookup for menu expansion icon.
//
// Since: 2.0
IconNameMenuExpand fyne.ThemeIconName = "menuExpand"
// IconNameCheckButtonChecked is the name of theme lookup for checked check button icon.
//
// Since: 2.0
IconNameCheckButtonChecked fyne.ThemeIconName = "checked"
// IconNameCheckButton is the name of theme lookup for unchecked check button icon.
//
// Since: 2.0
IconNameCheckButton fyne.ThemeIconName = "unchecked"
// IconNameRadioButton is the name of theme lookup for radio button unchecked icon.
//
// Since: 2.0
IconNameRadioButton fyne.ThemeIconName = "radioButton"
// IconNameRadioButtonChecked is the name of theme lookup for radio button checked icon.
//
// Since: 2.0
IconNameRadioButtonChecked fyne.ThemeIconName = "radioButtonChecked"
// IconNameColorAchromatic is the name of theme lookup for greyscale color icon.
//
// Since: 2.0
IconNameColorAchromatic fyne.ThemeIconName = "colorAchromatic"
// IconNameColorChromatic is the name of theme lookup for full color icon.
//
// Since: 2.0
IconNameColorChromatic fyne.ThemeIconName = "colorChromatic"
// IconNameColorPalette is the name of theme lookup for color palette icon.
//
// Since: 2.0
IconNameColorPalette fyne.ThemeIconName = "colorPalette"
// IconNameContentAdd is the name of theme lookup for content add icon.
//
// Since: 2.0
IconNameContentAdd fyne.ThemeIconName = "contentAdd"
// IconNameContentRemove is the name of theme lookup for content remove icon.
//
// Since: 2.0
IconNameContentRemove fyne.ThemeIconName = "contentRemove"
// IconNameContentCut is the name of theme lookup for content cut icon.
//
// Since: 2.0
IconNameContentCut fyne.ThemeIconName = "contentCut"
// IconNameContentCopy is the name of theme lookup for content copy icon.
//
// Since: 2.0
IconNameContentCopy fyne.ThemeIconName = "contentCopy"
// IconNameContentPaste is the name of theme lookup for content paste icon.
//
// Since: 2.0
IconNameContentPaste fyne.ThemeIconName = "contentPaste"
// IconNameContentClear is the name of theme lookup for content clear icon.
//
// Since: 2.0
IconNameContentClear fyne.ThemeIconName = "contentClear"
// IconNameContentRedo is the name of theme lookup for content redo icon.
//
// Since: 2.0
IconNameContentRedo fyne.ThemeIconName = "contentRedo"
// IconNameContentUndo is the name of theme lookup for content undo icon.
//
// Since: 2.0
IconNameContentUndo fyne.ThemeIconName = "contentUndo"
// IconNameInfo is the name of theme lookup for info icon.
//
// Since: 2.0
IconNameInfo fyne.ThemeIconName = "info"
// IconNameQuestion is the name of theme lookup for question icon.
//
// Since: 2.0
IconNameQuestion fyne.ThemeIconName = "question"
// IconNameWarning is the name of theme lookup for warning icon.
//
// Since: 2.0
IconNameWarning fyne.ThemeIconName = "warning"
// IconNameError is the name of theme lookup for error icon.
//
// Since: 2.0
IconNameError fyne.ThemeIconName = "error"
// IconNameDocument is the name of theme lookup for document icon.
//
// Since: 2.0
IconNameDocument fyne.ThemeIconName = "document"
// IconNameDocumentCreate is the name of theme lookup for document create icon.
//
// Since: 2.0
IconNameDocumentCreate fyne.ThemeIconName = "documentCreate"
// IconNameDocumentPrint is the name of theme lookup for document print icon.
//
// Since: 2.0
IconNameDocumentPrint fyne.ThemeIconName = "documentPrint"
// IconNameDocumentSave is the name of theme lookup for document save icon.
//
// Since: 2.0
IconNameDocumentSave fyne.ThemeIconName = "documentSave"
// IconNameMoreHorizontal is the name of theme lookup for horizontal more.
//
// Since 2.0
IconNameMoreHorizontal fyne.ThemeIconName = "moreHorizontal"
// IconNameMoreVertical is the name of theme lookup for vertical more.
//
// Since 2.0
IconNameMoreVertical fyne.ThemeIconName = "moreVertical"
// IconNameMailAttachment is the name of theme lookup for mail attachment icon.
//
// Since: 2.0
IconNameMailAttachment fyne.ThemeIconName = "mailAttachment"
// IconNameMailCompose is the name of theme lookup for mail compose icon.
//
// Since: 2.0
IconNameMailCompose fyne.ThemeIconName = "mailCompose"
// IconNameMailForward is the name of theme lookup for mail forward icon.
//
// Since: 2.0
IconNameMailForward fyne.ThemeIconName = "mailForward"
// IconNameMailReply is the name of theme lookup for mail reply icon.
//
// Since: 2.0
IconNameMailReply fyne.ThemeIconName = "mailReply"
// IconNameMailReplyAll is the name of theme lookup for mail reply-all icon.
//
// Since: 2.0
IconNameMailReplyAll fyne.ThemeIconName = "mailReplyAll"
// IconNameMailSend is the name of theme lookup for mail send icon.
//
// Since: 2.0
IconNameMailSend fyne.ThemeIconName = "mailSend"
// IconNameMediaMusic is the name of theme lookup for media music icon.
//
// Since: 2.1
IconNameMediaMusic fyne.ThemeIconName = "mediaMusic"
// IconNameMediaPhoto is the name of theme lookup for media photo icon.
//
// Since: 2.1
IconNameMediaPhoto fyne.ThemeIconName = "mediaPhoto"
// IconNameMediaVideo is the name of theme lookup for media video icon.
//
// Since: 2.1
IconNameMediaVideo fyne.ThemeIconName = "mediaVideo"
// IconNameMediaFastForward is the name of theme lookup for media fast-forward icon.
//
// Since: 2.0
IconNameMediaFastForward fyne.ThemeIconName = "mediaFastForward"
// IconNameMediaFastRewind is the name of theme lookup for media fast-rewind icon.
//
// Since: 2.0
IconNameMediaFastRewind fyne.ThemeIconName = "mediaFastRewind"
// IconNameMediaPause is the name of theme lookup for media pause icon.
//
// Since: 2.0
IconNameMediaPause fyne.ThemeIconName = "mediaPause"
// IconNameMediaPlay is the name of theme lookup for media play icon.
//
// Since: 2.0
IconNameMediaPlay fyne.ThemeIconName = "mediaPlay"
// IconNameMediaRecord is the name of theme lookup for media record icon.
//
// Since: 2.0
IconNameMediaRecord fyne.ThemeIconName = "mediaRecord"
// IconNameMediaReplay is the name of theme lookup for media replay icon.
//
// Since: 2.0
IconNameMediaReplay fyne.ThemeIconName = "mediaReplay"
// IconNameMediaSkipNext is the name of theme lookup for media skip next icon.
//
// Since: 2.0
IconNameMediaSkipNext fyne.ThemeIconName = "mediaSkipNext"
// IconNameMediaSkipPrevious is the name of theme lookup for media skip previous icon.
//
// Since: 2.0
IconNameMediaSkipPrevious fyne.ThemeIconName = "mediaSkipPrevious"
// IconNameMediaStop is the name of theme lookup for media stop icon.
//
// Since: 2.0
IconNameMediaStop fyne.ThemeIconName = "mediaStop"
// IconNameMoveDown is the name of theme lookup for move down icon.
//
// Since: 2.0
IconNameMoveDown fyne.ThemeIconName = "arrowDown"
// IconNameMoveUp is the name of theme lookup for move up icon.
//
// Since: 2.0
IconNameMoveUp fyne.ThemeIconName = "arrowUp"
// IconNameNavigateBack is the name of theme lookup for navigate back icon.
//
// Since: 2.0
IconNameNavigateBack fyne.ThemeIconName = "arrowBack"
// IconNameNavigateNext is the name of theme lookup for navigate next icon.
//
// Since: 2.0
IconNameNavigateNext fyne.ThemeIconName = "arrowForward"
// IconNameArrowDropDown is the name of theme lookup for drop-down arrow icon.
//
// Since: 2.0
IconNameArrowDropDown fyne.ThemeIconName = "arrowDropDown"
// IconNameArrowDropUp is the name of theme lookup for drop-up arrow icon.
//
// Since: 2.0
IconNameArrowDropUp fyne.ThemeIconName = "arrowDropUp"
// IconNameFile is the name of theme lookup for file icon.
//
// Since: 2.0
IconNameFile fyne.ThemeIconName = "file"
// IconNameFileApplication is the name of theme lookup for file application icon.
//
// Since: 2.0
IconNameFileApplication fyne.ThemeIconName = "fileApplication"
// IconNameFileAudio is the name of theme lookup for file audio icon.
//
// Since: 2.0
IconNameFileAudio fyne.ThemeIconName = "fileAudio"
// IconNameFileImage is the name of theme lookup for file image icon.
//
// Since: 2.0
IconNameFileImage fyne.ThemeIconName = "fileImage"
// IconNameFileText is the name of theme lookup for file text icon.
//
// Since: 2.0
IconNameFileText fyne.ThemeIconName = "fileText"
// IconNameFileVideo is the name of theme lookup for file video icon.
//
// Since: 2.0
IconNameFileVideo fyne.ThemeIconName = "fileVideo"
// IconNameFolder is the name of theme lookup for folder icon.
//
// Since: 2.0
IconNameFolder fyne.ThemeIconName = "folder"
// IconNameFolderNew is the name of theme lookup for folder new icon.
//
// Since: 2.0
IconNameFolderNew fyne.ThemeIconName = "folderNew"
// IconNameFolderOpen is the name of theme lookup for folder open icon.
//
// Since: 2.0
IconNameFolderOpen fyne.ThemeIconName = "folderOpen"
// IconNameHelp is the name of theme lookup for help icon.
//
// Since: 2.0
IconNameHelp fyne.ThemeIconName = "help"
// IconNameHistory is the name of theme lookup for history icon.
//
// Since: 2.0
IconNameHistory fyne.ThemeIconName = "history"
// IconNameHome is the name of theme lookup for home icon.
//
// Since: 2.0
IconNameHome fyne.ThemeIconName = "home"
// IconNameSettings is the name of theme lookup for settings icon.
//
// Since: 2.0
IconNameSettings fyne.ThemeIconName = "settings"
// IconNameStorage is the name of theme lookup for storage icon.
//
// Since: 2.0
IconNameStorage fyne.ThemeIconName = "storage"
// IconNameUpload is the name of theme lookup for upload icon.
//
// Since: 2.0
IconNameUpload fyne.ThemeIconName = "upload"
// IconNameViewFullScreen is the name of theme lookup for view fullscreen icon.
//
// Since: 2.0
IconNameViewFullScreen fyne.ThemeIconName = "viewFullScreen"
// IconNameViewRefresh is the name of theme lookup for view refresh icon.
//
// Since: 2.0
IconNameViewRefresh fyne.ThemeIconName = "viewRefresh"
// IconNameViewZoomFit is the name of theme lookup for view zoom fit icon.
//
// Since: 2.0
IconNameViewZoomFit fyne.ThemeIconName = "viewZoomFit"
// IconNameViewZoomIn is the name of theme lookup for view zoom in icon.
//
// Since: 2.0
IconNameViewZoomIn fyne.ThemeIconName = "viewZoomIn"
// IconNameViewZoomOut is the name of theme lookup for view zoom out icon.
//
// Since: 2.0
IconNameViewZoomOut fyne.ThemeIconName = "viewZoomOut"
// IconNameViewRestore is the name of theme lookup for view restore icon.
//
// Since: 2.0
IconNameViewRestore fyne.ThemeIconName = "viewRestore"
// IconNameVisibility is the name of theme lookup for visibility icon.
//
// Since: 2.0
IconNameVisibility fyne.ThemeIconName = "visibility"
// IconNameVisibilityOff is the name of theme lookup for invisibility icon.
//
// Since: 2.0
IconNameVisibilityOff fyne.ThemeIconName = "visibilityOff"
// IconNameVolumeDown is the name of theme lookup for volume down icon.
//
// Since: 2.0
IconNameVolumeDown fyne.ThemeIconName = "volumeDown"
// IconNameVolumeMute is the name of theme lookup for volume mute icon.
//
// Since: 2.0
IconNameVolumeMute fyne.ThemeIconName = "volumeMute"
// IconNameVolumeUp is the name of theme lookup for volume up icon.
//
// Since: 2.0
IconNameVolumeUp fyne.ThemeIconName = "volumeUp"
// IconNameDownload is the name of theme lookup for download icon.
//
// Since: 2.0
IconNameDownload fyne.ThemeIconName = "download"
// IconNameComputer is the name of theme lookup for computer icon.
//
// Since: 2.0
IconNameComputer fyne.ThemeIconName = "computer"
// IconNameAccount is the name of theme lookup for account icon.
//
// Since: 2.1
IconNameAccount fyne.ThemeIconName = "account"
// IconNameLogin is the name of theme lookup for login icon.
//
// Since: 2.1
IconNameLogin fyne.ThemeIconName = "login"
// IconNameLogout is the name of theme lookup for logout icon.
//
// Since: 2.1
IconNameLogout fyne.ThemeIconName = "logout"
// IconNameList is the name of theme lookup for list icon.
//
// Since: 2.1
IconNameList fyne.ThemeIconName = "list"
// IconNameGrid is the name of theme lookup for grid icon.
//
// Since: 2.1
IconNameGrid fyne.ThemeIconName = "grid"
)
var (
icons = map[fyne.ThemeIconName]fyne.Resource{
IconNameCancel: NewThemedResource(cancelIconRes),
IconNameConfirm: NewThemedResource(checkIconRes),
IconNameDelete: NewThemedResource(deleteIconRes),
IconNameSearch: NewThemedResource(searchIconRes),
IconNameSearchReplace: NewThemedResource(searchreplaceIconRes),
IconNameMenu: NewThemedResource(menuIconRes),
IconNameMenuExpand: NewThemedResource(menuexpandIconRes),
IconNameCheckButton: NewThemedResource(checkboxblankIconRes),
IconNameCheckButtonChecked: NewThemedResource(checkboxIconRes),
IconNameRadioButton: NewThemedResource(radiobuttonIconRes),
IconNameRadioButtonChecked: NewThemedResource(radiobuttoncheckedIconRes),
IconNameContentAdd: NewThemedResource(contentaddIconRes),
IconNameContentClear: NewThemedResource(cancelIconRes),
IconNameContentRemove: NewThemedResource(contentremoveIconRes),
IconNameContentCut: NewThemedResource(contentcutIconRes),
IconNameContentCopy: NewThemedResource(contentcopyIconRes),
IconNameContentPaste: NewThemedResource(contentpasteIconRes),
IconNameContentRedo: NewThemedResource(contentredoIconRes),
IconNameContentUndo: NewThemedResource(contentundoIconRes),
IconNameColorAchromatic: NewThemedResource(colorachromaticIconRes),
IconNameColorChromatic: NewThemedResource(colorchromaticIconRes),
IconNameColorPalette: NewThemedResource(colorpaletteIconRes),
IconNameDocument: NewThemedResource(documentIconRes),
IconNameDocumentCreate: NewThemedResource(documentcreateIconRes),
IconNameDocumentPrint: NewThemedResource(documentprintIconRes),
IconNameDocumentSave: NewThemedResource(documentsaveIconRes),
IconNameMoreHorizontal: NewThemedResource(morehorizontalIconRes),
IconNameMoreVertical: NewThemedResource(moreverticalIconRes),
IconNameInfo: NewThemedResource(infoIconRes),
IconNameQuestion: NewThemedResource(questionIconRes),
IconNameWarning: NewThemedResource(warningIconRes),
IconNameError: NewThemedResource(errorIconRes),
IconNameMailAttachment: NewThemedResource(mailattachmentIconRes),
IconNameMailCompose: NewThemedResource(mailcomposeIconRes),
IconNameMailForward: NewThemedResource(mailforwardIconRes),
IconNameMailReply: NewThemedResource(mailreplyIconRes),
IconNameMailReplyAll: NewThemedResource(mailreplyallIconRes),
IconNameMailSend: NewThemedResource(mailsendIconRes),
IconNameMediaMusic: NewThemedResource(mediamusicIconRes),
IconNameMediaPhoto: NewThemedResource(mediaphotoIconRes),
IconNameMediaVideo: NewThemedResource(mediavideoIconRes),
IconNameMediaFastForward: NewThemedResource(mediafastforwardIconRes),
IconNameMediaFastRewind: NewThemedResource(mediafastrewindIconRes),
IconNameMediaPause: NewThemedResource(mediapauseIconRes),
IconNameMediaPlay: NewThemedResource(mediaplayIconRes),
IconNameMediaRecord: NewThemedResource(mediarecordIconRes),
IconNameMediaReplay: NewThemedResource(mediareplayIconRes),
IconNameMediaSkipNext: NewThemedResource(mediaskipnextIconRes),
IconNameMediaSkipPrevious: NewThemedResource(mediaskippreviousIconRes),
IconNameMediaStop: NewThemedResource(mediastopIconRes),
IconNameNavigateBack: NewThemedResource(arrowbackIconRes),
IconNameMoveDown: NewThemedResource(arrowdownIconRes),
IconNameNavigateNext: NewThemedResource(arrowforwardIconRes),
IconNameMoveUp: NewThemedResource(arrowupIconRes),
IconNameArrowDropDown: NewThemedResource(arrowdropdownIconRes),
IconNameArrowDropUp: NewThemedResource(arrowdropupIconRes),
IconNameFile: NewThemedResource(fileIconRes),
IconNameFileApplication: NewThemedResource(fileapplicationIconRes),
IconNameFileAudio: NewThemedResource(fileaudioIconRes),
IconNameFileImage: NewThemedResource(fileimageIconRes),
IconNameFileText: NewThemedResource(filetextIconRes),
IconNameFileVideo: NewThemedResource(filevideoIconRes),
IconNameFolder: NewThemedResource(folderIconRes),
IconNameFolderNew: NewThemedResource(foldernewIconRes),
IconNameFolderOpen: NewThemedResource(folderopenIconRes),
IconNameHelp: NewThemedResource(helpIconRes),
IconNameHistory: NewThemedResource(historyIconRes),
IconNameHome: NewThemedResource(homeIconRes),
IconNameSettings: NewThemedResource(settingsIconRes),
IconNameViewFullScreen: NewThemedResource(viewfullscreenIconRes),
IconNameViewRefresh: NewThemedResource(viewrefreshIconRes),
IconNameViewRestore: NewThemedResource(viewzoomfitIconRes),
IconNameViewZoomFit: NewThemedResource(viewzoomfitIconRes),
IconNameViewZoomIn: NewThemedResource(viewzoominIconRes),
IconNameViewZoomOut: NewThemedResource(viewzoomoutIconRes),
IconNameVisibility: NewThemedResource(visibilityIconRes),
IconNameVisibilityOff: NewThemedResource(visibilityoffIconRes),
IconNameVolumeDown: NewThemedResource(volumedownIconRes),
IconNameVolumeMute: NewThemedResource(volumemuteIconRes),
IconNameVolumeUp: NewThemedResource(volumeupIconRes),
IconNameDownload: NewThemedResource(downloadIconRes),
IconNameComputer: NewThemedResource(computerIconRes),
IconNameStorage: NewThemedResource(storageIconRes),
IconNameUpload: NewThemedResource(uploadIconRes),
IconNameAccount: NewThemedResource(accountIconRes),
IconNameLogin: NewThemedResource(loginIconRes),
IconNameLogout: NewThemedResource(logoutIconRes),
IconNameList: NewThemedResource(listIconRes),
IconNameGrid: NewThemedResource(gridIconRes),
}
)
func (t *builtinTheme) Icon(n fyne.ThemeIconName) fyne.Resource {
return icons[n]
}
// ThemedResource is a resource wrapper that will return a version of the resource with the main color changed
// for the currently selected theme.
type ThemedResource struct {
source fyne.Resource
// ColorName specifies which theme colour should be used to theme the resource
//
// Since: 2.3
ColorName fyne.ThemeColorName
}
// NewThemedResource creates a resource that adapts to the current theme setting.
func NewThemedResource(src fyne.Resource) *ThemedResource {
return &ThemedResource{
source: src,
}
}
// Name returns the underlying resource name (used for caching).
func (res *ThemedResource) Name() string {
prefix := res.ColorName
if prefix != "" {
prefix += "_"
}
return string(prefix) + res.source.Name()
}
// Content returns the underlying content of the resource adapted to the current text color.
func (res *ThemedResource) Content() []byte {
name := res.ColorName
if name == "" {
name = ColorNameForeground
}
return svg.Colorize(res.source.Content(), safeColorLookup(name, currentVariant()))
}
// Error returns a different resource for indicating an error.
func (res *ThemedResource) Error() *ErrorThemedResource {
return NewErrorThemedResource(res)
}
// InvertedThemedResource is a resource wrapper that will return a version of the resource with the main color changed
// for use over highlighted elements.
type InvertedThemedResource struct {
source fyne.Resource
}
// NewInvertedThemedResource creates a resource that adapts to the current theme for use over highlighted elements.
func NewInvertedThemedResource(orig fyne.Resource) *InvertedThemedResource {
res := &InvertedThemedResource{source: orig}
return res
}
// Name returns the underlying resource name (used for caching).
func (res *InvertedThemedResource) Name() string {
return "inverted_" + res.source.Name()
}
// Content returns the underlying content of the resource adapted to the current background color.
func (res *InvertedThemedResource) Content() []byte {
clr := BackgroundColor()
return svg.Colorize(res.source.Content(), clr)
}
// Original returns the underlying resource that this inverted themed resource was adapted from
func (res *InvertedThemedResource) Original() fyne.Resource {
return res.source
}
// ErrorThemedResource is a resource wrapper that will return a version of the resource with the main color changed
// to indicate an error.
type ErrorThemedResource struct {
source fyne.Resource
}
// NewErrorThemedResource creates a resource that adapts to the error color for the current theme.
func NewErrorThemedResource(orig fyne.Resource) *ErrorThemedResource {
res := &ErrorThemedResource{source: orig}
return res
}
// Name returns the underlying resource name (used for caching).
func (res *ErrorThemedResource) Name() string {
return "error-" + res.source.Name()
}
// Content returns the underlying content of the resource adapted to the current background color.
func (res *ErrorThemedResource) Content() []byte {
return svg.Colorize(res.source.Content(), ErrorColor())
}
// Original returns the underlying resource that this error themed resource was adapted from
func (res *ErrorThemedResource) Original() fyne.Resource {
return res.source
}
// PrimaryThemedResource is a resource wrapper that will return a version of the resource with the main color changed
// to the theme primary color.
type PrimaryThemedResource struct {
source fyne.Resource
}
// NewPrimaryThemedResource creates a resource that adapts to the primary color for the current theme.
func NewPrimaryThemedResource(orig fyne.Resource) *PrimaryThemedResource {
res := &PrimaryThemedResource{source: orig}
return res
}
// Name returns the underlying resource name (used for caching).
func (res *PrimaryThemedResource) Name() string {
return "primary_" + res.source.Name()
}
// Content returns the underlying content of the resource adapted to the current background color.
func (res *PrimaryThemedResource) Content() []byte {
return svg.Colorize(res.source.Content(), PrimaryColor())
}
// Original returns the underlying resource that this primary themed resource was adapted from
func (res *PrimaryThemedResource) Original() fyne.Resource {
return res.source
}
// DisabledResource is a resource wrapper that will return an appropriate resource colorized by
// the current theme's `DisabledColor` color.
type DisabledResource struct {
source fyne.Resource
}
// Name returns the resource source name prefixed with `disabled_` (used for caching)
func (res *DisabledResource) Name() string {
return "disabled_" + res.source.Name()
}
// Content returns the disabled style content of the correct resource for the current theme
func (res *DisabledResource) Content() []byte {
return svg.Colorize(res.source.Content(), DisabledColor())
}
// NewDisabledResource creates a resource that adapts to the current theme's DisabledColor setting.
func NewDisabledResource(res fyne.Resource) *DisabledResource {
return &DisabledResource{
source: res,
}
}
// FyneLogo returns a resource containing the Fyne logo
func FyneLogo() fyne.Resource {
return fynelogo
}
// CancelIcon returns a resource containing the standard cancel icon for the current theme
func CancelIcon() fyne.Resource {
return safeIconLookup(IconNameCancel)
}
// ConfirmIcon returns a resource containing the standard confirm icon for the current theme
func ConfirmIcon() fyne.Resource {
return safeIconLookup(IconNameConfirm)
}
// DeleteIcon returns a resource containing the standard delete icon for the current theme
func DeleteIcon() fyne.Resource {
return safeIconLookup(IconNameDelete)
}
// SearchIcon returns a resource containing the standard search icon for the current theme
func SearchIcon() fyne.Resource {
return safeIconLookup(IconNameSearch)
}
// SearchReplaceIcon returns a resource containing the standard search and replace icon for the current theme
func SearchReplaceIcon() fyne.Resource {
return safeIconLookup(IconNameSearchReplace)
}
// MenuIcon returns a resource containing the standard (mobile) menu icon for the current theme
func MenuIcon() fyne.Resource {
return safeIconLookup(IconNameMenu)
}
// MenuExpandIcon returns a resource containing the standard (mobile) expand "submenu icon for the current theme
func MenuExpandIcon() fyne.Resource {
return safeIconLookup(IconNameMenuExpand)
}
// CheckButtonIcon returns a resource containing the standard checkbox icon for the current theme
func CheckButtonIcon() fyne.Resource {
return safeIconLookup(IconNameCheckButton)
}
// CheckButtonCheckedIcon returns a resource containing the standard checkbox checked icon for the current theme
func CheckButtonCheckedIcon() fyne.Resource {
return safeIconLookup(IconNameCheckButtonChecked)
}
// RadioButtonIcon returns a resource containing the standard radio button icon for the current theme
func RadioButtonIcon() fyne.Resource {
return safeIconLookup(IconNameRadioButton)
}
// RadioButtonCheckedIcon returns a resource containing the standard radio button checked icon for the current theme
func RadioButtonCheckedIcon() fyne.Resource {
return safeIconLookup(IconNameRadioButtonChecked)
}
// ContentAddIcon returns a resource containing the standard content add icon for the current theme
func ContentAddIcon() fyne.Resource {
return safeIconLookup(IconNameContentAdd)
}
// ContentRemoveIcon returns a resource containing the standard content remove icon for the current theme
func ContentRemoveIcon() fyne.Resource {
return safeIconLookup(IconNameContentRemove)
}
// ContentClearIcon returns a resource containing the standard content clear icon for the current theme
func ContentClearIcon() fyne.Resource {
return safeIconLookup(IconNameContentClear)
}
// ContentCutIcon returns a resource containing the standard content cut icon for the current theme
func ContentCutIcon() fyne.Resource {
return safeIconLookup(IconNameContentCut)
}
// ContentCopyIcon returns a resource containing the standard content copy icon for the current theme
func ContentCopyIcon() fyne.Resource {
return safeIconLookup(IconNameContentCopy)
}
// ContentPasteIcon returns a resource containing the standard content paste icon for the current theme
func ContentPasteIcon() fyne.Resource {
return safeIconLookup(IconNameContentPaste)
}
// ContentRedoIcon returns a resource containing the standard content redo icon for the current theme
func ContentRedoIcon() fyne.Resource {
return safeIconLookup(IconNameContentRedo)
}
// ContentUndoIcon returns a resource containing the standard content undo icon for the current theme
func ContentUndoIcon() fyne.Resource {
return safeIconLookup(IconNameContentUndo)
}
// ColorAchromaticIcon returns a resource containing the standard achromatic color icon for the current theme
func ColorAchromaticIcon() fyne.Resource {
return safeIconLookup(IconNameColorAchromatic)
}
// ColorChromaticIcon returns a resource containing the standard chromatic color icon for the current theme
func ColorChromaticIcon() fyne.Resource {
return safeIconLookup(IconNameColorChromatic)
}
// ColorPaletteIcon returns a resource containing the standard color palette icon for the current theme
func ColorPaletteIcon() fyne.Resource {
return safeIconLookup(IconNameColorPalette)
}
// DocumentIcon returns a resource containing the standard document icon for the current theme
func DocumentIcon() fyne.Resource {
return safeIconLookup(IconNameDocument)
}
// DocumentCreateIcon returns a resource containing the standard document create icon for the current theme
func DocumentCreateIcon() fyne.Resource {
return safeIconLookup(IconNameDocumentCreate)
}
// DocumentPrintIcon returns a resource containing the standard document print icon for the current theme
func DocumentPrintIcon() fyne.Resource {
return safeIconLookup(IconNameDocumentPrint)
}
// DocumentSaveIcon returns a resource containing the standard document save icon for the current theme
func DocumentSaveIcon() fyne.Resource {
return safeIconLookup(IconNameDocumentSave)
}
// MoreHorizontalIcon returns a resource containing the standard horizontal more icon for the current theme
func MoreHorizontalIcon() fyne.Resource {
return current().Icon(IconNameMoreHorizontal)
}
// MoreVerticalIcon returns a resource containing the standard vertical more icon for the current theme
func MoreVerticalIcon() fyne.Resource {
return current().Icon(IconNameMoreVertical)
}
// InfoIcon returns a resource containing the standard dialog info icon for the current theme
func InfoIcon() fyne.Resource {
return safeIconLookup(IconNameInfo)
}
// QuestionIcon returns a resource containing the standard dialog question icon for the current theme
func QuestionIcon() fyne.Resource {
return safeIconLookup(IconNameQuestion)
}
// WarningIcon returns a resource containing the standard dialog warning icon for the current theme
func WarningIcon() fyne.Resource {
return safeIconLookup(IconNameWarning)
}
// ErrorIcon returns a resource containing the standard dialog error icon for the current theme
func ErrorIcon() fyne.Resource {
return safeIconLookup(IconNameError)
}
// FileIcon returns a resource containing the appropriate file icon for the current theme
func FileIcon() fyne.Resource {
return safeIconLookup(IconNameFile)
}
// FileApplicationIcon returns a resource containing the file icon representing application files for the current theme
func FileApplicationIcon() fyne.Resource {
return safeIconLookup(IconNameFileApplication)
}
// FileAudioIcon returns a resource containing the file icon representing audio files for the current theme
func FileAudioIcon() fyne.Resource {
return safeIconLookup(IconNameFileAudio)
}
// FileImageIcon returns a resource containing the file icon representing image files for the current theme
func FileImageIcon() fyne.Resource {
return safeIconLookup(IconNameFileImage)
}
// FileTextIcon returns a resource containing the file icon representing text files for the current theme
func FileTextIcon() fyne.Resource {
return safeIconLookup(IconNameFileText)
}
// FileVideoIcon returns a resource containing the file icon representing video files for the current theme
func FileVideoIcon() fyne.Resource {
return safeIconLookup(IconNameFileVideo)
}
// FolderIcon returns a resource containing the standard folder icon for the current theme
func FolderIcon() fyne.Resource {
return safeIconLookup(IconNameFolder)
}
// FolderNewIcon returns a resource containing the standard folder creation icon for the current theme
func FolderNewIcon() fyne.Resource {
return safeIconLookup(IconNameFolderNew)
}
// FolderOpenIcon returns a resource containing the standard folder open icon for the current theme
func FolderOpenIcon() fyne.Resource {
return safeIconLookup(IconNameFolderOpen)
}
// HelpIcon returns a resource containing the standard help icon for the current theme
func HelpIcon() fyne.Resource {
return safeIconLookup(IconNameHelp)
}
// HistoryIcon returns a resource containing the standard history icon for the current theme
func HistoryIcon() fyne.Resource {
return safeIconLookup(IconNameHistory)
}
// HomeIcon returns a resource containing the standard home folder icon for the current theme
func HomeIcon() fyne.Resource {
return safeIconLookup(IconNameHome)
}
// SettingsIcon returns a resource containing the standard settings icon for the current theme
func SettingsIcon() fyne.Resource {
return safeIconLookup(IconNameSettings)
}
// MailAttachmentIcon returns a resource containing the standard mail attachment icon for the current theme
func MailAttachmentIcon() fyne.Resource {
return safeIconLookup(IconNameMailAttachment)
}
// MailComposeIcon returns a resource containing the standard mail compose icon for the current theme
func MailComposeIcon() fyne.Resource {
return safeIconLookup(IconNameMailCompose)
}
// MailForwardIcon returns a resource containing the standard mail forward icon for the current theme
func MailForwardIcon() fyne.Resource {
return safeIconLookup(IconNameMailForward)
}
// MailReplyIcon returns a resource containing the standard mail reply icon for the current theme
func MailReplyIcon() fyne.Resource {
return safeIconLookup(IconNameMailReply)
}
// MailReplyAllIcon returns a resource containing the standard mail reply all icon for the current theme
func MailReplyAllIcon() fyne.Resource {
return safeIconLookup(IconNameMailReplyAll)
}
// MailSendIcon returns a resource containing the standard mail send icon for the current theme
func MailSendIcon() fyne.Resource {
return safeIconLookup(IconNameMailSend)
}
// MediaMusicIcon returns a resource containing the standard media music icon for the current theme
//
// Since: 2.1
func MediaMusicIcon() fyne.Resource {
return safeIconLookup(IconNameMediaMusic)
}
// MediaPhotoIcon returns a resource containing the standard media photo icon for the current theme
//
// Since: 2.1
func MediaPhotoIcon() fyne.Resource {
return safeIconLookup(IconNameMediaPhoto)
}
// MediaVideoIcon returns a resource containing the standard media video icon for the current theme
//
// Since: 2.1
func MediaVideoIcon() fyne.Resource {
return safeIconLookup(IconNameMediaVideo)
}
// MediaFastForwardIcon returns a resource containing the standard media fast-forward icon for the current theme
func MediaFastForwardIcon() fyne.Resource {
return safeIconLookup(IconNameMediaFastForward)