Advertisement
Guest User

Untitled

a guest
Jul 26th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. diff --git a/src/oxygenstyle.cpp b/src/oxygenstyle.cpp
  2. index e5d40d3..acc83d3 100644
  3. --- a/src/oxygenstyle.cpp
  4. +++ b/src/oxygenstyle.cpp
  5. @@ -505,7 +505,7 @@ namespace Oxygen
  6. bool Style::renderMenuBackground( GdkWindow* window, Cairo::Context& context, gint x, gint y, gint w, gint h, const StyleOptions& options ) const
  7. {
  8. // define colors
  9. - ColorUtils::Rgba base(settings().palette().color( Palette::Window ) );
  10. + ColorUtils::Rgba base( color( Palette::Window, options ) );
  11. ColorUtils::Rgba top( ColorUtils::backgroundTopColor( base ) );
  12. ColorUtils::Rgba bottom( ColorUtils::backgroundBottomColor( base ) );
  13.  
  14. diff --git a/src/oxygenstylewrapper.cpp b/src/oxygenstylewrapper.cpp
  15. index c06d35a..f6bf52c 100644
  16. --- a/src/oxygenstylewrapper.cpp
  17. +++ b/src/oxygenstylewrapper.cpp
  18. @@ -736,6 +736,7 @@ namespace Oxygen
  19. // Don't draw anything for OpenOffice or steppers will look like slabs.
  20. if( d.isStepper() && Style::instance().settings().applicationName().isOpenOffice( widget ))
  21. { return; }
  22. +
  23. // Don't render window bg here because it's redundant and leads to problems with bg gradient behind buttons
  24. if( GTK_IS_WINDOW(widget) && Style::instance().settings().applicationName().isOpenOffice( widget ))
  25. { return; }
  26. @@ -1131,8 +1132,13 @@ namespace Oxygen
  27. !Gtk::gtk_widget_is_applet( widget ) )
  28. {
  29.  
  30. + StyleOptions options;
  31. +
  32. + if( style )
  33. + { options._customColors.insert( Palette::Window, Gtk::gdk_get_color( style->bg[state] ) ); }
  34. +
  35. // window background
  36. - Style::instance().renderWindowBackground( window, clipRect, x, y, w, h );
  37. + Style::instance().renderWindowBackground( window, clipRect, x, y, w, h, options );
  38.  
  39. // possible groupbox background
  40. if( Gtk::gtk_parent_groupbox( widget ) )
  41. @@ -1235,6 +1241,9 @@ namespace Oxygen
  42. options |= Round;
  43. if( Gtk::gtk_widget_has_rgba( widget ) ) options |= Alpha;
  44.  
  45. + if( style )
  46. + { options._customColors.insert( Palette::Window, Gtk::gdk_get_color( style->bg[state] ) ); }
  47. +
  48. // add mask if needed
  49. if( GTK_IS_MENU(widget) )
  50. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement