{"action":"created","comment":{"url":"https://api.github.com/repos/freeorion/freeorion/pulls/comments/33986140","id":33986140,"diff_hunk":"@@ -202,12 +206,16 @@ namespace {\n                 DoLayout();\n             }\n             if (m_link_text) {\n-                // Use the height of the text as our height.\n+                // establish sitrep panel's size; use icon or text size for panel height, whichever is larger\n                 // DoLayout reflowed the text.\n-                GG::Pt text_size = m_link_text->TextLowerRight() - m_link_text->TextUpperLeft();\n-                text_size.y += ITEM_VERTICAL_PADDING*2; // Text centers, so this puts padding on both above and below\n-                text_size.x = lr.x - ul.x; // Ignore the width of the text, use whatever was requested.\n-                GG::Control::SizeMove(ul, ul + text_size );\n+                GG::Pt panel_text = m_link_text->TextLowerRight() - m_link_text->TextUpperLeft();\n+                int text_size = Value(panel_text.y);","path":"UI/SitRepPanel.cpp","position":32,"original_position":32,"commit_id":"5f94fee8ef139abd2a11cbf0ce942a0241b3ee9c","original_commit_id":"5f94fee8ef139abd2a11cbf0ce942a0241b3ee9c","user":{"login":"Dilvish-fo","id":10995939,"avatar_url":"https://avatars.githubusercontent.com/u/10995939?v=3","gravatar_id":"","url":"https://api.github.com/users/Dilvish-fo","html_url":"https://github.com/Dilvish-fo","followers_url":"https://api.github.com/users/Dilvish-fo/followers","following_url":"https://api.github.com/users/Dilvish-fo/following{/other_user}","gists_url":"https://api.github.com/users/Dilvish-fo/gists{/gist_id}","starred_url":"https://api.github.com/users/Dilvish-fo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dilvish-fo/subscriptions","organizations_url":"https://api.github.com/users/Dilvish-fo/orgs","repos_url":"https://api.github.com/users/Dilvish-fo/repos","events_url":"https://api.github.com/users/Dilvish-fo/events{/privacy}","received_events_url":"https://api.github.com/users/Dilvish-fo/received_events","type":"User","site_admin":false},"body":"\"panel_text\" seems like a wrong name for something that is more of a text size, and you could simply combine these lines: \r\n```\r\nint text_size = Value((m_link_text->TextLowerRight() - m_link_text->TextUpperLeft()).y);\r\n```\r\n\r\nAlso, just to mention an alternative approach using different info that you might more specifically want to use sometime, you can also get a working result with \r\n```\r\nint text_size = Value(m_link_text->GetFont()->Lineskip()) * m_link_text->GetLineData().size();\r\n```","created_at":"2015-07-06T21:43:27Z","updated_at":"2015-07-06T21:43:27Z","html_url":"https://github.com/freeorion/freeorion/pull/181#discussion_r33986140","pull_request_url":"https://api.github.com/repos/freeorion/freeorion/pulls/181","_links":{"self":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/comments/33986140"},"html":{"href":"https://github.com/freeorion/freeorion/pull/181#discussion_r33986140"},"pull_request":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/181"}}},"pull_request":{"url":"https://api.github.com/repos/freeorion/freeorion/pulls/181","id":39300548,"html_url":"https://github.com/freeorion/freeorion/pull/181","diff_url":"https://github.com/freeorion/freeorion/pull/181.diff","patch_url":"https://github.com/freeorion/freeorion/pull/181.patch","issue_url":"https://api.github.com/repos/freeorion/freeorion/issues/181","number":181,"state":"open","locked":false,"title":"Make sitrep panel icon and text size adjustable","user":{"login":"TheSilentOne1","id":12985960,"avatar_url":"https://avatars.githubusercontent.com/u/12985960?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSilentOne1","html_url":"https://github.com/TheSilentOne1","followers_url":"https://api.github.com/users/TheSilentOne1/followers","following_url":"https://api.github.com/users/TheSilentOne1/following{/other_user}","gists_url":"https://api.github.com/users/TheSilentOne1/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSilentOne1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSilentOne1/subscriptions","organizations_url":"https://api.github.com/users/TheSilentOne1/orgs","repos_url":"https://api.github.com/users/TheSilentOne1/repos","events_url":"https://api.github.com/users/TheSilentOne1/events{/privacy}","received_events_url":"https://api.github.com/users/TheSilentOne1/received_events","type":"User","site_admin":false},"body":"Makes sitrep panel icon and text size individually adjustable via\r\nconfig.xml.","created_at":"2015-07-06T19:13:10Z","updated_at":"2015-07-06T21:43:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"407292f3b046f2816e8d45bc9b1d843c82293348","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/freeorion/freeorion/pulls/181/commits","review_comments_url":"https://api.github.com/repos/freeorion/freeorion/pulls/181/comments","review_comment_url":"https://api.github.com/repos/freeorion/freeorion/pulls/comments{/number}","comments_url":"https://api.github.com/repos/freeorion/freeorion/issues/181/comments","statuses_url":"https://api.github.com/repos/freeorion/freeorion/statuses/5f94fee8ef139abd2a11cbf0ce942a0241b3ee9c","head":{"label":"TheSilentOne1:master","ref":"master","sha":"5f94fee8ef139abd2a11cbf0ce942a0241b3ee9c","user":{"login":"TheSilentOne1","id":12985960,"avatar_url":"https://avatars.githubusercontent.com/u/12985960?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSilentOne1","html_url":"https://github.com/TheSilentOne1","followers_url":"https://api.github.com/users/TheSilentOne1/followers","following_url":"https://api.github.com/users/TheSilentOne1/following{/other_user}","gists_url":"https://api.github.com/users/TheSilentOne1/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSilentOne1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSilentOne1/subscriptions","organizations_url":"https://api.github.com/users/TheSilentOne1/orgs","repos_url":"https://api.github.com/users/TheSilentOne1/repos","events_url":"https://api.github.com/users/TheSilentOne1/events{/privacy}","received_events_url":"https://api.github.com/users/TheSilentOne1/received_events","type":"User","site_admin":false},"repo":{"id":37974678,"name":"freeorion","full_name":"TheSilentOne1/freeorion","owner":{"login":"TheSilentOne1","id":12985960,"avatar_url":"https://avatars.githubusercontent.com/u/12985960?v=3","gravatar_id":"","url":"https://api.github.com/users/TheSilentOne1","html_url":"https://github.com/TheSilentOne1","followers_url":"https://api.github.com/users/TheSilentOne1/followers","following_url":"https://api.github.com/users/TheSilentOne1/following{/other_user}","gists_url":"https://api.github.com/users/TheSilentOne1/gists{/gist_id}","starred_url":"https://api.github.com/users/TheSilentOne1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheSilentOne1/subscriptions","organizations_url":"https://api.github.com/users/TheSilentOne1/orgs","repos_url":"https://api.github.com/users/TheSilentOne1/repos","events_url":"https://api.github.com/users/TheSilentOne1/events{/privacy}","received_events_url":"https://api.github.com/users/TheSilentOne1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/TheSilentOne1/freeorion","description":"Source code repository of the FreeOrion project.","fork":true,"url":"https://api.github.com/repos/TheSilentOne1/freeorion","forks_url":"https://api.github.com/repos/TheSilentOne1/freeorion/forks","keys_url":"https://api.github.com/repos/TheSilentOne1/freeorion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/TheSilentOne1/freeorion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/TheSilentOne1/freeorion/teams","hooks_url":"https://api.github.com/repos/TheSilentOne1/freeorion/hooks","issue_events_url":"https://api.github.com/repos/TheSilentOne1/freeorion/issues/events{/number}","events_url":"https://api.github.com/repos/TheSilentOne1/freeorion/events","assignees_url":"https://api.github.com/repos/TheSilentOne1/freeorion/assignees{/user}","branches_url":"https://api.github.com/repos/TheSilentOne1/freeorion/branches{/branch}","tags_url":"https://api.github.com/repos/TheSilentOne1/freeorion/tags","blobs_url":"https://api.github.com/repos/TheSilentOne1/freeorion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/TheSilentOne1/freeorion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/TheSilentOne1/freeorion/git/refs{/sha}","trees_url":"https://api.github.com/repos/TheSilentOne1/freeorion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/TheSilentOne1/freeorion/statuses/{sha}","languages_url":"https://api.github.com/repos/TheSilentOne1/freeorion/languages","stargazers_url":"https://api.github.com/repos/TheSilentOne1/freeorion/stargazers","contributors_url":"https://api.github.com/repos/TheSilentOne1/freeorion/contributors","subscribers_url":"https://api.github.com/repos/TheSilentOne1/freeorion/subscribers","subscription_url":"https://api.github.com/repos/TheSilentOne1/freeorion/subscription","commits_url":"https://api.github.com/repos/TheSilentOne1/freeorion/commits{/sha}","git_commits_url":"https://api.github.com/repos/TheSilentOne1/freeorion/git/commits{/sha}","comments_url":"https://api.github.com/repos/TheSilentOne1/freeorion/comments{/number}","issue_comment_url":"https://api.github.com/repos/TheSilentOne1/freeorion/issues/comments{/number}","contents_url":"https://api.github.com/repos/TheSilentOne1/freeorion/contents/{+path}","compare_url":"https://api.github.com/repos/TheSilentOne1/freeorion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/TheSilentOne1/freeorion/merges","archive_url":"https://api.github.com/repos/TheSilentOne1/freeorion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/TheSilentOne1/freeorion/downloads","issues_url":"https://api.github.com/repos/TheSilentOne1/freeorion/issues{/number}","pulls_url":"https://api.github.com/repos/TheSilentOne1/freeorion/pulls{/number}","milestones_url":"https://api.github.com/repos/TheSilentOne1/freeorion/milestones{/number}","notifications_url":"https://api.github.com/repos/TheSilentOne1/freeorion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/TheSilentOne1/freeorion/labels{/name}","releases_url":"https://api.github.com/repos/TheSilentOne1/freeorion/releases{/id}","created_at":"2015-06-24T09:16:51Z","updated_at":"2015-06-24T09:16:56Z","pushed_at":"2015-07-06T19:10:21Z","git_url":"git://github.com/TheSilentOne1/freeorion.git","ssh_url":"git@github.com:TheSilentOne1/freeorion.git","clone_url":"https://github.com/TheSilentOne1/freeorion.git","svn_url":"https://github.com/TheSilentOne1/freeorion","homepage":"http://www.freeorion.org/","size":479685,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"freeorion:master","ref":"master","sha":"6d7ff1e8f9d5853429f848d699ff5703b6773413","user":{"login":"freeorion","id":1025550,"avatar_url":"https://avatars.githubusercontent.com/u/1025550?v=3","gravatar_id":"","url":"https://api.github.com/users/freeorion","html_url":"https://github.com/freeorion","followers_url":"https://api.github.com/users/freeorion/followers","following_url":"https://api.github.com/users/freeorion/following{/other_user}","gists_url":"https://api.github.com/users/freeorion/gists{/gist_id}","starred_url":"https://api.github.com/users/freeorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeorion/subscriptions","organizations_url":"https://api.github.com/users/freeorion/orgs","repos_url":"https://api.github.com/users/freeorion/repos","events_url":"https://api.github.com/users/freeorion/events{/privacy}","received_events_url":"https://api.github.com/users/freeorion/received_events","type":"Organization","site_admin":false},"repo":{"id":33066062,"name":"freeorion","full_name":"freeorion/freeorion","owner":{"login":"freeorion","id":1025550,"avatar_url":"https://avatars.githubusercontent.com/u/1025550?v=3","gravatar_id":"","url":"https://api.github.com/users/freeorion","html_url":"https://github.com/freeorion","followers_url":"https://api.github.com/users/freeorion/followers","following_url":"https://api.github.com/users/freeorion/following{/other_user}","gists_url":"https://api.github.com/users/freeorion/gists{/gist_id}","starred_url":"https://api.github.com/users/freeorion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/freeorion/subscriptions","organizations_url":"https://api.github.com/users/freeorion/orgs","repos_url":"https://api.github.com/users/freeorion/repos","events_url":"https://api.github.com/users/freeorion/events{/privacy}","received_events_url":"https://api.github.com/users/freeorion/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/freeorion/freeorion","description":"Source code repository of the FreeOrion project.","fork":false,"url":"https://api.github.com/repos/freeorion/freeorion","forks_url":"https://api.github.com/repos/freeorion/freeorion/forks","keys_url":"https://api.github.com/repos/freeorion/freeorion/keys{/key_id}","collaborators_url":"https://api.github.com/repos/freeorion/freeorion/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/freeorion/freeorion/teams","hooks_url":"https://api.github.com/repos/freeorion/freeorion/hooks","issue_events_url":"https://api.github.com/repos/freeorion/freeorion/issues/events{/number}","events_url":"https://api.github.com/repos/freeorion/freeorion/events","assignees_url":"https://api.github.com/repos/freeorion/freeorion/assignees{/user}","branches_url":"https://api.github.com/repos/freeorion/freeorion/branches{/branch}","tags_url":"https://api.github.com/repos/freeorion/freeorion/tags","blobs_url":"https://api.github.com/repos/freeorion/freeorion/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/freeorion/freeorion/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/freeorion/freeorion/git/refs{/sha}","trees_url":"https://api.github.com/repos/freeorion/freeorion/git/trees{/sha}","statuses_url":"https://api.github.com/repos/freeorion/freeorion/statuses/{sha}","languages_url":"https://api.github.com/repos/freeorion/freeorion/languages","stargazers_url":"https://api.github.com/repos/freeorion/freeorion/stargazers","contributors_url":"https://api.github.com/repos/freeorion/freeorion/contributors","subscribers_url":"https://api.github.com/repos/freeorion/freeorion/subscribers","subscription_url":"https://api.github.com/repos/freeorion/freeorion/subscription","commits_url":"https://api.github.com/repos/freeorion/freeorion/commits{/sha}","git_commits_url":"https://api.github.com/repos/freeorion/freeorion/git/commits{/sha}","comments_url":"https://api.github.com/repos/freeorion/freeorion/comments{/number}","issue_comment_url":"https://api.github.com/repos/freeorion/freeorion/issues/comments{/number}","contents_url":"https://api.github.com/repos/freeorion/freeorion/contents/{+path}","compare_url":"https://api.github.com/repos/freeorion/freeorion/compare/{base}...{head}","merges_url":"https://api.github.com/repos/freeorion/freeorion/merges","archive_url":"https://api.github.com/repos/freeorion/freeorion/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/freeorion/freeorion/downloads","issues_url":"https://api.github.com/repos/freeorion/freeorion/issues{/number}","pulls_url":"https://api.github.com/repos/freeorion/freeorion/pulls{/number}","milestones_url":"https://api.github.com/repos/freeorion/freeorion/milestones{/number}","notifications_url":"https://api.github.com/repos/freeorion/freeorion/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/freeorion/freeorion/labels{/name}","releases_url":"https://api.github.com/repos/freeorion/freeorion/releases{/id}","created_at":"2015-03-29T08:22:20Z","updated_at":"2015-07-01T11:33:26Z","pushed_at":"2015-07-06T19:36:49Z","git_url":"git://github.com/freeorion/freeorion.git","ssh_url":"git@github.com:freeorion/freeorion.git","clone_url":"https://github.com/freeorion/freeorion.git","svn_url":"https://github.com/freeorion/freeorion","homepage":"http://www.freeorion.org/","size":490441,"stargazers_count":55,"watchers_count":55,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":15,"forks":28,"open_issues":15,"watchers":55,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/181"},"html":{"href":"https://github.com/freeorion/freeorion/pull/181"},"issue":{"href":"https://api.github.com/repos/freeorion/freeorion/issues/181"},"comments":{"href":"https://api.github.com/repos/freeorion/freeorion/issues/181/comments"},"review_comments":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/181/comments"},"review_comment":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/freeorion/freeorion/pulls/181/commits"},"statuses":{"href":"https://api.github.com/repos/freeorion/freeorion/statuses/5f94fee8ef139abd2a11cbf0ce942a0241b3ee9c"}}}}