mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-06 00:30:08 +00:00
Add GTK_WRAP_WORD_CHAR. (#110086, David Brigada)
* gtk/gtktextlayout.c (set_para_values): * gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086, David Brigada)
This commit is contained in:
parent
c4dd1bd3f9
commit
0230821081
@ -1,5 +1,9 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktextlayout.c (set_para_values):
|
||||
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
|
||||
David Brigada)
|
||||
|
||||
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
|
||||
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
|
||||
misspellings of possessive "its". (#110027, Doug Quale)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktextlayout.c (set_para_values):
|
||||
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
|
||||
David Brigada)
|
||||
|
||||
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
|
||||
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
|
||||
misspellings of possessive "its". (#110027, Doug Quale)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktextlayout.c (set_para_values):
|
||||
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
|
||||
David Brigada)
|
||||
|
||||
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
|
||||
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
|
||||
misspellings of possessive "its". (#110027, Doug Quale)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktextlayout.c (set_para_values):
|
||||
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
|
||||
David Brigada)
|
||||
|
||||
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
|
||||
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
|
||||
misspellings of possessive "its". (#110027, Doug Quale)
|
||||
|
@ -1,5 +1,9 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/gtktextlayout.c (set_para_values):
|
||||
* gtk/gtkenums.h (GtkWrapMode): Add GTK_WRAP_WORD_CHAR. (#110086,
|
||||
David Brigada)
|
||||
|
||||
* gtk/gtkcelleditable.c, gtk/gtkfixed.c, gtk/gtktreemodel.c,
|
||||
gtk/gtktreeselection.c, gtk/gtktreeview.c: Fix numerous
|
||||
misspellings of possessive "its". (#110027, Doug Quale)
|
||||
|
@ -1,5 +1,7 @@
|
||||
2003-04-07 Matthias Clasen <maclas@gmx.de>
|
||||
|
||||
* gtk/tmpl/gtktexttag.sgml: Document GTK_WRAP_WORD_CHAR. (#110086)
|
||||
|
||||
* gtk/tmpl/gtkenums.sgml, gtk/tmpl/gtkmain.sgml,
|
||||
gtk/tmpl/gtkpaned.sgml, gtk/tmpl/gtkradiobutton.sgml,
|
||||
gtk/tmpl/gtkspinbutton.sgml, gtk/tmpl/gtkstatusbar.sgml,
|
||||
|
@ -49,6 +49,8 @@ Describes a type of line wrapping.
|
||||
be technical, between graphemes, see
|
||||
pango_get_log_attrs())
|
||||
@GTK_WRAP_WORD: wrap text, breaking lines in between words
|
||||
@GTK_WRAP_WORD_CHAR: wrap text, breaking lines in between words, or if
|
||||
that is not enough, also between graphemes.
|
||||
|
||||
<!-- ##### STRUCT GtkTextAttributes ##### -->
|
||||
<para>
|
||||
|
@ -416,7 +416,8 @@ typedef enum
|
||||
{
|
||||
GTK_WRAP_NONE,
|
||||
GTK_WRAP_CHAR,
|
||||
GTK_WRAP_WORD
|
||||
GTK_WRAP_WORD,
|
||||
GTK_WRAP_WORD_CHAR
|
||||
} GtkWrapMode;
|
||||
|
||||
/* How to sort */
|
||||
|
@ -1156,6 +1156,12 @@ set_para_values (GtkTextLayout *layout,
|
||||
pango_layout_set_wrap (display->layout, PANGO_WRAP_WORD);
|
||||
break;
|
||||
|
||||
case GTK_WRAP_WORD_CHAR:
|
||||
layout_width = layout->screen_width - display->left_margin - display->right_margin;
|
||||
pango_layout_set_width (display->layout, layout_width * PANGO_SCALE);
|
||||
pango_layout_set_wrap (display->layout, PANGO_WRAP_WORD_CHAR);
|
||||
break;
|
||||
|
||||
case GTK_WRAP_NONE:
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user