Re: "draw" icon with string

2018-09-10 Thread c.buhtz--- via gtk-app-devel-list
Dear cecashon, thanks for your code. This works currently. I need to improve it in the future to support different plattforms (fonts) and screen resolutions (scale). kind Christian On 2018-09-10 19:32 wrote: > > Give this a try. It creates a surface, draws on it and then returns > the

Re: "draw" icon with string

2018-09-10 Thread Chris Moller
Have you seen the recent post from Eric Cashon?   I think it's a similar example but in Python.  Sorry, but I've never used Pycairo. On 10/09/18 16:53, c.buhtz--- via gtk-app-devel-list wrote: Thanks Chris for your example code. But I am not able to map your C code to Pycairo. Even the doc

Cancel a Drag & Drop for some specific items in a Gtk.TreeView

2018-09-10 Thread c.buhtz--- via gtk-app-devel-list
I also opened this question on https://stackoverflow.com/q/51974845/4865723 I have a Gtk.TreeView here. Most but not all of the items should be able to be dragged & dropped. For example the first item should not be able to be dragged & dropped but it should be selectable. How can I realize this?

Re: "draw" icon with string

2018-09-10 Thread c.buhtz--- via gtk-app-devel-list
Thanks Chris for your example code. But I am not able to map your C code to Pycairo. Even the doc of Pycairo is not helpfull. No examples, no class trees. I still don't know how to draw text to a cairo surface. It is also unclear to me which surface I should use. On 2018-09-09 18:22 Chris

Re: "draw" icon with string

2018-09-10 Thread Eric Cashon via gtk-app-devel-list
Give this a try. It creates a surface, draws on it and then returns the surface so that it can be put in an image widget. import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk import cairo class MainWindow(Gtk.Window):     def __init__(self):