[sysprof] css: fix object select image styling for profiler assistant
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] css: fix object select image styling for profiler assistant
- Date: Fri, 22 Jul 2022 20:31:48 +0000 (UTC)
commit feccf5fbebe535a5cb0332d25cd27bdbd981a3be
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 22 13:30:43 2022 -0700
css: fix object select image styling for profiler assistant
Fixes #79
src/libsysprof-ui/css/SysprofProfilerAssistant-shared.css | 7 +++++++
src/libsysprof-ui/libsysprof-ui.gresource.xml | 1 +
src/libsysprof-ui/sysprof-aid-icon.ui | 14 +++++++-------
src/libsysprof-ui/sysprof-profiler-assistant.c | 6 ++++++
4 files changed, 21 insertions(+), 7 deletions(-)
---
diff --git a/src/libsysprof-ui/css/SysprofProfilerAssistant-shared.css
b/src/libsysprof-ui/css/SysprofProfilerAssistant-shared.css
new file mode 100644
index 00000000..f0acc7e4
--- /dev/null
+++ b/src/libsysprof-ui/css/SysprofProfilerAssistant-shared.css
@@ -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;
+}
diff --git a/src/libsysprof-ui/libsysprof-ui.gresource.xml b/src/libsysprof-ui/libsysprof-ui.gresource.xml
index c9a7cb64..e5aa0593 100644
--- a/src/libsysprof-ui/libsysprof-ui.gresource.xml
+++ b/src/libsysprof-ui/libsysprof-ui.gresource.xml
@@ -3,6 +3,7 @@
<gresource prefix="/org/gnome/sysprof">
<file compressed="true">css/SysprofEnvironEditor-shared.css</file>
<file compressed="true">css/SysprofDisplay-shared.css</file>
+ <file compressed="true">css/SysprofProfilerAssistant-shared.css</file>
<!-- Application icons -->
<file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/org.gnome.Sysprof.svg</file>
diff --git a/src/libsysprof-ui/sysprof-aid-icon.ui b/src/libsysprof-ui/sysprof-aid-icon.ui
index 9c99f675..491cb405 100644
--- a/src/libsysprof-ui/sysprof-aid-icon.ui
+++ b/src/libsysprof-ui/sysprof-aid-icon.ui
@@ -11,15 +11,15 @@
<property name="halign">center</property>
<property name="child">
<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="icon_name">org.gnome.Sysprof-symbolic</property>
+ <property name="icon-name">org.gnome.Sysprof-symbolic</property>
</object>
</property>
<child type="overlay">
<object class="GtkImage" id="check">
- <property name="pixel_size">16</property>
- <property name="icon_name">object-select-symbolic</property>
+ <property name="pixel-size">14</property>
+ <property name="icon-name">object-select-symbolic</property>
<property name="halign">end</property>
<property name="valign">start</property>
</object>
@@ -28,11 +28,11 @@
</child>
<child>
<object class="GtkLabel" id="label">
- <property name="use_underline">1</property>
+ <property name="use-underline">1</property>
<property name="justify">center</property>
<property name="wrap">1</property>
- <property name="mnemonic_widget">SysprofAidIcon</property>
- <property name="max_width_chars">12</property>
+ <property name="mnemonic-widget">SysprofAidIcon</property>
+ <property name="max-width-chars">12</property>
</object>
</child>
</object>
diff --git a/src/libsysprof-ui/sysprof-profiler-assistant.c b/src/libsysprof-ui/sysprof-profiler-assistant.c
index 578c0d8a..e6721e3b 100644
--- a/src/libsysprof-ui/sysprof-profiler-assistant.c
+++ b/src/libsysprof-ui/sysprof-profiler-assistant.c
@@ -33,6 +33,7 @@
#include "sysprof-model-filter.h"
#include "sysprof-profiler-assistant.h"
#include "sysprof-process-model-row.h"
+#include "sysprof-theme-manager.h"
#include "sysprof-ui-private.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, 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_BATTERY_AID);
g_type_ensure (SYSPROF_TYPE_CALLGRAPH_AID);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]