Beispiel #1
0
PreferencesDialog.addColorPreference(
    'selectedColor',
    section=_("Appearance"),
    label=_("Selection Color"),
    description=_("Selected clips will be tinted with this color."))

GlobalSettings.addConfigOption('clipFontDesc',
                               section='user-interface',
                               key='clip-font-name',
                               default="Sans 9",
                               notify=True)

PreferencesDialog.addFontPreference(
    'clipFontDesc',
    section=_('Appearance'),
    label=_("Clip Font"),
    description=_("The font to use for clip titles"))

GlobalSettings.addConfigOption('clipFontColor',
                               section='user-interface',
                               key='clip-font-color',
                               default=0xFFFFFFAA,
                               notify=True)


def text_size(text):
    ink, logical = text.get_natural_extents()
    x1, y1, x2, y2 = [pango.PIXELS(x) for x in logical]
    return x2 - x1, y2 - y1
    default = 0x00000077,
    notify = True)

PreferencesDialog.addColorPreference('selectedColor',
    section = _("Appearance"),
    label = _("Selection Color"),
    description = _("Selected clips will be tinted with this color."))

GlobalSettings.addConfigOption('clipFontDesc',
    section = 'user-interface',
    key = 'clip-font-name',
    default = "Sans 9",
    notify = True)

PreferencesDialog.addFontPreference('clipFontDesc',
    section = _('Appearance'),
    label = _("Clip Font"),
    description = _("The font to use for clip titles"))

GlobalSettings.addConfigOption('clipFontColor',
    section = 'user-interface',
    key = 'clip-font-color',
    default = 0xFFFFFFAA,
    notify = True)

def text_size(text):
    ink, logical = text.get_natural_extents()
    x1, y1, x2, y2 = [pango.PIXELS(x) for x in logical]
    return x2 - x1, y2 - y1

class TimelineController(controller.Controller):