Thanks for the branch, however it simply does not work as expected here: when I drag an icon out from the launcher, I get nothing painted on the screen, but one small pixel.
The problems seems to be in
SetBaseSize(DROP_SHADOW_SIZE * widthFactor, DROP_SHADOW_SIZE * heightFactor);
Since you don't LOG_ERROR the error, you can avoid to use it... Just pass nullptr to gdk_pixbuf_new_from_file_at_size
Also, instead of adding a new pixbuf, what about using the PKGDATADIR"/launcher_icon_shadow_200.png" or PKGDATADIR"/launcher_icon_shadow_62.png" textures that the AbstractIconRender is alredy using? So they will always match...
Thanks for the branch, however it simply does not work as expected here: when I drag an icon out from the launcher, I get nothing painted on the screen, but one small pixel. DROP_SHADOW_ SIZE * widthFactor, DROP_SHADOW_SIZE * heightFactor);
The problems seems to be in
SetBaseSize(
Also: GdkPixbuf> pbuf(gdk_ pixbuf_ new_from_ file_at_ size(PKGDATADIR "/ordering_ shadow. png",
31 + glib::Error error;
32 + glib::Object<
33 + DROP_SHADOW_SIZE, DROP_SHADOW_SIZE, &error));
Since you don't LOG_ERROR the error, you can avoid to use it... Just pass nullptr to gdk_pixbuf_ new_from_ file_at_ size
Also, instead of adding a new pixbuf, what about using the PKGDATADIR" /launcher_ icon_shadow_ 200.png" or PKGDATADIR" /launcher_ icon_shadow_ 62.png" textures that the AbstractIconRender is alredy using? So they will always match...
34 + if (GDK_IS_ PIXBUF( pbuf.RawPtr( )))
Use the nwe pbuf.IsType( GDK_TYPE_ PIXBUF)
+ nux::BaseTexture* texture = nux::CreateText ure2DFromPixbuf (pbuf, true);
This should be unreferenced... You can just use a nux::ObjectPtr to handle it and forget.
PS: instead of checking != nullptr we prefer to have simple (check) or (!check) ;)