{"action":"created","issue":{"url":"https://api.github.com/repos/magland/mountainlab/issues/19","repository_url":"https://api.github.com/repos/magland/mountainlab","labels_url":"https://api.github.com/repos/magland/mountainlab/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/magland/mountainlab/issues/19/comments","events_url":"https://api.github.com/repos/magland/mountainlab/issues/19/events","html_url":"https://github.com/magland/mountainlab/issues/19","id":143748533,"number":19,"title":"styling the entire app","user":{"login":"magland","id":3679296,"avatar_url":"https://avatars.githubusercontent.com/u/3679296?v=3","gravatar_id":"","url":"https://api.github.com/users/magland","html_url":"https://github.com/magland","followers_url":"https://api.github.com/users/magland/followers","following_url":"https://api.github.com/users/magland/following{/other_user}","gists_url":"https://api.github.com/users/magland/gists{/gist_id}","starred_url":"https://api.github.com/users/magland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magland/subscriptions","organizations_url":"https://api.github.com/users/magland/orgs","repos_url":"https://api.github.com/users/magland/repos","events_url":"https://api.github.com/users/magland/events{/privacy}","received_events_url":"https://api.github.com/users/magland/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"wysota","id":18017383,"avatar_url":"https://avatars.githubusercontent.com/u/18017383?v=3","gravatar_id":"","url":"https://api.github.com/users/wysota","html_url":"https://github.com/wysota","followers_url":"https://api.github.com/users/wysota/followers","following_url":"https://api.github.com/users/wysota/following{/other_user}","gists_url":"https://api.github.com/users/wysota/gists{/gist_id}","starred_url":"https://api.github.com/users/wysota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wysota/subscriptions","organizations_url":"https://api.github.com/users/wysota/orgs","repos_url":"https://api.github.com/users/wysota/repos","events_url":"https://api.github.com/users/wysota/events{/privacy}","received_events_url":"https://api.github.com/users/wysota/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-26T20:53:01Z","updated_at":"2016-03-29T15:21:15Z","closed_at":null,"body":"Right now I am achieving a consistent color scheme across some of the widget using this type of code (see below). Need to handle this the right way. css? not sure.\r\n\r\nQStringList color_strings;\r\n    color_strings\r\n        << \"#282828\"\r\n        << \"#402020\"\r\n        << \"#204020\"\r\n        << \"#202070\";\r\n    for (int i = 0; i < color_strings.count(); i++)\r\n        d->m_channel_colors << QColor(brighten(color_strings[i], 80));\r\n\r\n    d->m_colors[\"background\"] = QColor(240, 240, 240);\r\n    d->m_colors[\"frame1\"] = QColor(245, 245, 245);\r\n    d->m_colors[\"info_text\"] = QColor(80, 80, 80);\r\n    d->m_colors[\"view_background\"] = QColor(245, 245, 245);\r\n    d->m_colors[\"view_background_highlighted\"] = QColor(210, 230, 250);\r\n    d->m_colors[\"view_background_selected\"] = QColor(220, 240, 250);\r\n    d->m_colors[\"view_background_hovered\"] = QColor(240, 245, 240);\r\n\r\n    d->m_colors[\"view_frame_selected\"] = QColor(50, 20, 20);\r\n    d->m_colors[\"divider_line\"] = QColor(255, 100, 150);"},"comment":{"url":"https://api.github.com/repos/magland/mountainlab/issues/comments/202949990","html_url":"https://github.com/magland/mountainlab/issues/19#issuecomment-202949990","issue_url":"https://api.github.com/repos/magland/mountainlab/issues/19","id":202949990,"user":{"login":"magland","id":3679296,"avatar_url":"https://avatars.githubusercontent.com/u/3679296?v=3","gravatar_id":"","url":"https://api.github.com/users/magland","html_url":"https://github.com/magland","followers_url":"https://api.github.com/users/magland/followers","following_url":"https://api.github.com/users/magland/following{/other_user}","gists_url":"https://api.github.com/users/magland/gists{/gist_id}","starred_url":"https://api.github.com/users/magland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magland/subscriptions","organizations_url":"https://api.github.com/users/magland/orgs","repos_url":"https://api.github.com/users/magland/repos","events_url":"https://api.github.com/users/magland/events{/privacy}","received_events_url":"https://api.github.com/users/magland/received_events","type":"User","site_admin":false},"created_at":"2016-03-29T15:21:15Z","updated_at":"2016-03-29T15:21:15Z","body":"To see how I use it, search for m_colors in:\r\nhttps://github.com/magland/mountainlab/blob/master/mountainview/src/mvclusterdetailwidget.cpp\r\nand in:\r\nhttps://github.com/magland/mountainlab/blob/master/mountainview/src/histogramview.cpp\r\n(in this way I achieve some consistency across the two widgets)\r\n\r\nHere is a snippet from the latter:\r\n if (m_current) {\r\n        painter.fillRect(R, m_colors[\"view_background_highlighted\"]);\r\n    }\r\n    else if (m_selected) {\r\n        painter.fillRect(R, m_colors[\"view_background_selected\"]);\r\n    }\r\n    else if (m_hovered) {\r\n        painter.fillRect(R, m_colors[\"view_background_hovered\"]);\r\n    }\r\n    else {\r\n        painter.fillRect(R, m_colors[\"view_background\"]);\r\n    }\r\n\r\nIf QPalette is the right way, could you direct me to how I could replace my code?"}}