-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding basic card widget and support for Icon Selectors (#1)
* Added Card to the list of widgets * Added edit fields on select for the card widget * Added Support for dynamic icons
- Loading branch information
Showing
4 changed files
with
136 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.idea | ||
|
||
fynebuilder | ||
tmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
package main | ||
|
||
import ( | ||
"fyne.io/fyne" | ||
"fyne.io/fyne/theme" | ||
) | ||
|
||
// icons Has the hashmap of icons from the standard theme. | ||
// ToDo: Will have to look for a way to sync the list from `fyne_demo` | ||
var icons = map[string]fyne.Resource{ | ||
"CancelIcon": theme.CancelIcon(), | ||
"ConfirmIcon": theme.ConfirmIcon(), | ||
"DeleteIcon": theme.DeleteIcon(), | ||
"SearchIcon": theme.SearchIcon(), | ||
"SearchReplaceIcon": theme.SearchReplaceIcon(), | ||
|
||
"CheckButtonIcon": theme.CheckButtonIcon(), | ||
"CheckButtonCheckedIcon": theme.CheckButtonCheckedIcon(), | ||
"RadioButtonIcon": theme.RadioButtonIcon(), | ||
"RadioButtonCheckedIcon": theme.RadioButtonCheckedIcon(), | ||
|
||
"ColorAchromaticIcon": theme.ColorAchromaticIcon(), | ||
"ColorChromaticIcon": theme.ColorChromaticIcon(), | ||
"ColorPaletteIcon": theme.ColorPaletteIcon(), | ||
|
||
"ContentAddIcon": theme.ContentAddIcon(), | ||
"ContentRemoveIcon": theme.ContentRemoveIcon(), | ||
"ContentClearIcon": theme.ContentClearIcon(), | ||
"ContentCutIcon": theme.ContentCutIcon(), | ||
"ContentCopyIcon": theme.ContentCopyIcon(), | ||
"ContentPasteIcon": theme.ContentPasteIcon(), | ||
"ContentRedoIcon": theme.ContentRedoIcon(), | ||
"ContentUndoIcon": theme.ContentUndoIcon(), | ||
|
||
"InfoIcon": theme.InfoIcon(), | ||
"ErrorIcon": theme.ErrorIcon(), | ||
"QuestionIcon": theme.QuestionIcon(), | ||
"WarningIcon": theme.WarningIcon(), | ||
|
||
"DocumentIcon": theme.DocumentIcon(), | ||
"DocumentCreateIcon": theme.DocumentCreateIcon(), | ||
"DocumentPrintIcon": theme.DocumentPrintIcon(), | ||
"DocumentSaveIcon": theme.DocumentSaveIcon(), | ||
|
||
"FileIcon": theme.FileIcon(), | ||
"FileApplicationIcon": theme.FileApplicationIcon(), | ||
"FileAudioIcon": theme.FileAudioIcon(), | ||
"FileImageIcon": theme.FileImageIcon(), | ||
"FileTextIcon": theme.FileTextIcon(), | ||
"FileVideoIcon": theme.FileVideoIcon(), | ||
"FolderIcon": theme.FolderIcon(), | ||
"FolderNewIcon": theme.FolderNewIcon(), | ||
"FolderOpenIcon": theme.FolderOpenIcon(), | ||
"ComputerIcon": theme.ComputerIcon(), | ||
"HomeIcon": theme.HomeIcon(), | ||
"HelpIcon": theme.HelpIcon(), | ||
"HistoryIcon": theme.HistoryIcon(), | ||
"SettingsIcon": theme.SettingsIcon(), | ||
"StorageIcon": theme.StorageIcon(), | ||
"DownloadIcon": theme.DownloadIcon(), | ||
// "UploadIcon": theme.UploadIcon(), | ||
|
||
"ViewFullScreenIcon": theme.ViewFullScreenIcon(), | ||
"ViewRestoreIcon": theme.ViewRestoreIcon(), | ||
"ViewRefreshIcon": theme.ViewRefreshIcon(), | ||
"VisibilityIcon": theme.VisibilityIcon(), | ||
"VisibilityOffIcon": theme.VisibilityOffIcon(), | ||
"ZoomFitIcon": theme.ZoomFitIcon(), | ||
"ZoomInIcon": theme.ZoomInIcon(), | ||
"ZoomOutIcon": theme.ZoomOutIcon(), | ||
|
||
"MoveDownIcon": theme.MoveDownIcon(), | ||
"MoveUpIcon": theme.MoveUpIcon(), | ||
|
||
"NavigateBackIcon": theme.NavigateBackIcon(), | ||
"NavigateNextIcon": theme.NavigateNextIcon(), | ||
|
||
"Menu": theme.MenuIcon(), | ||
"MenuExpand": theme.MenuExpandIcon(), | ||
"MenuDropDown": theme.MenuDropDownIcon(), | ||
"MenuDropUp": theme.MenuDropUpIcon(), | ||
|
||
"MailAttachmentIcon": theme.MailAttachmentIcon(), | ||
"MailComposeIcon": theme.MailComposeIcon(), | ||
"MailForwardIcon": theme.MailForwardIcon(), | ||
"MailReplyIcon": theme.MailReplyIcon(), | ||
"MailReplyAllIcon": theme.MailReplyAllIcon(), | ||
"MailSendIcon": theme.MailSendIcon(), | ||
|
||
"MediaFastForward": theme.MediaFastForwardIcon(), | ||
"MediaFastRewind": theme.MediaFastRewindIcon(), | ||
"MediaPause": theme.MediaPauseIcon(), | ||
"MediaPlay": theme.MediaPlayIcon(), | ||
// "MediaStop": theme.MediaStopIcon(), | ||
"MediaRecord": theme.MediaRecordIcon(), | ||
"MediaReplay": theme.MediaReplayIcon(), | ||
"MediaSkipNext": theme.MediaSkipNextIcon(), | ||
"MediaSkipPrevious": theme.MediaSkipPreviousIcon(), | ||
|
||
"VolumeDown": theme.VolumeDownIcon(), | ||
"VolumeMute": theme.VolumeMuteIcon(), | ||
"VolumeUp": theme.VolumeUpIcon(), | ||
} | ||
|
||
// iconNames is an array with the list of names of all the icons | ||
var iconNames = extractIconNames() | ||
|
||
// extractIconNames returns all the list of names of all the icons from the hashmap `icons` | ||
func extractIconNames() []string { | ||
var iconNamesFromData = make([]string, len(icons)) | ||
i := 0 | ||
for k := range icons { | ||
iconNamesFromData[i] = k | ||
i++ | ||
} | ||
return iconNamesFromData | ||
} |