[gtk+/wip/window-scales2: 27/40] gtk-demo: Add demo of hidpi css assets via -gtk-scaled()
- From: Alexander Larsson <alexl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/window-scales2: 27/40] gtk-demo: Add demo of hidpi css assets via -gtk-scaled()
- Date: Wed, 3 Jul 2013 12:44:14 +0000 (UTC)
commit 6a4f82a1f47bd839cab4d5e049ed1f33010b2f07
Author: Alexander Larsson <alexl redhat com>
Date: Thu Jun 27 18:32:24 2013 +0200
gtk-demo: Add demo of hidpi css assets via -gtk-scaled()
demos/gtk-demo/Makefile.am | 2 ++
demos/gtk-demo/brick.png | Bin 11104 -> 5043 bytes
demos/gtk-demo/brick2.png | Bin 0 -> 10713 bytes
demos/gtk-demo/css_multiplebgs.c | 2 +-
demos/gtk-demo/css_multiplebgs.css | 2 +-
demos/gtk-demo/demo.gresource.xml | 1 +
6 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/demos/gtk-demo/Makefile.am b/demos/gtk-demo/Makefile.am
index 698372e..101071f 100644
--- a/demos/gtk-demo/Makefile.am
+++ b/demos/gtk-demo/Makefile.am
@@ -117,6 +117,8 @@ RESOURCES= $(demos) \
listbox.ui \
alphatest.png \
apple-red.png \
+ brick.png \
+ brick2.png \
background.jpg \
floppybuddy.gif \
gnome-applets.png \
diff --git a/demos/gtk-demo/brick.png b/demos/gtk-demo/brick.png
index e5ea779..d413cd2 100644
Binary files a/demos/gtk-demo/brick.png and b/demos/gtk-demo/brick.png differ
diff --git a/demos/gtk-demo/brick2.png b/demos/gtk-demo/brick2.png
new file mode 100644
index 0000000..cfcd079
Binary files /dev/null and b/demos/gtk-demo/brick2.png differ
diff --git a/demos/gtk-demo/css_multiplebgs.c b/demos/gtk-demo/css_multiplebgs.c
index bb12a23..e69ce77 100644
--- a/demos/gtk-demo/css_multiplebgs.c
+++ b/demos/gtk-demo/css_multiplebgs.c
@@ -117,7 +117,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
gtk_widget_set_name (child, "bricks-button");
gtk_widget_set_halign (child, GTK_ALIGN_CENTER);
gtk_widget_set_valign (child, GTK_ALIGN_CENTER);
- gtk_widget_set_size_request (child, 200, 80);
+ gtk_widget_set_size_request (child, 250, 84);
paned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
gtk_overlay_add_overlay (GTK_OVERLAY (container), paned);
diff --git a/demos/gtk-demo/css_multiplebgs.css b/demos/gtk-demo/css_multiplebgs.css
index b23415d..af10b7c 100644
--- a/demos/gtk-demo/css_multiplebgs.css
+++ b/demos/gtk-demo/css_multiplebgs.css
@@ -56,7 +56,7 @@
/*
#bricks-button {
background-color: #eef;
- background-image: url('resource:///css_multiplebgs/brick.png');
+ background-image:
-gtk-scaled(url('resource:///css_multiplebgs/brick.png'),url('resource:///css_multiplebgs/brick2.png'));
background-repeat: no-repeat;
background-position: center;
}
diff --git a/demos/gtk-demo/demo.gresource.xml b/demos/gtk-demo/demo.gresource.xml
index 238fbd9..1a32586 100644
--- a/demos/gtk-demo/demo.gresource.xml
+++ b/demos/gtk-demo/demo.gresource.xml
@@ -23,6 +23,7 @@
<gresource prefix="/css_multiplebgs">
<file>css_multiplebgs.css</file>
<file>brick.png</file>
+ <file>brick2.png</file>
<file>cssview.css</file>
<file>reset.css</file>
</gresource>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]