mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-25 13:11:13 +00:00
gtk-demo: Don't use aliases for filenames
This is necessary so the files displayed in the left notebook match the files referenced in the source code.
This commit is contained in:
parent
159dabd0a5
commit
7acf6296f4
@ -57,7 +57,7 @@ do_css_accordion (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (container), child);
|
||||
|
||||
provider = GTK_STYLE_PROVIDER (gtk_css_provider_new ());
|
||||
bytes = g_resources_lookup_data ("/css_accordion/gtk.css", 0, NULL);
|
||||
bytes = g_resources_lookup_data ("/css_accordion/css_accordion.css", 0, NULL);
|
||||
data = g_bytes_get_data (bytes, &data_size);
|
||||
|
||||
gtk_css_provider_load_from_data (GTK_CSS_PROVIDER (provider), (gchar *)data, data_size, NULL);
|
||||
|
@ -98,7 +98,7 @@ do_css_basics (GtkWidget *do_widget)
|
||||
G_CALLBACK (css_text_changed),
|
||||
provider);
|
||||
|
||||
bytes = g_resources_lookup_data ("/css_basics/gtk.css", 0, NULL);
|
||||
bytes = g_resources_lookup_data ("/css_basics/css_basics.css", 0, NULL);
|
||||
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* CSS Theming/Multiple Backgrounds :: css_multiplebgs.css cssview.css
|
||||
/* CSS Theming/Multiple Backgrounds :: css_multiplebgs.css
|
||||
*
|
||||
* Gtk themes are written using CSS. Every widget is build of multiple items
|
||||
* that you can style very similarly to a regular website.
|
||||
@ -147,7 +147,7 @@ do_css_multiplebgs (GtkWidget *do_widget)
|
||||
G_CALLBACK (css_text_changed),
|
||||
provider);
|
||||
|
||||
bytes = g_resources_lookup_data ("/css_multiplebgs/gtk.css", 0, NULL);
|
||||
bytes = g_resources_lookup_data ("/css_multiplebgs/css_multiplebgs.css", 0, NULL);
|
||||
gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
|
||||
g_bytes_unref (bytes);
|
||||
|
||||
|
@ -19,17 +19,17 @@
|
||||
<file>demo.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/css_accordion">
|
||||
<file alias="gtk.css">css_accordion.css</file>
|
||||
<file>css_accordion.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/css_basics">
|
||||
<file alias="gtk.css">css_basics.css</file>
|
||||
<file>css_basics.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/css_multiplebgs">
|
||||
<file alias="gtk.css">css_multiplebgs.css</file>
|
||||
<file>css_multiplebgs.css</file>
|
||||
<file>brick.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/theming_custom_css">
|
||||
<file alias="gtk.css">fancy.css</file>
|
||||
<file>fancy.css</file>
|
||||
</gresource>
|
||||
<gresource prefix="/theming_style_classes">
|
||||
<file preprocess="xml-stripblanks">theming.ui</file>
|
||||
|
@ -40,7 +40,7 @@ do_theming_custom_css (GtkWidget *do_widget)
|
||||
gtk_widget_set_name (button, "fancy");
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
bytes = g_resources_lookup_data ("/theming_custom_css/gtk.css", 0, NULL);
|
||||
bytes = g_resources_lookup_data ("/theming_custom_css/fancy.css", 0, NULL);
|
||||
gtk_css_provider_load_from_data (provider, g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes), NULL);
|
||||
gtk_style_context_add_provider_for_screen (gtk_widget_get_screen (do_widget),
|
||||
|
Loading…
Reference in New Issue
Block a user