[gtkmm-documentation] Window icons and AboutDialog logos are Gdk::Texture
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm-documentation] Window icons and AboutDialog logos are Gdk::Texture
- Date: Mon, 13 Nov 2017 09:26:48 +0000 (UTC)
commit 1cab5fcf56a271abb6e652e28170ef3b6f91908f
Author: Kjell Ahlstedt <kjellahlstedt gmail com>
Date: Mon Nov 13 10:24:46 2017 +0100
Window icons and AboutDialog logos are Gdk::Texture
They were recently changed from Gdk::Pixbuf to Cairo::Surface.
Now they have become Gdk::Texture.
examples/book/buildapp/step9/exampleappwindow.cc | 3 +--
examples/book/dialogs/aboutdialog/examplewindow.cc | 4 ++--
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/examples/book/buildapp/step9/exampleappwindow.cc
b/examples/book/buildapp/step9/exampleappwindow.cc
index 63acd68..25f50d6 100644
--- a/examples/book/buildapp/step9/exampleappwindow.cc
+++ b/examples/book/buildapp/step9/exampleappwindow.cc
@@ -114,8 +114,7 @@ ExampleAppWindow::ExampleAppWindow(BaseObjectType* cobject,
set_show_menubar(true);
// Set the window icon.
- set_icon(Gdk::Cairo::create_surface_from_pixbuf(
- Gdk::Pixbuf::create_from_resource("/org/gtkmm/exampleapp/exampleapp.png"), 1));
+ set_icon(Gdk::Texture::create_from_resource("/org/gtkmm/exampleapp/exampleapp.png"));
}
//static
diff --git a/examples/book/dialogs/aboutdialog/examplewindow.cc
b/examples/book/dialogs/aboutdialog/examplewindow.cc
index aa00884..98d1117 100644
--- a/examples/book/dialogs/aboutdialog/examplewindow.cc
+++ b/examples/book/dialogs/aboutdialog/examplewindow.cc
@@ -39,8 +39,8 @@ ExampleWindow::ExampleWindow()
m_Dialog.set_transient_for(*this);
- m_Dialog.set_logo(Gdk::Cairo::create_surface_from_pixbuf(
- Gdk::Pixbuf::create_from_resource("/about/gtkmm_logo.gif", -1, 40, true), 1));
+ m_Dialog.set_logo(Gdk::Texture::create_for_pixbuf(
+ Gdk::Pixbuf::create_from_resource("/about/gtkmm_logo.gif", -1, 40, true)));
m_Dialog.set_program_name("Example application");
m_Dialog.set_version("1.0.0");
m_Dialog.set_copyright("Murray Cumming");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]