{"action":"closed","issue":{"url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3497","repository_url":"https://api.github.com/repos/Beep6581/RawTherapee","labels_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3497/labels{/name}","comments_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3497/comments","events_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/3497/events","html_url":"https://github.com/Beep6581/RawTherapee/issues/3497","id":186804543,"number":3497,"title":"Lockable color picker interacts with info text on image area","user":{"login":"Floessie","id":10133457,"avatar_url":"https://avatars.githubusercontent.com/u/10133457?v=3","gravatar_id":"","url":"https://api.github.com/users/Floessie","html_url":"https://github.com/Floessie","followers_url":"https://api.github.com/users/Floessie/followers","following_url":"https://api.github.com/users/Floessie/following{/other_user}","gists_url":"https://api.github.com/users/Floessie/gists{/gist_id}","starred_url":"https://api.github.com/users/Floessie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Floessie/subscriptions","organizations_url":"https://api.github.com/users/Floessie/orgs","repos_url":"https://api.github.com/users/Floessie/repos","events_url":"https://api.github.com/users/Floessie/events{/privacy}","received_events_url":"https://api.github.com/users/Floessie/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-11-02T13:45:32Z","updated_at":"2016-11-08T23:12:15Z","closed_at":"2016-11-08T23:12:15Z","body":"When changing the lockable color picker's size (CTRL + mouse wheel), the info text changes from bold to normal weight and vice versa when the smallest/biggest circle size is reached.\r\n\r\nHere is a quick'n'dirty patch for `master`:\r\n```patch\r\ndiff --git a/rtgui/imagearea.cc b/rtgui/imagearea.cc\r\nindex 32df9f8..caa885d 100644\r\n--- a/rtgui/imagearea.cc\r\n+++ b/rtgui/imagearea.cc\r\n@@ -149,7 +149,8 @@ void ImageArea::setInfoText (Glib::ustring text)\r\n     infotext = text;\r\n \r\n     Glib::RefPtr<Pango::Context> context = get_pango_context () ;\r\n-    Pango::FontDescription fontd = context->get_font_description ();\r\n+    const Pango::FontDescription prev_fontd = context->get_font_description ();\r\n+    Pango::FontDescription fontd = prev_fontd;\r\n     fontd.set_weight (Pango::WEIGHT_BOLD);\r\n     fontd.set_size (9 * Pango::SCALE);\r\n     context->set_font_description (fontd);\r\n@@ -159,6 +160,7 @@ void ImageArea::setInfoText (Glib::ustring text)\r\n     ilayout->get_pixel_size (iw, ih);\r\n     ipixbuf = Gdk::Pixbuf::create (Gdk::COLORSPACE_RGB, true, 8, iw + 8, ih + 8);\r\n     ipixbuf->fill (128);\r\n+    context->set_font_description (prev_fontd);\r\n }\r\n \r\n void ImageArea::infoEnabled (bool e)\r\ndiff --git a/rtgui/lockablecolorpicker.cc b/rtgui/lockablecolorpicker.cc\r\nindex abfb943..91a8166 100644\r\n--- a/rtgui/lockablecolorpicker.cc\r\n+++ b/rtgui/lockablecolorpicker.cc\r\n@@ -46,6 +46,7 @@ void LockableColorPicker::updateBackBuffer ()\r\n         Gtk::DrawingArea *iArea = cropWindow->getImageArea();\r\n \r\n         Glib::RefPtr<Pango::Context> pangoContext = iArea->get_pango_context ();\r\n+        const Pango::FontDescription prev_fontd = pangoContext->get_font_description ();\r\n         Pango::FontDescription fontd(options.colorPickerFont);\r\n         fontd.set_weight(Pango::WEIGHT_NORMAL);\r\n         pangoContext->set_font_description (fontd);\r\n@@ -205,6 +206,8 @@ void LockableColorPicker::updateBackBuffer ()\r\n         anchorOffset.set (center, center);\r\n \r\n         setDirty (false);\r\n+\r\n+        pangoContext->set_font_description (prev_fontd);\r\n     } else if (validity == Validity::CROSSING) {\r\n         newH = newW = (int)size + 2 * circlePadding;\r\n \r\n```\r\n\r\nHTH\r\nFlössie"}}
{"actor":{"display_login":"Hombre57"}}