aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrea Cimitan <andrea.cimitan@canonical.com>2010-11-17 17:29:39 +0100
committerAndrea Cimitan <andrea.cimitan@canonical.com>2010-11-17 17:29:39 +0100
commit595ae6b37e22a7a4b8450caa918078308ea514e9 (patch)
treedb70d8cfa53012e9e52651891272766ca2605afc /src
parentba69a13a8b79fe1acceff439da98b6d547079a70 (diff)
downloadayatana-indicator-sound-595ae6b37e22a7a4b8450caa918078308ea514e9.tar.gz
ayatana-indicator-sound-595ae6b37e22a7a4b8450caa918078308ea514e9.tar.bz2
ayatana-indicator-sound-595ae6b37e22a7a4b8450caa918078308ea514e9.zip
Final touch
Diffstat (limited to 'src')
-rw-r--r--src/transport-widget.c34
1 files changed, 20 insertions, 14 deletions
diff --git a/src/transport-widget.c b/src/transport-widget.c
index 5618d23..28aff6f 100644
--- a/src/transport-widget.c
+++ b/src/transport-widget.c
@@ -1230,7 +1230,7 @@ draw (GtkWidget* button, cairo_t *cr)
double OUTER_START[] = {color_outer[1].r, color_outer[1].g, color_outer[1].b, 1.0f};
double OUTER_END_PRELIGHT[] = {color_outer_prelight[0].r, color_outer_prelight[0].g, color_outer_prelight[0].b, 1.0f};
double OUTER_START_PRELIGHT[] = {color_outer_prelight[1].r, color_outer_prelight[1].g, color_outer_prelight[1].b, 1.0f};
- double SHADOW_BUTTON[] = {color_button_shadow.r, color_button_shadow.g, color_button_shadow.b, 0.16f};
+ double SHADOW_BUTTON[] = {color_button_shadow.r, color_button_shadow.g, color_button_shadow.b, 0.3f};
double OUTER_PLAY_END[] = {color_play_outer[0].r, color_play_outer[0].g, color_play_outer[0].b, 1.0f};
double OUTER_PLAY_START[] = {color_play_outer[1].r, color_play_outer[1].g, color_play_outer[1].b, 1.0f};
double OUTER_PLAY_END_PRELIGHT[] = {color_play_outer_prelight[0].r, color_play_outer_prelight[0].g, color_play_outer_prelight[0].b, 1.0f};
@@ -1364,7 +1364,6 @@ draw (GtkWidget* button, cairo_t *cr)
Y,
RECT_WIDTH/2,
OUTER_RADIUS,
-
OUTER_START_PRELIGHT,
OUTER_END_PRELIGHT);
@@ -1386,15 +1385,21 @@ draw (GtkWidget* button, cairo_t *cr)
}
// play/pause shadow
-/* if(priv->current_command != TRANSPORT_PLAY_PAUSE)*/
-/* {*/
-/* draw_circle (cr,*/
-/* X + RECT_WIDTH / 2.0f - 2.0f * OUTER_RADIUS - 5.5f - 1.0f,*/
-/* Y - ((CIRCLE_RADIUS - OUTER_RADIUS)) - 1.0f,*/
-/* CIRCLE_RADIUS + 1.0f,*/
-/* SHADOW_BUTTON,*/
-/* SHADOW_BUTTON);*/
-/* }*/
+ if(priv->current_command != TRANSPORT_PLAY_PAUSE)
+ {
+ cairo_save (cr);
+ cairo_rectangle (cr, X, Y, RECT_WIDTH, MIDDLE_RADIUS*2);
+ cairo_clip (cr);
+
+ draw_circle (cr,
+ X + RECT_WIDTH / 2.0f - 2.0f * OUTER_RADIUS - 5.5f - 1.0f,
+ Y - ((CIRCLE_RADIUS - OUTER_RADIUS)) - 1.0f,
+ CIRCLE_RADIUS + 1.0f,
+ SHADOW_BUTTON,
+ SHADOW_BUTTON);
+
+ cairo_restore (cr);
+ }
// play/pause button
if(priv->current_command == TRANSPORT_PLAY_PAUSE)
@@ -1415,10 +1420,11 @@ draw (GtkWidget* button, cairo_t *cr)
}
else if (priv->motion_event == TRANSPORT_PLAY_PAUSE)
{
+ /* this subtle offset is to fix alpha borders, should be removed once this draw routine will be refactored */
draw_circle (cr,
- X + RECT_WIDTH / 2.0f - 2.0f * OUTER_RADIUS - 5.5f,
- Y - ((CIRCLE_RADIUS - OUTER_RADIUS)),
- CIRCLE_RADIUS,
+ X + RECT_WIDTH / 2.0f - 2.0f * OUTER_RADIUS - 5.5f + 0.1,
+ Y - ((CIRCLE_RADIUS - OUTER_RADIUS)) + 0.1,
+ CIRCLE_RADIUS - 0.1,
OUTER_PLAY_START_PRELIGHT,
OUTER_PLAY_END_PRELIGHT);