diff --git a/VERSION.cmake b/VERSION.cmake index 456823c1..9555a00e 100644 --- a/VERSION.cmake +++ b/VERSION.cmake @@ -1,5 +1,5 @@ SET( VERSION_MAJOR "2" ) SET( VERSION_MINOR "52" ) -SET( VERSION_PATCH "2" ) +SET( VERSION_PATCH "3" ) SET( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SHA1}" ) diff --git a/package/libyui-gtk.changes b/package/libyui-gtk.changes index 7fa3deaa..8ebc63a3 100644 --- a/package/libyui-gtk.changes +++ b/package/libyui-gtk.changes @@ -1,15 +1,25 @@ +------------------------------------------------------------------- +Mon Oct 17 19:06:36 CEST 2022 - anaselli@linux.it + +- 2.52.3 +- YGImage when creating an image looks if the given image is not a pathname + and try to get it from theme (issue #87) +- YGLayout fixing to show background picture (issue #86) + ------------------------------------------------------------------- Sun Sep 25 19:07:11 CEST 2022 - anaselli@linux.it + - Changed displayWidth/displayHeight implementation For GTK3 suggestion is to get the GdkWindow out of the GtkWindow widget with gtk_widget_get_window(), and then use gdk_display_get_monitor_at_window() This fixes dnfdragora bug https://github.com/manatools/dnfdragora/issues/207 when it runs on Gnome desktop. -- 2.51.2 +- 2.52.2 ------------------------------------------------------------------- Sun Jul 11 15:27:20 CET 2021 - anaselli@linux.it + - Fixed CMAKE_INSTALL_LIBDIR for pkgconfig ------------------------------------------------------------------- diff --git a/package/libyui-gtk.spec b/package/libyui-gtk.spec index 158f18d0..a6d84272 100644 --- a/package/libyui-gtk.spec +++ b/package/libyui-gtk.spec @@ -17,11 +17,11 @@ Name: libyui-gtk -Version: 2.52.2 +Version: 2.52.3 Release: 0 Source: %{name}-%{version}.tar.bz2 -%define so_version 15 +%define so_version 16 %define bin_name %{name}%{so_version} BuildRequires: boost-devel diff --git a/src/YGImage.cc b/src/YGImage.cc index 7f4b0afa..297e4497 100644 --- a/src/YGImage.cc +++ b/src/YGImage.cc @@ -10,6 +10,7 @@ #include "YImage.h" #include "ygtkimage.h" #include +#include static inline bool endsWith (const std::string &str1, const char *str2) { @@ -48,7 +49,23 @@ class YGImage : public YImage, public YGWidget ygtk_image_set_from_pixbuf (image, pixbuf); } else - ygtk_image_set_from_file (image, filename.c_str(), animated); + { + if (animated) + ygtk_image_set_from_file (image, filename.c_str(), animated); + else { + if (boost::filesystem::path(filename).has_extension()) { + ygtk_image_set_from_file (image, filename.c_str(), animated); + } + else { + if (gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default(), filename.c_str(), GTK_ICON_SIZE_DIALOG, GTK_ICON_LOOKUP_USE_BUILTIN)) { + GdkPixbuf *pixbuf = gtk_icon_theme_load_icon (gtk_icon_theme_get_default(), filename.c_str(), GTK_ICON_SIZE_DIALOG, GTK_ICON_LOOKUP_USE_BUILTIN,NULL); + ygtk_image_set_from_pixbuf (image, pixbuf); + } + else // last chance to find an image + ygtk_image_set_from_file (image, filename.c_str(), animated); + } + } + } } virtual void setAutoScale (bool scale) diff --git a/src/YGLayout.cc b/src/YGLayout.cc index 9c012205..bec321dc 100644 --- a/src/YGLayout.cc +++ b/src/YGLayout.cc @@ -175,16 +175,11 @@ class YGAlignment : public YAlignment, public YGWidget static gboolean draw_event_cb (GtkWidget *widget, cairo_t *cr, YGAlignment *pThis, int width, int height) { - gdk_cairo_set_source_pixbuf (cr, pThis->m_background_pixbuf, 0, 0); - cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); - - cairo_rectangle (cr, 0, 0, width, height); - cairo_fill (cr); - - gtk_container_propagate_draw (GTK_CONTAINER (widget), - gtk_bin_get_child(GTK_BIN (widget)), cr); - - return TRUE; + gdk_cairo_set_source_pixbuf (cr, pThis->m_background_pixbuf, 0, 0); + cairo_pattern_set_extend (cairo_get_source (cr), CAIRO_EXTEND_REPEAT); + cairo_rectangle (cr, 0, 0, width, height); + cairo_paint(cr); + return FALSE; } };