~ubuntu-branches/ubuntu/natty/gtk2-engines/natty

« back to all changes in this revision

Viewing changes to engines/clearlooks/src/clearlooks_style.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2010-03-30 10:38:46 UTC
  • mfrom: (1.1.53 upstream)
  • Revision ID: james.westby@ubuntu.com-20100330103846-alvlr49w856laidr
Tags: 1:2.20.0-0ubuntu1
* New upstream version:
  - Increased spacing between icons and labels in Clearlooks
  - gtk-engines: system-lua check is buggy

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
                                                              widget, &column_index, &columns,
550
550
                                                              &resizable);
551
551
                }
 
552
#ifndef GTK_DISABLE_DEPRECATED
552
553
                else if (GE_IS_CLIST (widget->parent))
553
554
                {
554
555
                        clearlooks_clist_get_header_index (GTK_CLIST(widget->parent),
555
556
                                                           widget, &column_index, &columns);
556
557
                }
 
558
#endif
557
559
 
558
560
                header.resizable = resizable;
559
561
 
579
581
        {
580
582
        
581
583
                WidgetParameters params;
582
 
                ShadowParameters shadow = { CR_CORNER_ALL, CL_SHADOW_NONE } ;
583
584
                clearlooks_set_widget_parameters (widget, style, state_type, &params);
584
585
                params.active = shadow_type == GTK_SHADOW_IN;
585
586
 
590
591
                        else
591
592
                                params.corners = CR_CORNER_TOPLEFT | CR_CORNER_BOTTOMLEFT;
592
593
 
593
 
                        shadow.shadow = CL_SHADOW_IN;
594
 
 
595
594
                        if (params.xthickness > 2)
596
595
                        {
597
596
                                if (params.ltr)
606
605
                                params.enable_shadow = TRUE;
607
606
                }
608
607
 
609
 
                STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, &params,
610
 
                                             x, y, width, height);
 
608
                if (shadow_type != GTK_SHADOW_ETCHED_IN)
 
609
                {
 
610
                        STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, &params,
 
611
                                                     x, y, width, height);
 
612
                }
 
613
                else
 
614
                {
 
615
                        g_print ("ETCHED IN\n");
 
616
                        cairo_save (cr);
 
617
                        cairo_move_to (cr, x, y);
 
618
                        cairo_line_to (cr, x + width, y);
 
619
                        cairo_line_to (cr, x, y + height);
 
620
                        cairo_close_path (cr);
 
621
                        cairo_clip (cr);
 
622
                        params.active = TRUE;
 
623
                        params.state_type = GTK_STATE_ACTIVE;
 
624
                        STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, &params,
 
625
                                                     x, y, width, height);
 
626
                        cairo_restore (cr);
 
627
 
 
628
                        cairo_save (cr);
 
629
                        cairo_move_to (cr, x + width, y);
 
630
                        cairo_line_to (cr, x + width, y + height);
 
631
                        cairo_line_to (cr, x, y + height);
 
632
                        cairo_close_path (cr);
 
633
                        cairo_clip (cr);
 
634
                        params.active = FALSE;
 
635
                        params.state_type = GTK_STATE_NORMAL;
 
636
                        STYLE_FUNCTION(draw_button) (cr, &clearlooks_style->colors, &params,
 
637
                                                     x, y, width, height);
 
638
                        cairo_restore (cr);
 
639
                }
611
640
        }
612
641
        else if (DETAIL ("spinbutton_up") || DETAIL ("spinbutton_down"))
613
642
        {
778
807
                ProgressBarParameters progressbar;
779
808
                gdouble               elapsed = 0.0;
780
809
 
781
 
#ifdef HAVE_ANIMATION
 
810
#ifdef HAVE_WORKING_ANIMATION
782
811
                if(clearlooks_style->animation && CL_IS_PROGRESS_BAR (widget))
783
812
                {
784
813
                        gboolean activity_mode = GTK_PROGRESS (widget)->activity_mode;
796
825
                {
797
826
                        progressbar.orientation = gtk_progress_bar_get_orientation (GTK_PROGRESS_BAR (widget));
798
827
                        progressbar.value = gtk_progress_bar_get_fraction(GTK_PROGRESS_BAR(widget));
 
828
#ifndef GTK_DISABLE_DEPRECATED
799
829
                        progressbar.pulsing = GTK_PROGRESS (widget)->activity_mode;
 
830
#else
 
831
#warning Assuming non-pulsing progress bars because GTK_DISABLE_DEPRECATED is enabled.
 
832
                        progressbar.pulsing = FALSE;
 
833
#endif
800
834
                }
801
835
                else
802
836
                {