| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
This affects a few apis, such as gtk_text_iter_get_pixbuf,
gtk_text_buffer_insert_pixbuf and GtkTextBuffer::insert-pixbuf,
which have all been replaced by texture equivalents.
Update all callers.
|
|
|
|
|
|
| |
Rename the files to have the private.h ending.
And remove gtktextdisplay.h from the installed files.
|
|
|
|
| |
All calls in gtk+ were passing NULL anyway.
|
|
|
|
|
|
|
| |
In render_para() function, which is called for every text line that
needs to be drawn.
https://bugzilla.gnome.org/show_bug.cgi?id=783397
|
|
|
|
|
|
| |
Now that GtkTextAttributes is private, we can clean this struct
up a bit. The first step is to switch from GdkColor to GdkRGBA,
and adapt all users.
|
| |
|
|
|
|
|
| |
This allows us to declare the symbols that are currently used inside
gtktextdisplay.c without incurring in the wrath of the compiler.
|
|
|
|
| |
The argument must always be the current state.
|
|
|
|
|
|
|
| |
Use the text CSS node for rendering text, and the selection node
for rendering selected text, avoid gtk_style_context_save, update
states of all CSS nodes, and use the proper states when querying
style properties.
|
|
|
|
|
|
|
| |
Use a CSS node with name selection, like we do for entries
and labels. Unlike those widgets, we currently don't user
gtk_render_background, but just use the background color.
That will require more effort.
|
|
|
|
|
| |
Also, never use gtk_widget_get_state_flags() when we want
gtk_style_context_get_state()
|
|
|
|
| |
We generally use ->next directly.
|
|
|
|
|
| |
We don't need to store our own copy of the colors anymore,
now that PangoRenderer can do alpha.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit adds the GtkTextTag:underline-rgba and :strikethrough-rgba
properties and the necessary plumbing to apply these colors in GtkTextLayout.
With this change, you can alter the color of underlines including those
of type PANGO_UNDERLINE_ERROR.
You might want to alter the underline color to differentiate between
spelling and grammer mistakes. In code editors, it is convenient to
differentiate between errors and warnings.
Note that the GtkTextAppearance struct is public ABI and has no spare
room for new fields, so we are resorting to some tricky packing to store
the colors in the unused pixel field of the fg_color and bg_color structs.
This packing is accomplished by the macros in gtktextattributesprivate.h.
Signed-off-by: Christian Hergert <christian@hergert.me>
https://bugzilla.gnome.org/show_bug.cgi?id=402168
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
- gtk_style_context_get_background_color()
- gtk_style_context_get_border_color()
Those functions shouldn't be used anymore, because they don't represent
anything from the CSS styling we support. The background color often
isn't used due to background images and there are actually 4 different
border colors (1 for each side) - if there isn't also a border image in
use.
|
|
|
|
|
| |
It has been replaced by GdkRGBA. Time to make it official.
http://bugzilla.gnome.org/show_bug.cgi?id=636695
|
|
|
|
|
|
|
|
|
| |
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations.
This set of patches makes private classes in gtk/*.c that use
G_DEFINE_TYPE() safe by adding definitions for the get_type() function
that can't be made static.
|
|
|
|
|
|
|
|
|
|
| |
This partially reverts commit df37446f9b4116887865b7ecfddeb535fbc0eacb.
The commit changed API that was public (or at least semi-public) and
it's not worth changing that.
The original bug should still be fixed.
https://bugzilla.gnome.org/show_bug.cgi?id=673839
|
|
|
|
|
|
|
|
| |
Instead, just draw the children. The cairo code will keep track of
things, so there's no need to track things.
Also, the old code was doing it wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=672544
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The new function provides an API that takes the PangoLayout and index
as input params, this way it handles strong and weak cursors internally
factoring out all code duplicated in the widgets that need to render
cursors.
https://bugzilla.gnome.org/show_bug.cgi?id=640317
|
|
|
|
|
|
|
|
|
|
| |
Explicitely check the split-cursor setting when drawing the textview
insertion cursor instead of relying on the cursor_direction set in the
textlayout. This makes the cursor drawin code more uniform with other
widgets in preparation to refactoring the cursor drawing code in a
shared function.
https://bugzilla.gnome.org/show_bug.cgi?id=640317
|
|
|
|
|
|
|
|
| |
Move the handling of primary/secondary cursors to gtktextdisplay, which
makes code simpler and more consistent to how GtkLabel and GtkEntry
draw cursors, which is useful in preparation to further refactoring.
https://bugzilla.gnome.org/show_bug.cgi?id=640317
|
|
|
|
| |
https://bugzilla.gnome.org/show_bug.cgi?id=640317
|
|
|
|
|
| |
Added the remaining implementation bits for rendering paragraph backgrounds
with rgba values and updated the test case.
|
| |
|
|
|
|
|
|
|
|
| |
Background color was not painted on the whole tagged segment after
line breaking, this was due to the default ->prepare_run() function
wiping the internal PangoColors clean... fixed this by unconditionally
setting local rgba colors from prepare_run instead of comparing them
and bailing out.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now allows text view to render text with alpha values in
the text foreground and backgrounds, the work is almost complete,
currently the error-underline-color is still a GdkColor style property
and since we use only GdkRGBA for rendering it needs to be converted
and applied, probably a new rgba version of the style property should
also be introduced.
This commit adds tests/testtextview that must be run from the tests/
directory to show translucent text in action.
|
|
|
|
|
| |
We were only passing 0 anyway and it's easy to translate the cairo
context in use instead of passing x/y coordinates.
|
|
|
|
|
|
|
|
| |
This avoids overflow when transforming a large value to a pango unit.
To reproduce the problem:
seq 200000 > test.txt && tets/print-editor test.txt
Then scroll to around line 140.000 to see it (depends on font size of
course).
|
|
|
|
|
|
|
| |
Move the private get_cursor_color method belongs to StyleContext. Change
the api so that retrieving both primary and secondary color is possible.
I left the method private for now, though it should probably be public
as all the other getters.
|
| |
|
| |
|
|
|
|
| |
because they correctly contain that flag now if the widget has focus.
|
|
|
|
|
|
| |
Use the new StyleContext and StateFlags to draw the text
https://bugzilla.gnome.org/show_bug.cgi?id=639105
|
|
|
|
|
|
|
|
| |
prepare_run must have been called before draw_shape, so we can avoid
fiddling the the (deprecated) style and state and just use the color
alredy set on the renderer.
https://bugzilla.gnome.org/show_bug.cgi?id=639079
|
|
|
|
|
|
|
| |
The previous code used cairo_clip_extents() and interpreted its
parameters wrong.
https://bugzilla.gnome.org/show_bug.cgi?id=631203
|
|
|
|
|
| |
and rename gtk_cairo_draw_insertion_cursor() to
gtk_draw_insertion_cursor().
|
|
|
|
| |
This simplifies the API a lot and allows more magic to happen later.
|
| |
|
|
|
|
|
| |
The code for initializing the clip rectangle was accidentally deleted in
a previous patch. Put it back.
|
| |
|
| |
|
|
|
|
|
|
| |
The argument is unused.
That's also the reason why we can pass NULL instead of the real GC in
the caller.
|
|
|
|
| |
No more gdkpango usage, no more GdkGC required, yay!
|
|
|
|
|
| |
They seem pretty much unused and the only reason why GtkTextView uses a
GdkPangoRenderer and not a PangoCairoRenderer.
|
| |
|