summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmate-panel-applet/mate-panel-applet.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libmate-panel-applet/mate-panel-applet.c b/libmate-panel-applet/mate-panel-applet.c
index da800862..3bbaab82 100644
--- a/libmate-panel-applet/mate-panel-applet.c
+++ b/libmate-panel-applet/mate-panel-applet.c
@@ -1535,6 +1535,8 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
GdkRGBA* color,
cairo_pattern_t *pattern)
{
+ GtkStyleContext* context;
+ MatePanelAppletOrient orientation;
GdkWindow* window = gtk_widget_get_window (applet->priv->plug);
gtk_widget_set_app_paintable(GTK_WIDGET(applet),TRUE);
_mate_panel_applet_apply_css(GTK_WIDGET(applet->priv->plug),type);
@@ -1555,6 +1557,15 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
g_assert_not_reached ();
break;
}
+ context = gtk_widget_get_style_context (GTK_WIDGET(applet->priv->plug));
+ orientation = mate_panel_applet_get_orient (applet);
+ if (applet->priv->orient == MATE_PANEL_APPLET_ORIENT_UP ||
+ applet->priv->orient == MATE_PANEL_APPLET_ORIENT_DOWN){
+ gtk_style_context_add_class(context,"horizontal");
+ }
+ else {
+ gtk_style_context_add_class(context,"vertical");
+ }
}
#else
static void
@@ -1563,6 +1574,8 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
GdkRGBA* color,
cairo_pattern_t *pattern)
{
+ GtkStyleContext* context;
+ MatePanelAppletOrient orientation;
GdkWindow* window = gtk_widget_get_window(GTK_WIDGET(applet));
gtk_widget_set_app_paintable(GTK_WIDGET(applet),TRUE);
_mate_panel_applet_apply_css(GTK_WIDGET(applet->priv->plug),type);
@@ -1580,6 +1593,15 @@ mate_panel_applet_change_background(MatePanelApplet *applet,
g_assert_not_reached ();
break;
}
+ context = gtk_widget_get_style_context (GTK_WIDGET(applet->priv->plug));
+ orientation = mate_panel_applet_get_orient (applet);
+ if (applet->priv->orient == MATE_PANEL_APPLET_ORIENT_UP ||
+ applet->priv->orient == MATE_PANEL_APPLET_ORIENT_DOWN){
+ gtk_style_context_add_class(context,"horizontal");
+ }
+ else {
+ gtk_style_context_add_class(context,"vertical");
+ }
}
#endif