css: fix object select image styling for profiler assistant

Fixes #79
This commit is contained in:
Christian Hergert
2022-07-22 13:30:43 -07:00
parent 3002640c50
commit feccf5fbeb
4 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,7 @@
sysprofaidicon image.right.top {
border-radius: 9999px;
background-color: @theme_selected_bg_color;
color: @theme_selected_fg_color;
padding: 2px;
margin: 0px;
}

View File

@ -3,6 +3,7 @@
<gresource prefix="/org/gnome/sysprof"> <gresource prefix="/org/gnome/sysprof">
<file compressed="true">css/SysprofEnvironEditor-shared.css</file> <file compressed="true">css/SysprofEnvironEditor-shared.css</file>
<file compressed="true">css/SysprofDisplay-shared.css</file> <file compressed="true">css/SysprofDisplay-shared.css</file>
<file compressed="true">css/SysprofProfilerAssistant-shared.css</file>
<!-- Application icons --> <!-- Application icons -->
<file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/org.gnome.Sysprof.svg</file> <file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/org.gnome.Sysprof.svg</file>

View File

@ -11,15 +11,15 @@
<property name="halign">center</property> <property name="halign">center</property>
<property name="child"> <property name="child">
<object class="GtkImage" id="image"> <object class="GtkImage" id="image">
<property name="pixel_size">48</property> <property name="pixel-size">48</property>
<property name="width-request">64</property> <property name="width-request">64</property>
<property name="icon_name">org.gnome.Sysprof-symbolic</property> <property name="icon-name">org.gnome.Sysprof-symbolic</property>
</object> </object>
</property> </property>
<child type="overlay"> <child type="overlay">
<object class="GtkImage" id="check"> <object class="GtkImage" id="check">
<property name="pixel_size">16</property> <property name="pixel-size">14</property>
<property name="icon_name">object-select-symbolic</property> <property name="icon-name">object-select-symbolic</property>
<property name="halign">end</property> <property name="halign">end</property>
<property name="valign">start</property> <property name="valign">start</property>
</object> </object>
@ -28,11 +28,11 @@
</child> </child>
<child> <child>
<object class="GtkLabel" id="label"> <object class="GtkLabel" id="label">
<property name="use_underline">1</property> <property name="use-underline">1</property>
<property name="justify">center</property> <property name="justify">center</property>
<property name="wrap">1</property> <property name="wrap">1</property>
<property name="mnemonic_widget">SysprofAidIcon</property> <property name="mnemonic-widget">SysprofAidIcon</property>
<property name="max_width_chars">12</property> <property name="max-width-chars">12</property>
</object> </object>
</child> </child>
</object> </object>

View File

@ -33,6 +33,7 @@
#include "sysprof-model-filter.h" #include "sysprof-model-filter.h"
#include "sysprof-profiler-assistant.h" #include "sysprof-profiler-assistant.h"
#include "sysprof-process-model-row.h" #include "sysprof-process-model-row.h"
#include "sysprof-theme-manager.h"
#include "sysprof-ui-private.h" #include "sysprof-ui-private.h"
#include "sysprof-battery-aid.h" #include "sysprof-battery-aid.h"
@ -399,6 +400,11 @@ sysprof_profiler_assistant_class_init (SysprofProfilerAssistantClass *klass)
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, inherit_switch); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, inherit_switch);
gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, search_entry); gtk_widget_class_bind_template_child (widget_class, SysprofProfilerAssistant, search_entry);
sysprof_theme_manager_register_resource (sysprof_theme_manager_get_default (),
NULL,
NULL,
"/org/gnome/sysprof/css/SysprofProfilerAssistant-shared.css");
g_type_ensure (SYSPROF_TYPE_AID_ICON); g_type_ensure (SYSPROF_TYPE_AID_ICON);
g_type_ensure (SYSPROF_TYPE_BATTERY_AID); g_type_ensure (SYSPROF_TYPE_BATTERY_AID);
g_type_ensure (SYSPROF_TYPE_CALLGRAPH_AID); g_type_ensure (SYSPROF_TYPE_CALLGRAPH_AID);