[gnome-disk-utility/udisks2-port] Use border size instead of hard-coding one pixel
- From: David Zeuthen <davidz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-disk-utility/udisks2-port] Use border size instead of hard-coding one pixel
- Date: Mon, 28 Nov 2011 18:14:36 +0000 (UTC)
commit 72ab3c1b95ad02f98320be1c514742f9fe6b0819
Author: David Zeuthen <davidz redhat com>
Date: Mon Nov 28 13:14:17 2011 -0500
Use border size instead of hard-coding one pixel
Signed-off-by: David Zeuthen <davidz redhat com>
src/palimpsest/gduvolumegrid.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/palimpsest/gduvolumegrid.c b/src/palimpsest/gduvolumegrid.c
index d1cd9eb..7c089b4 100644
--- a/src/palimpsest/gduvolumegrid.c
+++ b/src/palimpsest/gduvolumegrid.c
@@ -778,6 +778,7 @@ render_element (GduVolumeGrid *grid,
GtkStyleContext *context;
GtkStateFlags state;
GtkJunctionSides sides;
+ GtkBorder border;
animate_spinner = FALSE;
@@ -808,6 +809,7 @@ render_element (GduVolumeGrid *grid,
gtk_style_context_save (context);
gtk_style_context_add_class (context, GTK_STYLE_CLASS_NOTEBOOK);
gtk_style_context_add_class (context, "gnome-disk-utility-grid");
+ gtk_style_context_get_border (context, state, &border);
sides = GTK_JUNCTION_NONE;
if (!(element->edge_flags & GRID_EDGE_TOP))
{
@@ -816,7 +818,7 @@ render_element (GduVolumeGrid *grid,
if (!(element->edge_flags & GRID_EDGE_BOTTOM))
{
sides |= GTK_JUNCTION_BOTTOM;
- h += 1.0;
+ h += border.bottom;
}
if (!(element->edge_flags & GRID_EDGE_LEFT))
{
@@ -825,7 +827,7 @@ render_element (GduVolumeGrid *grid,
if (!(element->edge_flags & GRID_EDGE_RIGHT))
{
sides |= GTK_JUNCTION_RIGHT;
- w += 1.0;
+ w += border.right;
}
gtk_style_context_set_junction_sides (context, sides);
gtk_render_background (context, cr, x, y, w, h);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]