コード例 #1
0
def myToolTip(widget,
              x,
              y,
              keyboard_mode,
              tooltip,
              title,
              desc,
              filename=None):
    table = gtk.Table(2, 2)
    table.set_row_spacings(2)
    table.set_col_spacings(6)
    table.set_border_width(4)

    pixbuf = mapPixbuf.getImage(filename)
    image = gtk.image_new_from_pixbuf(pixbuf)
    image.set_alignment(0, 0)
    table.attach(image, 0, 1, 0, 2)

    titleLabel = gtk.Label()
    titleLabel.set_markup("<b>%s</b>" % title)
    titleLabel.set_alignment(0, 0)
    table.attach(titleLabel, 1, 2, 0, 1)

    descLabel = gtk.Label(desc)
    descLabel.props.wrap = True
    table.attach(descLabel, 1, 2, 1, 2)

    tooltip.set_custom(table)
    table.show_all()
    return True
コード例 #2
0
ファイル: customWidgets.py プロジェクト: pacoqueen/cican
def myToolTip(widget, x, y, keyboard_mode, tooltip, title, desc, filename=None):
    table = gtk.Table(2,2)
    table.set_row_spacings(2)
    table.set_col_spacings(6)
    table.set_border_width(4)

    pixbuf = mapPixbuf.getImage(filename)
    image = gtk.image_new_from_pixbuf(pixbuf)
    image.set_alignment(0, 0)
    table.attach(image, 0,1,0,2)

    titleLabel = gtk.Label()
    titleLabel.set_markup("<b>%s</b>" % title)
    titleLabel.set_alignment(0, 0)
    table.attach(titleLabel, 1,2,0,1)

    descLabel = gtk.Label(desc)
    descLabel.props.wrap = True
    table.attach(descLabel, 1,2,1,2)

    tooltip.set_custom(table)
    table.show_all()
    return True
コード例 #3
0
 def get_marker_pixbuf(self):
     return mapPixbuf.getImage('marker_gps.png', 48, 48)
コード例 #4
0
 def get_marker_pixbuf(self, zl, image='marker.png'):
     pixDim = self.get_pixDim(zl)
     return mapPixbuf.getImage(image, pixDim, pixDim)
コード例 #5
0
ファイル: mapMark.py プロジェクト: pacoqueen/cican
 def get_marker_pixbuf(self, zl, image='marker_s.png'):
     pixDim = self.get_pixDim(zl)
     return mapPixbuf.getImage(image, pixDim, pixDim)