Re: Gtk3 custom theme parsing



On 02.08.2012 17:57, zentara wrote:
GtkCssProvider *provider = gtk_css_provider_new ();

   gtk_css_provider_load_from_data (
     provider,
     "GtkButton {font: Monospace 10; background-color: rgba(0%, 76%, 0%, 0.6);}",
     -1, NULL);

  my $p = Gtk3::CssProvider->new;
$p->load_from_data ("GtkButton {font: Monospace 10; background-color: rgba(0%, 76%, 0%, 0.6);}", -1);
  say $p->to_string;

Unfortuantely, due to an annotation error in gtk+ itself, this doesn't currently work. See <https://bugzilla.gnome.org/show_bug.cgi?id=646859>.

As a workaround, use

$p->load_from_data ([map ord, split //, "GtkButton {font: Monospace 10; background-color: rgba(0%, 76%, 0%, 0.6);}"]);



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