~aacid/overlay-scrollbar/blacklisted_libs

« back to all changes in this revision

Viewing changes to os/os-bar.c

  • Committer: Andrea Cimitan
  • Date: 2012-03-06 13:40:06 UTC
  • Revision ID: andrea.cimitan@canonical.com-20120306134006-hkcoqpsraqzxr571
Since Gtk+ 2 has issues in redrawing the gdkwindow, always leave the bar colored with bg[SELECTED]

Show diffs side-by-side

added added

removed removed

Lines of Context:
73
73
  GdkRGBA c1, c2, color;
74
74
  GtkStyleContext *style_context;
75
75
#else
76
 
  GdkColor c1, c2, color;
 
76
  GdkColor color;
77
77
  GtkStyle *style;
78
78
#endif
79
79
  OsBarPrivate *priv;
106
106
#else
107
107
  style = gtk_widget_get_style (priv->parent);
108
108
 
109
 
  if (priv->active == FALSE)
110
 
    {
111
 
      c1 = style->bg[GTK_STATE_INSENSITIVE];
112
 
      c2 = style->bg[GTK_STATE_SELECTED];
113
 
    }
114
 
  else
115
 
    {
116
 
      c1 = style->bg[GTK_STATE_SELECTED];
117
 
      c2 = style->bg[GTK_STATE_INSENSITIVE];
118
 
    }
119
 
 
120
 
  color.red   = weight * c1.red   + (1.0 - weight) * c2.red;
121
 
  color.green = weight * c1.green + (1.0 - weight) * c2.green;
122
 
  color.blue  = weight * c1.blue  + (1.0 - weight) * c2.blue;
 
109
  color = style->bg[GTK_STATE_SELECTED];
123
110
 
124
111
  gdk_colormap_alloc_color (gdk_drawable_get_colormap (priv->bar_window), &color, FALSE, TRUE);
125
112
 
557
544
                   gboolean active,
558
545
                   gboolean animate)
559
546
{
 
547
#ifdef USE_GTK3
560
548
  OsBarPrivate *priv;
561
549
 
562
550
  g_return_if_fail (OS_IS_BAR (bar));
594
582
          draw_bar (bar);
595
583
        }
596
584
    }
 
585
#endif
597
586
}
598
587
 
599
588
/**