{"action":"created","comment":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments/25828915","id":25828915,"diff_hunk":"@@ -68,8 +70,12 @@ MainToolBar::MainToolBar()\n     }\n     // Get screen DPI to manage font sizes on different platforms\n     QScreen *srn = QGuiApplication::screens().at(0); // TODO: Find current monitor as opposed to picking first one\n-    _dotsPerInch = (qreal)srn->logicalDotsPerInch(); // Font point sizes are based on Mac 72dpi\n-\n+    if(srn && srn->logicalDotsPerInch() > 50.0) {\n+        _dotsPerInch = (qreal)srn->logicalDotsPerInch(); // Font point sizes are based on Mac 72dpi\n+    } else {\n+        qWarning() << \"System not reporting logical DPI.\";","path":"src/ui/toolbar/MainToolBar.cc","position":25,"original_position":25,"commit_id":"4fb15d3dde9f1a01d40bffdac59cd68679bc2377","original_commit_id":"4fb15d3dde9f1a01d40bffdac59cd68679bc2377","user":{"login":"Susurrus","id":206363,"avatar_url":"https://avatars.githubusercontent.com/u/206363?v=3","gravatar_id":"","url":"https://api.github.com/users/Susurrus","html_url":"https://github.com/Susurrus","followers_url":"https://api.github.com/users/Susurrus/followers","following_url":"https://api.github.com/users/Susurrus/following{/other_user}","gists_url":"https://api.github.com/users/Susurrus/gists{/gist_id}","starred_url":"https://api.github.com/users/Susurrus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Susurrus/subscriptions","organizations_url":"https://api.github.com/users/Susurrus/orgs","repos_url":"https://api.github.com/users/Susurrus/repos","events_url":"https://api.github.com/users/Susurrus/events{/privacy}","received_events_url":"https://api.github.com/users/Susurrus/received_events","type":"User","site_admin":false},"body":"Might be worth stating that a specific default would be used. If we're spitting out warnings, we should give users a way to understand what was done anyways and possibly what they should do to fix this. If I saw this warning my first thought would be, okay, what kind of screen resolution is it going to use if it can't find a valid value?","created_at":"2015-03-05T00:20:07Z","updated_at":"2015-03-05T00:20:07Z","html_url":"https://github.com/mavlink/qgroundcontrol/pull/1315#discussion_r25828915","pull_request_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315","_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments/25828915"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/1315#discussion_r25828915"},"pull_request":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315"}}},"pull_request":{"url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315","id":30505895,"html_url":"https://github.com/mavlink/qgroundcontrol/pull/1315","diff_url":"https://github.com/mavlink/qgroundcontrol/pull/1315.diff","patch_url":"https://github.com/mavlink/qgroundcontrol/pull/1315.patch","issue_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1315","number":1315,"state":"open","locked":false,"title":"Tool Bar Tweaks","user":{"login":"dogmaphobic","id":749243,"avatar_url":"https://avatars.githubusercontent.com/u/749243?v=3","gravatar_id":"","url":"https://api.github.com/users/dogmaphobic","html_url":"https://github.com/dogmaphobic","followers_url":"https://api.github.com/users/dogmaphobic/followers","following_url":"https://api.github.com/users/dogmaphobic/following{/other_user}","gists_url":"https://api.github.com/users/dogmaphobic/gists{/gist_id}","starred_url":"https://api.github.com/users/dogmaphobic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogmaphobic/subscriptions","organizations_url":"https://api.github.com/users/dogmaphobic/orgs","repos_url":"https://api.github.com/users/dogmaphobic/repos","events_url":"https://api.github.com/users/dogmaphobic/events{/privacy}","received_events_url":"https://api.github.com/users/dogmaphobic/received_events","type":"User","site_admin":false},"body":"Tool Bar Tweaks\r\n\r\nPer #1310, the satellite icon now has 4 color behaviors:\r\n\r\n* No GPS: Gray\r\n* GPS present but no lock: Red\r\n* 2D Lock: Blue (rare)\r\n* 3D Lock: Green\r\n\r\nThe count is only shown if more than 0 satellites are seen. The logic behind the gray icon when there is no GPS is that you (will be able to) can chose to have the icon in the tool bar as a preference. In that way, the presence of the icon is based on a preference and not automatic. It makes for a more predictable behavior.\r\n\r\nPer #1311, I’ve fixed the message icon so the drop down triangle is not shown if there are no messages to be displayed. Clicking on the gray icon has no effect if there are no messages. The icon is always visible, even if no messages are present, following the same logic as in above.\r\n\r\nPer #1312, I’ve changed the voltage to 1 decimal point. The battery icon has 3 color behaviors:\r\n\r\n* No battery data: Blue\r\n* Battery level > 40%: Green\r\n* Battery level <= 40% Red\r\n\r\nThe reason I didn’t do gray for no battery data is because of the voltage. My next task will be to get voltage data (values for low and high) and use those to determine the icon color for when no battery level data exists. Only if there is neither battery level nor voltage data would the icon be gray.\r\n","created_at":"2015-03-04T21:24:19Z","updated_at":"2015-03-05T00:20:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aa13965fd842ecb6c1b5361e78de941487d97fd4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315/commits","review_comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315/comments","review_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1315/comments","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/4fb15d3dde9f1a01d40bffdac59cd68679bc2377","head":{"label":"dogmaphobic:toolBarFixes","ref":"toolBarFixes","sha":"4fb15d3dde9f1a01d40bffdac59cd68679bc2377","user":{"login":"dogmaphobic","id":749243,"avatar_url":"https://avatars.githubusercontent.com/u/749243?v=3","gravatar_id":"","url":"https://api.github.com/users/dogmaphobic","html_url":"https://github.com/dogmaphobic","followers_url":"https://api.github.com/users/dogmaphobic/followers","following_url":"https://api.github.com/users/dogmaphobic/following{/other_user}","gists_url":"https://api.github.com/users/dogmaphobic/gists{/gist_id}","starred_url":"https://api.github.com/users/dogmaphobic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogmaphobic/subscriptions","organizations_url":"https://api.github.com/users/dogmaphobic/orgs","repos_url":"https://api.github.com/users/dogmaphobic/repos","events_url":"https://api.github.com/users/dogmaphobic/events{/privacy}","received_events_url":"https://api.github.com/users/dogmaphobic/received_events","type":"User","site_admin":false},"repo":{"id":29939414,"name":"qgroundcontrol","full_name":"dogmaphobic/qgroundcontrol","owner":{"login":"dogmaphobic","id":749243,"avatar_url":"https://avatars.githubusercontent.com/u/749243?v=3","gravatar_id":"","url":"https://api.github.com/users/dogmaphobic","html_url":"https://github.com/dogmaphobic","followers_url":"https://api.github.com/users/dogmaphobic/followers","following_url":"https://api.github.com/users/dogmaphobic/following{/other_user}","gists_url":"https://api.github.com/users/dogmaphobic/gists{/gist_id}","starred_url":"https://api.github.com/users/dogmaphobic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dogmaphobic/subscriptions","organizations_url":"https://api.github.com/users/dogmaphobic/orgs","repos_url":"https://api.github.com/users/dogmaphobic/repos","events_url":"https://api.github.com/users/dogmaphobic/events{/privacy}","received_events_url":"https://api.github.com/users/dogmaphobic/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dogmaphobic/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":true,"url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol","forks_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/dogmaphobic/qgroundcontrol/releases{/id}","created_at":"2015-01-27T23:00:57Z","updated_at":"2015-03-04T16:25:21Z","pushed_at":"2015-03-04T22:19:37Z","git_url":"git://github.com/dogmaphobic/qgroundcontrol.git","ssh_url":"git@github.com:dogmaphobic/qgroundcontrol.git","clone_url":"https://github.com/dogmaphobic/qgroundcontrol.git","svn_url":"https://github.com/dogmaphobic/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":149961,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"mavlink:master","ref":"master","sha":"87c28f2dcbc5eb1452478f9feee242e6a25e10d8","user":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"repo":{"id":2567844,"name":"qgroundcontrol","full_name":"mavlink/qgroundcontrol","owner":{"login":"mavlink","id":961247,"avatar_url":"https://avatars.githubusercontent.com/u/961247?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlink","html_url":"https://github.com/mavlink","followers_url":"https://api.github.com/users/mavlink/followers","following_url":"https://api.github.com/users/mavlink/following{/other_user}","gists_url":"https://api.github.com/users/mavlink/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlink/subscriptions","organizations_url":"https://api.github.com/users/mavlink/orgs","repos_url":"https://api.github.com/users/mavlink/repos","events_url":"https://api.github.com/users/mavlink/events{/privacy}","received_events_url":"https://api.github.com/users/mavlink/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mavlink/qgroundcontrol","description":"QGroundControl Ground Control Station","fork":false,"url":"https://api.github.com/repos/mavlink/qgroundcontrol","forks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/forks","keys_url":"https://api.github.com/repos/mavlink/qgroundcontrol/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlink/qgroundcontrol/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlink/qgroundcontrol/teams","hooks_url":"https://api.github.com/repos/mavlink/qgroundcontrol/hooks","issue_events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/events{/number}","events_url":"https://api.github.com/repos/mavlink/qgroundcontrol/events","assignees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/assignees{/user}","branches_url":"https://api.github.com/repos/mavlink/qgroundcontrol/branches{/branch}","tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/tags","blobs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlink/qgroundcontrol/languages","stargazers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/stargazers","contributors_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contributors","subscribers_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscribers","subscription_url":"https://api.github.com/repos/mavlink/qgroundcontrol/subscription","commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlink/qgroundcontrol/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlink/qgroundcontrol/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlink/qgroundcontrol/contents/{+path}","compare_url":"https://api.github.com/repos/mavlink/qgroundcontrol/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlink/qgroundcontrol/merges","archive_url":"https://api.github.com/repos/mavlink/qgroundcontrol/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlink/qgroundcontrol/downloads","issues_url":"https://api.github.com/repos/mavlink/qgroundcontrol/issues{/number}","pulls_url":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlink/qgroundcontrol/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlink/qgroundcontrol/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlink/qgroundcontrol/labels{/name}","releases_url":"https://api.github.com/repos/mavlink/qgroundcontrol/releases{/id}","created_at":"2011-10-13T07:31:07Z","updated_at":"2015-03-04T08:14:57Z","pushed_at":"2015-03-04T08:14:56Z","git_url":"git://github.com/mavlink/qgroundcontrol.git","ssh_url":"git@github.com:mavlink/qgroundcontrol.git","clone_url":"https://github.com/mavlink/qgroundcontrol.git","svn_url":"https://github.com/mavlink/qgroundcontrol","homepage":"http://qgroundcontrol.org","size":169413,"stargazers_count":188,"watchers_count":188,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":262,"mirror_url":null,"open_issues_count":303,"forks":262,"open_issues":303,"watchers":188,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315"},"html":{"href":"https://github.com/mavlink/qgroundcontrol/pull/1315"},"issue":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1315"},"comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/issues/1315/comments"},"review_comments":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315/comments"},"review_comment":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/pulls/1315/commits"},"statuses":{"href":"https://api.github.com/repos/mavlink/qgroundcontrol/statuses/4fb15d3dde9f1a01d40bffdac59cd68679bc2377"}}}}