[gnome-panel] libgnome-panel: add css class to GpImageMenuItem
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] libgnome-panel: add css class to GpImageMenuItem
- Date: Sun, 25 Mar 2018 11:21:42 +0000 (UTC)
commit 562e9e818217878ec578509a4c956ad9e068396b
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sun Mar 25 13:43:36 2018 +0300
libgnome-panel: add css class to GpImageMenuItem
data/theme/common.css | 26 +++++++++++++-------------
libgnome-panel/gp-image-menu-item.c | 4 ++++
2 files changed, 17 insertions(+), 13 deletions(-)
---
diff --git a/data/theme/common.css b/data/theme/common.css
index f31fb83..c170c43 100644
--- a/data/theme/common.css
+++ b/data/theme/common.css
@@ -1,32 +1,32 @@
-menuitem image {
+.gp-image-menu-item > image {
min-height: 16px;
min-width: 16px;
}
-menuitem image:dir(ltr) {
- margin-right: 7px;
+.gp-image-menu-item > image:dir(ltr) {
+ margin-right: 5px;
}
-menuitem image:dir(rtl) {
- margin-left: 7px;
+.gp-image-menu-item > image:dir(rtl) {
+ margin-left: 5px;
}
-panel-toplevel.left gp-applet > menubar > menuitem > image:dir(ltr) {
+panel-toplevel.left gp-applet > menubar > .gp-image-menu-item > image:dir(ltr) {
margin-right: 0px;
- margin-top: 7px;
+ margin-top: 5px;
}
-panel-toplevel.left gp-applet > menubar > menuitem > image:dir(rtl) {
+panel-toplevel.left gp-applet > menubar > .gp-image-menu-item > image:dir(rtl) {
margin-left: 0px;
- margin-bottom: 7px;
+ margin-bottom: 5px;
}
-panel-toplevel.right gp-applet > menubar > menuitem > image:dir(ltr) {
+panel-toplevel.right gp-applet > menubar > .gp-image-menu-item > image:dir(ltr) {
margin-right: 0px;
- margin-bottom: 7px;
+ margin-bottom: 5px;
}
-panel-toplevel.right gp-applet > menubar > menuitem > image:dir(rtl) {
+panel-toplevel.right gp-applet > menubar > .gp-image-menu-item > image:dir(rtl) {
margin-left: 0px;
- margin-top: 7px;
+ margin-top: 5px;
}
diff --git a/libgnome-panel/gp-image-menu-item.c b/libgnome-panel/gp-image-menu-item.c
index 5551337..d9080a3 100644
--- a/libgnome-panel/gp-image-menu-item.c
+++ b/libgnome-panel/gp-image-menu-item.c
@@ -331,6 +331,10 @@ gp_image_menu_item_class_init (GpImageMenuItemClass *item_class)
static void
gp_image_menu_item_init (GpImageMenuItem *item)
{
+ GtkStyleContext *context;
+
+ context = gtk_widget_get_style_context (GTK_WIDGET (item));
+ gtk_style_context_add_class (context, "gp-image-menu-item");
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]