Commit Graph

6 Commits

Author SHA1 Message Date
Michael Natterer aeac58089b app: add a font selector to the text style editor
Selects fonts just fine, but has no effect on the text yet.
2010-03-02 00:12:27 +01:00
Michael Natterer b19db0dea9 app: don't remove all tags when toggling style buttons and then inserting
Instead, keep a list of tags to explicitely remove around (the list of
unchecked toggles), and remove only these tags, so the tags that have
no widget in the UI are not affected by the insert_tags logic.
2010-03-01 22:39:42 +01:00
Michael Natterer e7a3938932 app: make toggle button updating a lot less complicated
by getting rid of the hash table and foreach() calls. Use some
readable for() loops over the list of toggles instead.
2010-02-28 15:31:35 +01:00
Michael Natterer 1c8b01f012 app: make the text style editor aware of the image's resolution
Needed for adding proper text size controls.
2010-02-28 14:20:56 +01:00
Michael Natterer 9a53cc11ca app: allow to toggle tags and then write text with that style
instead of using the toggles only to change the style of selected text.

Introduces a list of "insert tags" in GimpTextBuffer that is applied
on newly inserted text if it exists. Clear the list on each content
or cursor/selection change, so we always display wthe style at the
cursor unless the buttons were clicked explicitely.
2010-02-26 19:56:54 +01:00
Michael Natterer 360f5739da app: add infrastructure for editing pango markup based text styles
- keep around tags for styles in GimpTextBuffer. For now only bold,
  italic, underline and strikethrough.
- add GimpTextStyleEditor, a widget which allows setting tags on
  a GimpTextBuffer's selection.
- add serialize/deserialize code to/from pango markup using
  GtkTextBuffer's rich text (de)serialization infrastructure.
  Doesn't produce or handle <span> yet.
2010-02-26 01:27:05 +01:00