[gnome-media] Fix bluriness in level bar
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-media] Fix bluriness in level bar
- Date: Mon, 26 Oct 2009 15:10:39 +0000 (UTC)
commit bd4f0dd0bed2551338bbb34d4e55641b4169078b
Author: Martin Sourada <martin sourada gmail com>
Date: Mon Oct 26 15:09:59 2009 +0000
Fix bluriness in level bar
By shifting the top-left coordinates by half a pixel, to match
the cairo grid.
gnome-volume-control/src/gvc-level-bar.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gnome-volume-control/src/gvc-level-bar.c b/gnome-volume-control/src/gvc-level-bar.c
index e2c02e7..647312f 100644
--- a/gnome-volume-control/src/gvc-level-bar.c
+++ b/gnome-volume-control/src/gvc-level-bar.c
@@ -566,10 +566,10 @@ gvc_level_bar_expose (GtkWidget *widget,
for (i = 0; i < NUM_BOXES; i++) {
by = i * bar->priv->layout.delta;
curved_rectangle (cr,
- bar->priv->layout.area.x,
- by,
- bar->priv->layout.box_width,
- bar->priv->layout.box_height,
+ bar->priv->layout.area.x + 0.5,
+ by + 0.5,
+ bar->priv->layout.box_width - 1,
+ bar->priv->layout.box_height - 1,
bar->priv->layout.box_radius);
if ((bar->priv->layout.max_peak_num - 1) == i) {
/* fill peak foreground */
@@ -601,10 +601,10 @@ gvc_level_bar_expose (GtkWidget *widget,
for (i = 0; i < NUM_BOXES; i++) {
bx = i * bar->priv->layout.delta;
curved_rectangle (cr,
- bx,
- bar->priv->layout.area.y,
- bar->priv->layout.box_width,
- bar->priv->layout.box_height,
+ bx + 0.5,
+ bar->priv->layout.area.y + 0.5,
+ bar->priv->layout.box_width - 1,
+ bar->priv->layout.box_height - 1,
bar->priv->layout.box_radius);
if ((bar->priv->layout.max_peak_num - 1) == i) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]