:right-sidebar: True Style =================================================================== .. currentmodule:: gi.repository.GtkSource .. class:: Style(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Represents a style. The ``GtkSourceStyle`` structure is used to describe text attributes which are set when given style is used. Methods ------- .. rst-class:: interim-class .. class:: Style :no-index: .. method:: apply(tag: ~gi.repository.Gtk.TextTag) -> None This function modifies the :obj:`~gi.repository.Gtk.TextTag` properties that are related to the :obj:`~gi.repository.GtkSource.Style` properties. Other :obj:`~gi.repository.Gtk.TextTag` properties are left untouched. If ``style`` is non-:const:`None`, applies ``style`` to ``tag``\. If ``style`` is :const:`None`, the related \*-set properties of :obj:`~gi.repository.Gtk.TextTag` are set to :const:`False`. :param tag: a :obj:`~gi.repository.Gtk.TextTag` to apply styles to. Properties ---------- .. rst-class:: interim-class .. class:: Style :no-index: .. attribute:: props.background :type: str The type of the None singleton. .. attribute:: props.background_set :type: bool The type of the None singleton. .. attribute:: props.bold :type: bool The type of the None singleton. .. attribute:: props.bold_set :type: bool The type of the None singleton. .. attribute:: props.foreground :type: str The type of the None singleton. .. attribute:: props.foreground_set :type: bool The type of the None singleton. .. attribute:: props.italic :type: bool The type of the None singleton. .. attribute:: props.italic_set :type: bool The type of the None singleton. .. attribute:: props.line_background :type: str The type of the None singleton. .. attribute:: props.line_background_set :type: bool The type of the None singleton. .. attribute:: props.pango_underline :type: ~gi.repository.Pango.Underline The type of the None singleton. .. attribute:: props.scale :type: str The type of the None singleton. .. attribute:: props.scale_set :type: bool The type of the None singleton. .. attribute:: props.strikethrough :type: bool The type of the None singleton. .. attribute:: props.strikethrough_set :type: bool The type of the None singleton. .. attribute:: props.underline_color :type: str The type of the None singleton. .. attribute:: props.underline_color_set :type: bool The type of the None singleton. .. attribute:: props.underline_set :type: bool The type of the None singleton. .. attribute:: props.weight :type: ~gi.repository.Pango.Weight The type of the None singleton. .. attribute:: props.weight_set :type: bool The type of the None singleton.