{"action":"created","comment":{"url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/comments/321958668","pull_request_review_id":285160176,"id":321958668,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTk1ODY2OA==","diff_hunk":"@@ -74,7 +75,7 @@ class MDSpinner(ThemableBehavior, Widget):\n     defaults to True\n     \"\"\"\n \n-    color = ListProperty([])\n+    color = ListProperty(ThemeManager().primary_color)","path":"kivymd/uix/spinner.py","position":13,"original_position":13,"commit_id":"94cd92103b69accd7698cd1f68bb566c14464bf2","original_commit_id":"94cd92103b69accd7698cd1f68bb566c14464bf2","user":{"login":"Mountaino","id":44732506,"node_id":"MDQ6VXNlcjQ0NzMyNTA2","avatar_url":"https://avatars3.githubusercontent.com/u/44732506?v=4","gravatar_id":"","url":"https://api.github.com/users/Mountaino","html_url":"https://github.com/Mountaino","followers_url":"https://api.github.com/users/Mountaino/followers","following_url":"https://api.github.com/users/Mountaino/following{/other_user}","gists_url":"https://api.github.com/users/Mountaino/gists{/gist_id}","starred_url":"https://api.github.com/users/Mountaino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mountaino/subscriptions","organizations_url":"https://api.github.com/users/Mountaino/orgs","repos_url":"https://api.github.com/users/Mountaino/repos","events_url":"https://api.github.com/users/Mountaino/events{/privacy}","received_events_url":"https://api.github.com/users/Mountaino/received_events","type":"User","site_admin":false},"body":"ThemeManager object will be created on each initialization of MDSpinner. It is not good","created_at":"2019-09-07T06:59:15Z","updated_at":"2019-09-07T06:59:15Z","html_url":"https://github.com/HeaTTheatR/KivyMD/pull/104#discussion_r321958668","pull_request_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/comments/321958668"},"html":{"href":"https://github.com/HeaTTheatR/KivyMD/pull/104#discussion_r321958668"},"pull_request":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104"}}},"pull_request":{"url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104","id":315159990,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE1MTU5OTkw","html_url":"https://github.com/HeaTTheatR/KivyMD/pull/104","diff_url":"https://github.com/HeaTTheatR/KivyMD/pull/104.diff","patch_url":"https://github.com/HeaTTheatR/KivyMD/pull/104.patch","issue_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/104","number":104,"state":"open","locked":false,"title":"Now the spinner can be loaded as a class with MDSpinner().","user":{"login":"Franccisco","id":35090042,"node_id":"MDQ6VXNlcjM1MDkwMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/35090042?v=4","gravatar_id":"","url":"https://api.github.com/users/Franccisco","html_url":"https://github.com/Franccisco","followers_url":"https://api.github.com/users/Franccisco/followers","following_url":"https://api.github.com/users/Franccisco/following{/other_user}","gists_url":"https://api.github.com/users/Franccisco/gists{/gist_id}","starred_url":"https://api.github.com/users/Franccisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Franccisco/subscriptions","organizations_url":"https://api.github.com/users/Franccisco/orgs","repos_url":"https://api.github.com/users/Franccisco/repos","events_url":"https://api.github.com/users/Franccisco/events{/privacy}","received_events_url":"https://api.github.com/users/Franccisco/received_events","type":"User","site_admin":false},"body":"### Description of Changes\r\n* Whenever you add the spinner as a class (for example, with ```self.add_widget(MDSpinner())```, it throws the error ```\"IndexError: list index out of range\"```. I was looking for a solution and I realised that it was because the kivy string (line 36) loaded the ```self.color``` as ```color = ListProperty([])```, even if it is modified later in the ```__init__``` of the ```MDSpinner()``` class.\r\n\r\nI found three solutions:\r\n\r\n1. The one you can see in this Pull Request, which basically obtains the ```self.theme_cls.primary_color``` directly from the ```ThemeManager()``` class (in case the user does not specify any ```primary_color```, it defaults to ```Blue```).\r\n\r\n1. Specifying the color with ```color=[r, g, b, a]``` when calling the class (for example, ```MDSpinner(color=[1, 1, 1, 1])```, where is later replaced with ```self.theme_cls.primary_color```)\r\n\r\n1. Changing the line 78 to ```color = ListProperty([r, g, b, a])``` (for example: ```ListProperty([1, 1, 1, 1])```), which will be later replaced with ```self.theme_cls.primary_color```.\r\n\r\nBy the way, the color can be modified through the attribute ```MDSpinner().color```. For example:\r\n```\r\nspinner = MDSpinner()\r\nspinner.color = [1, 1, 1, 1]\r\nself.add_widget(spinner)\r\n```\r\n\r\nI hope this help.\r\n\r\n### Screenshots\r\n\r\n![MDSpinner](https://user-images.githubusercontent.com/35090042/64468592-17c84f80-d116-11e9-9466-2c3539500003.gif)\r\n\r\n","created_at":"2019-09-07T02:40:22Z","updated_at":"2019-09-07T06:59:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"437e9d41e7873253ef26b8519669548e2d0746d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104/commits","review_comments_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104/comments","review_comment_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/comments{/number}","comments_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/104/comments","statuses_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/statuses/94cd92103b69accd7698cd1f68bb566c14464bf2","head":{"label":"Franccisco:master","ref":"master","sha":"94cd92103b69accd7698cd1f68bb566c14464bf2","user":{"login":"Franccisco","id":35090042,"node_id":"MDQ6VXNlcjM1MDkwMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/35090042?v=4","gravatar_id":"","url":"https://api.github.com/users/Franccisco","html_url":"https://github.com/Franccisco","followers_url":"https://api.github.com/users/Franccisco/followers","following_url":"https://api.github.com/users/Franccisco/following{/other_user}","gists_url":"https://api.github.com/users/Franccisco/gists{/gist_id}","starred_url":"https://api.github.com/users/Franccisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Franccisco/subscriptions","organizations_url":"https://api.github.com/users/Franccisco/orgs","repos_url":"https://api.github.com/users/Franccisco/repos","events_url":"https://api.github.com/users/Franccisco/events{/privacy}","received_events_url":"https://api.github.com/users/Franccisco/received_events","type":"User","site_admin":false},"repo":{"id":206892566,"node_id":"MDEwOlJlcG9zaXRvcnkyMDY4OTI1NjY=","name":"KivyMD","full_name":"Franccisco/KivyMD","private":false,"owner":{"login":"Franccisco","id":35090042,"node_id":"MDQ6VXNlcjM1MDkwMDQy","avatar_url":"https://avatars3.githubusercontent.com/u/35090042?v=4","gravatar_id":"","url":"https://api.github.com/users/Franccisco","html_url":"https://github.com/Franccisco","followers_url":"https://api.github.com/users/Franccisco/followers","following_url":"https://api.github.com/users/Franccisco/following{/other_user}","gists_url":"https://api.github.com/users/Franccisco/gists{/gist_id}","starred_url":"https://api.github.com/users/Franccisco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Franccisco/subscriptions","organizations_url":"https://api.github.com/users/Franccisco/orgs","repos_url":"https://api.github.com/users/Franccisco/repos","events_url":"https://api.github.com/users/Franccisco/events{/privacy}","received_events_url":"https://api.github.com/users/Franccisco/received_events","type":"User","site_admin":false},"html_url":"https://github.com/Franccisco/KivyMD","description":"KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications.","fork":true,"url":"https://api.github.com/repos/Franccisco/KivyMD","forks_url":"https://api.github.com/repos/Franccisco/KivyMD/forks","keys_url":"https://api.github.com/repos/Franccisco/KivyMD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Franccisco/KivyMD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Franccisco/KivyMD/teams","hooks_url":"https://api.github.com/repos/Franccisco/KivyMD/hooks","issue_events_url":"https://api.github.com/repos/Franccisco/KivyMD/issues/events{/number}","events_url":"https://api.github.com/repos/Franccisco/KivyMD/events","assignees_url":"https://api.github.com/repos/Franccisco/KivyMD/assignees{/user}","branches_url":"https://api.github.com/repos/Franccisco/KivyMD/branches{/branch}","tags_url":"https://api.github.com/repos/Franccisco/KivyMD/tags","blobs_url":"https://api.github.com/repos/Franccisco/KivyMD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Franccisco/KivyMD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Franccisco/KivyMD/git/refs{/sha}","trees_url":"https://api.github.com/repos/Franccisco/KivyMD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Franccisco/KivyMD/statuses/{sha}","languages_url":"https://api.github.com/repos/Franccisco/KivyMD/languages","stargazers_url":"https://api.github.com/repos/Franccisco/KivyMD/stargazers","contributors_url":"https://api.github.com/repos/Franccisco/KivyMD/contributors","subscribers_url":"https://api.github.com/repos/Franccisco/KivyMD/subscribers","subscription_url":"https://api.github.com/repos/Franccisco/KivyMD/subscription","commits_url":"https://api.github.com/repos/Franccisco/KivyMD/commits{/sha}","git_commits_url":"https://api.github.com/repos/Franccisco/KivyMD/git/commits{/sha}","comments_url":"https://api.github.com/repos/Franccisco/KivyMD/comments{/number}","issue_comment_url":"https://api.github.com/repos/Franccisco/KivyMD/issues/comments{/number}","contents_url":"https://api.github.com/repos/Franccisco/KivyMD/contents/{+path}","compare_url":"https://api.github.com/repos/Franccisco/KivyMD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Franccisco/KivyMD/merges","archive_url":"https://api.github.com/repos/Franccisco/KivyMD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Franccisco/KivyMD/downloads","issues_url":"https://api.github.com/repos/Franccisco/KivyMD/issues{/number}","pulls_url":"https://api.github.com/repos/Franccisco/KivyMD/pulls{/number}","milestones_url":"https://api.github.com/repos/Franccisco/KivyMD/milestones{/number}","notifications_url":"https://api.github.com/repos/Franccisco/KivyMD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Franccisco/KivyMD/labels{/name}","releases_url":"https://api.github.com/repos/Franccisco/KivyMD/releases{/id}","deployments_url":"https://api.github.com/repos/Franccisco/KivyMD/deployments","created_at":"2019-09-07T00:20:41Z","updated_at":"2019-09-07T02:10:48Z","pushed_at":"2019-09-07T02:10:46Z","git_url":"git://github.com/Franccisco/KivyMD.git","ssh_url":"git@github.com:Franccisco/KivyMD.git","clone_url":"https://github.com/Franccisco/KivyMD.git","svn_url":"https://github.com/Franccisco/KivyMD","homepage":"https://www.youtube.com/channel/UCl72hvzwQ0rXUMBKTsKjRAA?view_as=subscriber","size":155380,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"HeaTTheatR:master","ref":"master","sha":"7064d5e95af2410a2a22bb273819596d7e44c006","user":{"login":"HeaTTheatR","id":16930280,"node_id":"MDQ6VXNlcjE2OTMwMjgw","avatar_url":"https://avatars3.githubusercontent.com/u/16930280?v=4","gravatar_id":"","url":"https://api.github.com/users/HeaTTheatR","html_url":"https://github.com/HeaTTheatR","followers_url":"https://api.github.com/users/HeaTTheatR/followers","following_url":"https://api.github.com/users/HeaTTheatR/following{/other_user}","gists_url":"https://api.github.com/users/HeaTTheatR/gists{/gist_id}","starred_url":"https://api.github.com/users/HeaTTheatR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeaTTheatR/subscriptions","organizations_url":"https://api.github.com/users/HeaTTheatR/orgs","repos_url":"https://api.github.com/users/HeaTTheatR/repos","events_url":"https://api.github.com/users/HeaTTheatR/events{/privacy}","received_events_url":"https://api.github.com/users/HeaTTheatR/received_events","type":"User","site_admin":false},"repo":{"id":146640524,"node_id":"MDEwOlJlcG9zaXRvcnkxNDY2NDA1MjQ=","name":"KivyMD","full_name":"HeaTTheatR/KivyMD","private":false,"owner":{"login":"HeaTTheatR","id":16930280,"node_id":"MDQ6VXNlcjE2OTMwMjgw","avatar_url":"https://avatars3.githubusercontent.com/u/16930280?v=4","gravatar_id":"","url":"https://api.github.com/users/HeaTTheatR","html_url":"https://github.com/HeaTTheatR","followers_url":"https://api.github.com/users/HeaTTheatR/followers","following_url":"https://api.github.com/users/HeaTTheatR/following{/other_user}","gists_url":"https://api.github.com/users/HeaTTheatR/gists{/gist_id}","starred_url":"https://api.github.com/users/HeaTTheatR/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HeaTTheatR/subscriptions","organizations_url":"https://api.github.com/users/HeaTTheatR/orgs","repos_url":"https://api.github.com/users/HeaTTheatR/repos","events_url":"https://api.github.com/users/HeaTTheatR/events{/privacy}","received_events_url":"https://api.github.com/users/HeaTTheatR/received_events","type":"User","site_admin":false},"html_url":"https://github.com/HeaTTheatR/KivyMD","description":"KivyMD is a collection of Material Design compliant widgets for use with Kivy, a framework for cross-platform, touch-enabled graphical applications.","fork":false,"url":"https://api.github.com/repos/HeaTTheatR/KivyMD","forks_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/forks","keys_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/keys{/key_id}","collaborators_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/teams","hooks_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/hooks","issue_events_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/events{/number}","events_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/events","assignees_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/assignees{/user}","branches_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/branches{/branch}","tags_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/tags","blobs_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/git/refs{/sha}","trees_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/git/trees{/sha}","statuses_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/statuses/{sha}","languages_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/languages","stargazers_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/stargazers","contributors_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/contributors","subscribers_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/subscribers","subscription_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/subscription","commits_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/commits{/sha}","git_commits_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/git/commits{/sha}","comments_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/comments{/number}","issue_comment_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/comments{/number}","contents_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/contents/{+path}","compare_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/compare/{base}...{head}","merges_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/merges","archive_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/downloads","issues_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues{/number}","pulls_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls{/number}","milestones_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/milestones{/number}","notifications_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/labels{/name}","releases_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/releases{/id}","deployments_url":"https://api.github.com/repos/HeaTTheatR/KivyMD/deployments","created_at":"2018-08-29T18:16:24Z","updated_at":"2019-09-06T19:51:12Z","pushed_at":"2019-09-07T02:40:23Z","git_url":"git://github.com/HeaTTheatR/KivyMD.git","ssh_url":"git@github.com:HeaTTheatR/KivyMD.git","clone_url":"https://github.com/HeaTTheatR/KivyMD.git","svn_url":"https://github.com/HeaTTheatR/KivyMD","homepage":"https://www.youtube.com/channel/UCl72hvzwQ0rXUMBKTsKjRAA?view_as=subscriber","size":155378,"stargazers_count":157,"watchers_count":157,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":54,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":1,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":54,"open_issues":1,"watchers":157,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104"},"html":{"href":"https://github.com/HeaTTheatR/KivyMD/pull/104"},"issue":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/104"},"comments":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/issues/104/comments"},"review_comments":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104/comments"},"review_comment":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/pulls/104/commits"},"statuses":{"href":"https://api.github.com/repos/HeaTTheatR/KivyMD/statuses/94cd92103b69accd7698cd1f68bb566c14464bf2"}},"author_association":"NONE"}}
{"actor":{"display_login":"Mountaino"}}