summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2021-10-26 16:56:51 +0200
committerraveit65 <[email protected]>2021-12-11 16:07:13 +0100
commitc2823eeafa140917a87fccff91dcf2967d93b393 (patch)
treea7a8f0a3e2af25b30eb91619540f2cfea7d0a289
parenteac56181202fc77155d3aa2220fc7d4fe74290b0 (diff)
downloadmate-notification-daemon-c2823eeafa140917a87fccff91dcf2967d93b393.tar.bz2
mate-notification-daemon-c2823eeafa140917a87fccff91dcf2967d93b393.tar.xz
theme: remove whitespaces before #define, #ifdef, and #endif
-rw-r--r--src/themes/standard/theme.c76
1 files changed, 37 insertions, 39 deletions
diff --git a/src/themes/standard/theme.c b/src/themes/standard/theme.c
index ad44424..968382a 100644
--- a/src/themes/standard/theme.c
+++ b/src/themes/standard/theme.c
@@ -102,9 +102,9 @@ void notification_tick(GtkWindow *nw, glong remaining);
//#define ENABLE_GRADIENT_LOOK
#ifdef ENABLE_GRADIENT_LOOK
- #define STRIPE_WIDTH 45
+#define STRIPE_WIDTH 45
#else
- #define STRIPE_WIDTH 30
+#define STRIPE_WIDTH 30
#endif
#define WIDTH 400
@@ -148,14 +148,12 @@ static void fill_background(GtkWidget* widget, WindowData* windata, cairo_t* cr)
gtk_widget_get_allocation(widget, &allocation);
- #ifdef ENABLE_GRADIENT_LOOK
-
- cairo_pattern_t *gradient;
- int gradient_y;
-
- gradient_y = allocation.height - BOTTOM_GRADIENT_HEIGHT;
+#ifdef ENABLE_GRADIENT_LOOK
+ cairo_pattern_t *gradient;
+ int gradient_y;
- #endif
+ gradient_y = allocation.height - BOTTOM_GRADIENT_HEIGHT;
+#endif
context = gtk_widget_get_style_context (windata->win);
@@ -179,17 +177,17 @@ static void fill_background(GtkWidget* widget, WindowData* windata, cairo_t* cr)
cairo_fill(cr);
- #ifdef ENABLE_GRADIENT_LOOK
- /* Add a very subtle gradient to the bottom of the notification */
- gradient = cairo_pattern_create_linear(0, gradient_y, 0, allocation.height);
- cairo_pattern_add_color_stop_rgba(gradient, 0, 0, 0, 0, 0);
- cairo_pattern_add_color_stop_rgba(gradient, 1, 0, 0, 0, 0.15);
- cairo_rectangle(cr, 0, gradient_y, allocation.width, BOTTOM_GRADIENT_HEIGHT);
-
- cairo_set_source(cr, gradient);
- cairo_fill(cr);
- cairo_pattern_destroy(gradient);
- #endif
+#ifdef ENABLE_GRADIENT_LOOK
+ /* Add a very subtle gradient to the bottom of the notification */
+ gradient = cairo_pattern_create_linear(0, gradient_y, 0, allocation.height);
+ cairo_pattern_add_color_stop_rgba(gradient, 0, 0, 0, 0, 0);
+ cairo_pattern_add_color_stop_rgba(gradient, 1, 0, 0, 0, 0.15);
+ cairo_rectangle(cr, 0, gradient_y, allocation.width, BOTTOM_GRADIENT_HEIGHT);
+
+ cairo_set_source(cr, gradient);
+ cairo_fill(cr);
+ cairo_pattern_destroy(gradient);
+#endif
}
static void draw_stripe(GtkWidget* widget, WindowData* windata, cairo_t* cr)
@@ -199,10 +197,10 @@ static void draw_stripe(GtkWidget* widget, WindowData* windata, cairo_t* cr)
int stripe_x;
int stripe_y;
int stripe_height;
- #ifdef ENABLE_GRADIENT_LOOK
- cairo_pattern_t* gradient;
- double r, g, b;
- #endif
+#ifdef ENABLE_GRADIENT_LOOK
+ cairo_pattern_t* gradient;
+ double r, g, b;
+#endif
context = gtk_widget_get_style_context (widget);
@@ -247,21 +245,21 @@ static void draw_stripe(GtkWidget* widget, WindowData* windata, cairo_t* cr)
cairo_rectangle(cr, stripe_x, stripe_y, STRIPE_WIDTH, stripe_height);
- #ifdef ENABLE_GRADIENT_LOOK
- r = color.red / 65535.0;
- g = color.green / 65535.0;
- b = color.blue / 65535.0;
-
- gradient = cairo_pattern_create_linear(stripe_x, 0, STRIPE_WIDTH, 0);
- cairo_pattern_add_color_stop_rgba(gradient, 0, r, g, b, 1);
- cairo_pattern_add_color_stop_rgba(gradient, 1, r, g, b, 0);
- cairo_set_source(cr, gradient);
- cairo_fill(cr);
- cairo_pattern_destroy(gradient);
- #else
- gdk_cairo_set_source_rgba (cr, &bg);
- cairo_fill(cr);
- #endif
+#ifdef ENABLE_GRADIENT_LOOK
+ r = color.red / 65535.0;
+ g = color.green / 65535.0;
+ b = color.blue / 65535.0;
+
+ gradient = cairo_pattern_create_linear(stripe_x, 0, STRIPE_WIDTH, 0);
+ cairo_pattern_add_color_stop_rgba(gradient, 0, r, g, b, 1);
+ cairo_pattern_add_color_stop_rgba(gradient, 1, r, g, b, 0);
+ cairo_set_source(cr, gradient);
+ cairo_fill(cr);
+ cairo_pattern_destroy(gradient);
+#else
+ gdk_cairo_set_source_rgba (cr, &bg);
+ cairo_fill(cr);
+#endif
}
static GtkArrowType get_notification_arrow_type(GtkWidget* nw)