[totem] osd-window: only offset for the level bar if it's shown
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] osd-window: only offset for the level bar if it's shown
- Date: Mon, 4 Mar 2013 19:47:31 +0000 (UTC)
commit 55e0cb83eb1a39ab9d858b37a12b2d91aa8b6886
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed May 23 13:12:50 2012 -0400
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
src/backend/gsd-osd-window.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/backend/gsd-osd-window.c b/src/backend/gsd-osd-window.c
index f6593b5..5e1edc6 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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]