[Github-comments] [geany/geany-plugins] updated treebrowser for GTK+ >= 3.10.0 (#279)

Colomban Wendling notifications at xxxxx
Mon Jun 20 22:22:32 UTC 2016


> +        gtk_style_context_add_provider_for_screen (screen, GTK_STYLE_PROVIDER (provider),
> +                                                   GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
> +        if(!is_dir)
> +        {
> +            gtk_css_provider_load_from_data (GTK_CSS_PROVIDER(provider),
> +                                             " #addrbar {\n"
> +                                             "   background: red;\n"
> +                                             "}\n", -1, NULL);
> +        }
> +        else
> +        {
> +            gtk_css_provider_load_from_data (GTK_CSS_PROVIDER(provider),
> +                                             " #addrbar {\n"
> +                                             "   background: white;\n"
> +                                             "}\n", -1, NULL);
> +        }

and actually this isn't a proper port of what the original code did in GTK2: it used to set *both* background and foreground when `is_dir` evaluated to false, and here you change only the background, but to a different color depending on the `is_dir` value.  That's not good, as you change background but not foreground, so it might very well be unreadable (imagine white on white for a dark theme).

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/pull/279/files/5aea39e7bdafe1905226a419113f2e0f78249a23#r67777902
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160620/66af65e6/attachment.html>


More information about the Github-comments mailing list