~manuel-nicetto/unity/bug-735008

« back to all changes in this revision

Viewing changes to src/PanelStyle.cpp

  • Committer: Manuel Nicetto
  • Date: 2011-05-26 22:35:02 UTC
  • Revision ID: manuel.nicetto@gmail.com-20110526223502-rtv37nop8nhsoaqm
Fixed for all light themes. Fixed code identation. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
203
203
}
204
204
 
205
205
bool
206
 
PanelStyle::IsRadiance() {
207
 
  return g_strcmp0 (_theme_name, "Radiance") == 0;
 
206
PanelStyle::IsLight() {
 
207
  /*
 
208
   * Check the luminance to see if it is a light theme
 
209
   */
 
210
  float L;
 
211
  L = 0.30 * _bg_bottom.red + 0.59 * _bg_bottom.green + 0.11 * _bg_bottom.blue;
 
212
  return L>0.5;
208
213
}
209
214
 
210
215
nux::BaseTexture *