[metacity/cowbell] get padding/margin right way round; only element with no margin is the frame
- From: Thomas James Alexander Thurman <tthurman src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [metacity/cowbell] get padding/margin right way round; only element with no margin is the frame
- Date: Mon, 19 Oct 2009 18:47:48 +0000 (UTC)
commit 506f50b5a409699980c92c91f8f47bf196d39a18
Author: Thomas Thurman <tthurman gnome org>
Date: Mon Oct 19 14:42:44 2009 -0400
get padding/margin right way round; only element with no margin is the frame
src/ui/theme.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/src/ui/theme.c b/src/ui/theme.c
index 3d49bfa..2e7323d 100644
--- a/src/ui/theme.c
+++ b/src/ui/theme.c
@@ -606,7 +606,6 @@ cowbell_get_edge_sizes (MetaTheme *theme,
MetaFrameType type,
MetaFrameFlags flags,
CopperClasses style_id,
- gboolean ignore_padding,
int *top,
int *bottom,
int *left,
@@ -617,15 +616,16 @@ cowbell_get_edge_sizes (MetaTheme *theme,
gint i, j, start;
/* We are called far too often to mess around with string splicing */
gchar *properties[3][5] = {
- {"padding-top-width", "padding-bottom-width", "padding-left-width", "padding-right-width", "padding-width"},
- {"border-top-width", "border-bottom-width", "border-left-width", "border-right-width", "border-width"},
{"margin-top-width", "margin-bottom-width", "margin-left-width", "margin-right-width", "margin-width"},
+ {"border-top-width", "border-bottom-width", "border-left-width", "border-right-width", "border-width"},
+ {"padding-top-width", "padding-bottom-width", "padding-left-width", "padding-right-width", "padding-width"},
};
double results[4] = {0.0, 0.0, 0.0, 0.0};
double fallback = 0.0;
ccss_style_t *style = cowbell_get_current_style (theme, type, flags, style_id);
- if (ignore_padding)
+ if (style_id==CC_FRAME)
+ /* the frame has no margin */
start = 1;
else
start = 0;
@@ -685,7 +685,6 @@ meta_theme_get_frame_borders (MetaTheme *theme,
*right_width = 0;
cowbell_get_edge_sizes (theme, type, flags, CC_FRAME,
- TRUE,
top_height,
bottom_height,
left_width,
@@ -730,7 +729,6 @@ meta_theme_calc_geometry (MetaTheme *theme,
fgeom->right_width = 0;
cowbell_get_edge_sizes (theme, type, flags, CC_FRAME,
- TRUE,
&(fgeom->top_height),
&(fgeom->bottom_height),
&(fgeom->left_width),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]