in my gtkmm app i have a label that has a background image thanks to css
provider. like this:
```
MainWindow::MainWindow():
Mylabel(Hello)
{
provider = Gtk::CssProvider::create();
provider->load_from_data(
"#LogoLabel{"
//"color:#800000;"
//"color:#5485ae;"
"color:#0075ff;"
"}"
"#PleaseHitKeyLbl{"
"background-color:#3333337a;"
"font-size:20px;"
"}"
"#BackgroundImage{"
"background-image:url(\"file:///home/ali/Desktop/sonbg.jpg\");"
"background-size:100% 100%;"
"opacity:0.3;"
"}"
);
MyLabel.set_name("BackgroundImage");
MyLabel.get_style_context()->add_provider(provider, 1);
}
```
The problem is that I dont know how to tell the `background-image` inside
the style provider to "get the image from resource" instead of "file"
please help me.
Regards.
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to