[sysprof] libsysprof-ui: style environment editor
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] libsysprof-ui: style environment editor
- Date: Wed, 29 May 2019 22:34:23 +0000 (UTC)
commit 597d757bf86c37edb31a59ba046af77d0f20ef1a
Author: Christian Hergert <chergert redhat com>
Date: Sat May 18 13:58:22 2019 -0700
libsysprof-ui: style environment editor
src/libsysprof-ui/css/SysprofEnvironEditor-shared.css | 13 +++++++++++++
src/libsysprof-ui/libsysprof-ui.gresource.xml | 1 +
src/libsysprof-ui/sysprof-environ-editor.c | 7 +++++++
3 files changed, 21 insertions(+)
---
diff --git a/src/libsysprof-ui/css/SysprofEnvironEditor-shared.css
b/src/libsysprof-ui/css/SysprofEnvironEditor-shared.css
new file mode 100644
index 0000000..89f1ed2
--- /dev/null
+++ b/src/libsysprof-ui/css/SysprofEnvironEditor-shared.css
@@ -0,0 +1,13 @@
+list.environ-editor row button.flat:last-child {
+ min-height: 16px;
+ min-width: 16px;
+ padding: 0;
+ margin: 3px;
+}
+list.environ-editor row button.flat:not(:hover) {
+ border-color: transparent;
+}
+list.environ-editor row button.flat image {
+ padding: 3;
+ margin: 0;
+}
diff --git a/src/libsysprof-ui/libsysprof-ui.gresource.xml b/src/libsysprof-ui/libsysprof-ui.gresource.xml
index 9584917..1f43823 100644
--- a/src/libsysprof-ui/libsysprof-ui.gresource.xml
+++ b/src/libsysprof-ui/libsysprof-ui.gresource.xml
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<gresources>
<gresource prefix="/org/gnome/sysprof">
+ <file compressed="true">css/SysprofEnvironEditor-shared.css</file>
<file compressed="true">css/SysprofVisualizerView-shared.css</file>
<file compressed="true">css/SysprofVisualizerView-Adwaita.css</file>
<file compressed="true">css/SysprofVisualizerView-Adwaita-dark.css</file>
diff --git a/src/libsysprof-ui/sysprof-environ-editor.c b/src/libsysprof-ui/sysprof-environ-editor.c
index 8fe2882..58ef2f6 100644
--- a/src/libsysprof-ui/sysprof-environ-editor.c
+++ b/src/libsysprof-ui/sysprof-environ-editor.c
@@ -26,6 +26,7 @@
#include "sysprof-environ-editor.h"
#include "sysprof-environ-editor-row.h"
+#include "sysprof-theme-manager.h"
struct _SysprofEnvironEditor
{
@@ -248,6 +249,7 @@ sysprof_environ_editor_class_init (SysprofEnvironEditorClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
GtkListBoxClass *list_box_class = GTK_LIST_BOX_CLASS (klass);
+ SysprofThemeManager *theme_manager = sysprof_theme_manager_get_default ();
object_class->get_property = sysprof_environ_editor_get_property;
object_class->set_property = sysprof_environ_editor_set_property;
@@ -264,12 +266,17 @@ sysprof_environ_editor_class_init (SysprofEnvironEditorClass *klass)
(G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_properties (object_class, N_PROPS, properties);
+
+ sysprof_theme_manager_register_resource (theme_manager, NULL, NULL,
"/org/gnome/sysprof/css/SysprofEnvironEditor-shared.css");
}
static void
sysprof_environ_editor_init (SysprofEnvironEditor *self)
{
gtk_list_box_set_selection_mode (GTK_LIST_BOX (self), GTK_SELECTION_NONE);
+
+ gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (self)),
+ "environ-editor");
}
GtkWidget *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]