Re: Replacement for gtk_widget_override_background_color() with GtkTextView

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi;

On 11 February 2015 at 13:08, Murray Cumming <murrayc@xxxxxxxxxxx> wrote:
> The gtk_widget_override_*() functions were recently deprecated:
> https://git.gnome.org/browse/gtk+/commit/?id=63efdca2
> (These had themselves replaced gtk_widget_modify_*():
> https://git.gnome.org/browse/gtk+/commit/?id=f383e6b0 )
>
> I'd like to improve the deprecation documentation to give more exact
> clues about what people should do.

there are two ways to replace gtk_widget_modify_background_color() —
though, obviously, the actual reply would be "don't":

 • you can either provide a fragment of CSS to style the widget yourself
 • you can override the GtkWidget::draw signal, and paint the color
yourself using Cairo

> But I don't know what CSS would replace
> gtk_widget_override_background_color() for a GtkTextView. If I use
> "background-color: #whatever" then only the background of the content's
> text is colored, not the background of the whole area.

what does "the whole area" mean, in this context? the text view may
have some margin, which does not get painted with the background
color, as per CSS spec.

if you want to paint the area beneath the margin, you'll have to draw
on the parent widget, not on the GtkTextView.

ciao,
 Emmanuele.

-- 
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list





[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux