Add get_horizontal/vertical_padding() methods
Add get_horizontal_padding() and get_vertical_padding() methods, that return the total padding (LEFT+RIGHT or TOP+BOTTOM). https://bugzilla.gnome.org/show_bug.cgi?id=597983
This commit is contained in:
parent
d128cc5af3
commit
730e8ffdf9
@ -2174,6 +2174,44 @@ st_theme_node_get_border_image (StThemeNode *node)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* st_theme_node_get_horizontal_padding:
|
||||
* @node: a #StThemeNode
|
||||
*
|
||||
* Gets the total horizonal padding (left + right padding)
|
||||
*
|
||||
* Return value: the total horizonal padding
|
||||
* in pixels
|
||||
*/
|
||||
double
|
||||
st_theme_node_get_horizontal_padding (StThemeNode *node)
|
||||
{
|
||||
double padding = 0.0;
|
||||
padding += st_theme_node_get_padding (node, ST_SIDE_LEFT);
|
||||
padding += st_theme_node_get_padding (node, ST_SIDE_RIGHT);
|
||||
|
||||
return padding;
|
||||
}
|
||||
|
||||
/**
|
||||
* st_theme_node_get_vertical_padding:
|
||||
* @node: a #StThemeNode
|
||||
*
|
||||
* Gets the total vertical padding (top + bottom padding)
|
||||
*
|
||||
* Return value: the total vertical padding
|
||||
* in pixels
|
||||
*/
|
||||
double
|
||||
st_theme_node_get_vertical_padding (StThemeNode *node)
|
||||
{
|
||||
double padding = 0.0;
|
||||
padding += st_theme_node_get_padding (node, ST_SIDE_TOP);
|
||||
padding += st_theme_node_get_padding (node, ST_SIDE_BOTTOM);
|
||||
|
||||
return padding;
|
||||
}
|
||||
|
||||
/**
|
||||
* st_theme_node_get_shadow:
|
||||
* @node: a #StThemeNode
|
||||
|
@ -129,6 +129,9 @@ void st_theme_node_get_border_color (StThemeNode *node,
|
||||
double st_theme_node_get_padding (StThemeNode *node,
|
||||
StSide side);
|
||||
|
||||
double st_theme_node_get_horizontal_padding (StThemeNode *node);
|
||||
double st_theme_node_get_vertical_padding (StThemeNode *node);
|
||||
|
||||
int st_theme_node_get_width (StThemeNode *node);
|
||||
int st_theme_node_get_height (StThemeNode *node);
|
||||
int st_theme_node_get_min_width (StThemeNode *node);
|
||||
|
Loading…
Reference in New Issue
Block a user