summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2007-05-19 19:05:47 +0000
committerDana Jansens <danakj@orodu.net>2007-05-19 19:05:47 +0000
commit4305448a62716170f042033787ddb60891f0d654 (patch)
treeda7f123b2010c092e809b4881097afa28d0952aa
parent7dd7c9973b9c576737be90d5ad8362e2b0e06aaa (diff)
better positioning and some spacing
-rw-r--r--openbox/focus_cycle_popup.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/openbox/focus_cycle_popup.c b/openbox/focus_cycle_popup.c
index 5e4d7a9c..0dbc95f0 100644
--- a/openbox/focus_cycle_popup.c
+++ b/openbox/focus_cycle_popup.c
@@ -32,6 +32,7 @@
#define ICON_SIZE 48
#define ICON_HILITE_WIDTH 2
+#define OUTSIDE_BORDER 2
typedef struct _ObFocusCyclePopup ObFocusCyclePopup;
typedef struct _ObFocusCyclePopupTarget ObFocusCyclePopupTarget;
@@ -235,10 +236,10 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
/* get the outside margins */
RrMargins(p->a_bg, &l, &t, &r, &b);
- l += ob_rr_theme->paddingx;
- r += ob_rr_theme->paddingx;
- t += ob_rr_theme->paddingy;
- b += ob_rr_theme->paddingy;
+ l += ob_rr_theme->paddingx + OUTSIDE_BORDER;
+ r += ob_rr_theme->paddingx + OUTSIDE_BORDER;
+ t += ob_rr_theme->paddingy + OUTSIDE_BORDER;
+ b += ob_rr_theme->paddingy + OUTSIDE_BORDER;
/* get the icons sizes */
iconw = ICON_SIZE - (ICON_HILITE_WIDTH + ob_rr_theme->paddingx) * 2;
@@ -262,11 +263,12 @@ static void popup_render(ObFocusCyclePopup *p, const ObClient *c)
texth = RrMinHeight(p->a_text);
/* find the height of the dialog */
- h = t + b + (icon_rows * ICON_SIZE) + (ob_rr_theme->paddingy + texth);
+ h = t + b + (icon_rows * ICON_SIZE) +
+ (ob_rr_theme->paddingy * 2 + OUTSIDE_BORDER + texth);
/* get the position of the text */
textx = l;
- texty = h - texth;
+ texty = h - texth - b;
/* find the position for the popup (include the outer borders) */
x = screen_area->x + (screen_area->width -