summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2015-10-13 17:01:12 +0200
committerBastien Nocera <hadess@hadess.net>2015-10-13 17:09:34 +0200
commit274fc6ebabc7b14a0e2e42bff26c39c871296aa2 (patch)
tree72680c82f5c8af9ad9c205d4a7651b6d925c46c2
parentfa6cf1ca55479e656db18e748e2108c9ffe42a93 (diff)
downloadgnome-bluetooth-274fc6ebabc7b14a0e2e42bff26c39c871296aa2.tar.gz
pairing-dialog: Fix lost styling for PINs
The styling was lost when moving the GTK+ theme from gnome-themes-standard to GTK+. https://bugzilla.gnome.org/show_bug.cgi?id=756446
-rw-r--r--lib/Makefile.am2
-rw-r--r--lib/bluetooth-pairing-dialog.c10
-rw-r--r--lib/bluetooth-settings.css7
-rw-r--r--lib/bluetooth.gresource.xml1
4 files changed, 19 insertions, 1 deletions
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 80ad1edb..c8468b89 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -10,7 +10,7 @@ bluetooth-settings-resources.c: bluetooth.gresource.xml $(resource_files)
bluetooth-settings-resources.h: bluetooth.gresource.xml $(resource_files)
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name bluetooth_settings $<
-EXTRA_DIST += bluetooth.gresource.xml settings.ui bluetooth-pairing-dialog.ui bluetooth-settings-row.ui
+EXTRA_DIST += bluetooth.gresource.xml settings.ui bluetooth-pairing-dialog.ui bluetooth-settings-row.ui bluetooth-settings.css
BUILT_SOURCES += bluetooth-settings-resources.c bluetooth-settings-resources.h
# will be scanned for introspection annotation, but won't be installed
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index 2aa95fc7..8e3d3b61 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -254,10 +254,20 @@ text_changed_cb (GObject *gobject,
static void
bluetooth_pairing_dialog_init (BluetoothPairingDialog *self)
{
+ GtkCssProvider *provider;
+
gtk_widget_init_template (GTK_WIDGET (self));
gtk_widget_set_size_request (GTK_WIDGET (self), 380, -1);
gtk_window_set_resizable (GTK_WINDOW (self), FALSE);
+
+ provider = gtk_css_provider_new ();
+ gtk_css_provider_load_from_resource (provider, "/org/gnome/bluetooth/bluetooth-settings.css");
+ gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
+ GTK_STYLE_PROVIDER (provider),
+ GTK_STYLE_PROVIDER_PRIORITY_USER);
+ g_object_unref (provider);
+
}
static void
diff --git a/lib/bluetooth-settings.css b/lib/bluetooth-settings.css
new file mode 100644
index 00000000..22bd0ebf
--- /dev/null
+++ b/lib/bluetooth-settings.css
@@ -0,0 +1,7 @@
+GtkEntry.entry.pin-entry {
+ font: regular 50;
+}
+
+GtkLabel.pin-label {
+ font: regular 50;
+}
diff --git a/lib/bluetooth.gresource.xml b/lib/bluetooth.gresource.xml
index 8b3becb0..4b8111b2 100644
--- a/lib/bluetooth.gresource.xml
+++ b/lib/bluetooth.gresource.xml
@@ -4,5 +4,6 @@
<file preprocess="xml-stripblanks">settings.ui</file>
<file preprocess="xml-stripblanks">bluetooth-pairing-dialog.ui</file>
<file preprocess="xml-stripblanks">bluetooth-settings-row.ui</file>
+ <file>bluetooth-settings.css</file>
</gresource>
</gresources>