libsysprof-ui: style environment editor

This commit is contained in:
Christian Hergert
2019-05-18 13:58:22 -07:00
parent b213f7bbe4
commit 597d757bf8
3 changed files with 21 additions and 0 deletions

View File

@ -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;
}

View File

@ -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>

View File

@ -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 *