summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-05-23 13:12:50 -0400
committerCosimo Cecchi <cosimoc@gnome.org>2013-03-04 14:34:26 -0500
commit55e0cb83eb1a39ab9d858b37a12b2d91aa8b6886 (patch)
tree6ade8cdda2ec417442cfa31de0914b8c78d344ca /src
parent7a2c0bd17077da25da5adfcd469db3dbe571a07a (diff)
downloadtotem-55e0cb83eb1a39ab9d858b37a12b2d91aa8b6886.tar.gz
osd-window: only offset for the level bar if it's shown
When drawing custom OSD actions, only offset the icon for the level bar height if it's actually drawn. https://bugzilla.gnome.org/show_bug.cgi?id=676657
Diffstat (limited to 'src')
-rw-r--r--src/backend/gsd-osd-window.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/gsd-osd-window.c b/src/backend/gsd-osd-window.c
index f6593b5b0..5e1edc607 100644
--- a/src/backend/gsd-osd-window.c
+++ b/src/backend/gsd-osd-window.c
@@ -683,9 +683,15 @@ draw_action_custom (GsdOsdDrawContext *ctx,
bright_box_height = round (window_height * 0.05);
icon_box_x0 = round ((window_width - icon_box_width) / 2);
- icon_box_y0 = round ((window_height - icon_box_height - bright_box_height) / 2 - bright_box_height);
- bright_box_x0 = round (icon_box_x0);
- bright_box_y0 = round (icon_box_height + icon_box_y0) + bright_box_height;
+ if (ctx->show_level != FALSE) {
+ icon_box_y0 = round ((window_height - icon_box_height - bright_box_height) / 2 - bright_box_height);
+ bright_box_x0 = round (icon_box_x0);
+ bright_box_y0 = round (icon_box_height + icon_box_y0) + bright_box_height;
+ } else {
+ icon_box_y0 = round ((window_height - icon_box_height) / 2);
+ bright_box_x0 = 0;
+ bright_box_y0 = 0;
+ }
#if 0
g_message ("icon box: w=%f h=%f _x0=%f _y0=%f",