2

I want to help to solve the following Inkscape issue: https://gitlab.com/inkscape/inkscape/-/issues/885

enter image description here

Actually, almost all examples are about the Python bindings, and some of them don't really show the GTK version or are API-outdated.

The closest answer I could find is https://stackoverflow.com/a/56415144/8948381, which I have proved in my system and it appears to half-work... The problem is that I can't parse it properly to C++.

So the question is clear: How to get the GTK+3 Theme colors in C++. This includes in separate variables (mainly) the Font color and the Background color. Please a link of the possible available colors.

It's to note that I'm not a developer, I'm just trying to know something new. So if you can add higlights I would be grateful.

DATALOT
  • 131
  • 6
  • I left the ship with GTK+2.4. However... Isn't there any other place in the Inkscape source code where you could look how to use the Theme colors? I would do this to prefer the Inkscape-idiomatic way. – Scheff's Cat Oct 09 '20 at 10:53
  • It would be a good way for someone who know about the GTK API and recognize when colors are called for cutom widgets, so also it should recognize the custom widget. For me, that's not so easy and the idea of this ask is to significatively decrease the time in which I workaround it. However, that's something I have not planned to do but I will try. Thank you. – DATALOT Oct 09 '20 at 16:27

1 Answers1

0

See https://stackoverflow.com/a/74078476/4417769, this worked well in python. The c++ equivalent is https://docs.gtk.org/gtk3/method.Style.lookup_color.html I guess

sezanzeb
  • 816
  • 8
  • 20