Commit Graph

34 Commits

Author SHA1 Message Date
a90961ef4a app: make GimpTextStyleEditor look a bit nicer
Add some spacing and move the color button to the bottom.
2011-03-21 01:00:37 +01:00
6d97fd3887 app: use a size entry instead of a spinbutton in GimpTextStyleEditor
so it's finally clear what unit the text size has.
2011-03-20 12:37:01 +01:00
140c9aae91 Bug 625273 - Insert Font and font-size into the Texteditor's Menubar
If the cursor position (or the current selection), doesn't contain any
font, font-size or color tags, display the default values from the
GimpText object instead of "nothing". Still display nothing if the
selection contains different fonts, sizes or colors.
2011-03-18 22:13:34 +01:00
ecbfb4a9e8 app: add a GimpText property and construct param to GimpTextStyleEditor
which will be used to get default values from.
2011-03-18 21:16:53 +01:00
90058cded7 app: add missing tooltips in the text style overlay widget 2011-03-14 13:05:30 +01:00
4186d0114f app: add comment to improve readability 2011-01-20 20:26:34 +01:00
202124c438 app: implement GObject::constructed() instead of ::constructor() 2011-01-14 09:38:46 +01:00
b9a7c121a4 app: don't inherit from GtkHBox or GtkVBox
Instead, inherit from GtkBox directly and set the orientation in
init().  Replace more gtk_container_add() by gtk_box_pack_start() in
the reparented classes.
2010-10-30 15:44:46 +02:00
68b380fa4e app: forgot to check for "color_differs" for breaking out of a loop
Shouldn't change anything, just be slightly faster in some cases.
2010-10-02 19:51:49 +02:00
81cfb44047 app: use a GimpColorPanel not a GimpColorButton in the text style editor
so we get proper color previews in the popup menu.
2010-09-29 21:14:51 +02:00
bfce429d24 app: some minor fixes in GimpTextStyleEditor
- initialize all of the color strust in init().
- simplify font_changed().
2010-09-02 00:42:59 +02:00
ad819263af Bug 620674 - Adding support for multi-colored text layer
Apply slightly modified patch from Barak Itkin that adds colors for
text spans plus GUI to edit these colors.
2010-09-02 00:20:04 +02:00
67ba62154e app: fix and improve text style overlay keyboard interaction
- app/widgets/gimptextstyleeditor.c: don't block all key events so
  they can reach the canvas.

- app/display/gimpdisplayshell-callbacks.c: instead, ignore canvas key
  events when the canvas has no focus.

This fixes navigating out of the text style editor with TAB, moving
focus to the canvas. I have no clue why navigating *between* the
widgets in the style editor doesn't work.
2010-05-12 19:00:18 +02:00
a6b2d102f3 app: add utility functions for getting GtkTextTag properties
and also #define the names of the properties we (ab)use, so we don't
have to use magic strings all over the place, and we don't have to use
g_object_get() either.
2010-04-03 18:04:50 +02:00
e856ca9552 app: handle kerning tags in the same way as baseline, size and font 2010-04-02 15:19:27 +02:00
2e1e5393fe app: make sure the baseline spinbutton always shows the right value 2010-03-31 19:13:46 +02:00
b4e86aa6ec app: make sure the "size" spinbutton shows the size used for inserting text 2010-03-28 21:52:10 +02:00
91cce1c81b app: add size control for text spans, does not work as expected yet 2010-03-28 21:38:31 +02:00
e003213784 app: move code for font entry and "size" label together 2010-03-06 22:54:12 +01:00
6fcb5c137d app: block all unhandled key events in the text style editor
so they don't affect the on-canvas editor.
2010-03-04 18:53:53 +01:00
8434bf9276 app: reorganize widgets in two lines
this so needs a clear ui concept...
2010-03-04 14:33:19 +01:00
f766215548 app: add baseline and kerning controls to the style editor overlay
Involves adding GimpTextBuffer API to *set* baseline and kerning (as
opposed to changing it relatively from what it was).
2010-03-04 14:33:19 +01:00
f230019f71 app: move updating the style editor to an idle function
so subsequent signals trigger only one update.
2010-03-02 11:46:58 +01:00
1ddef5d375 app: redo the buffer's tag-at-iter APIs and fix editor state update 2010-03-02 11:37:57 +01:00
bea0c7f3d4 app: allow to select fonts on text spans
A bit hackish, will cleanup...
2010-03-02 11:11:06 +01:00
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
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
f519b90a2b app: call begin_user_action() and end_user_action() around removing tags 2010-03-01 16:09:50 +01:00
65216b939d app: group text buffer changes by user actions
Use gtk_text_buffer_begin_user_action() and end_user_action() to group
all text buffer operations triggered by a single editing operation.
Connect to the buffer's "end-user-action" signal instead of to
"changed", "apply-tag" and "remove-tag" separately, so we only update
the text proxy once per user editing.
2010-02-28 17:15:06 +01:00
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
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
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
11479d3abd app: use the tags left of the cursor when inserting
and make sure the style editor's buttons are correct at the beginning
and end of spans (take the tags toggled on/off at these positions into
account).
2010-02-26 03:05:57 +01:00
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