st: Don't mix declarations and code
This commit is contained in:
parent
a025b151ef
commit
627a393ed6
@ -1298,15 +1298,15 @@ st_theme_node_load_border_image (StThemeNode *node)
|
|||||||
if (node->border_slices_texture == COGL_INVALID_HANDLE)
|
if (node->border_slices_texture == COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
StBorderImage *border_image;
|
StBorderImage *border_image;
|
||||||
|
GFile *file;
|
||||||
|
int scale_factor;
|
||||||
|
|
||||||
border_image = st_theme_node_get_border_image (node);
|
border_image = st_theme_node_get_border_image (node);
|
||||||
if (border_image == NULL)
|
if (border_image == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
GFile *file;
|
|
||||||
file = st_border_image_get_file (border_image);
|
file = st_border_image_get_file (border_image);
|
||||||
|
|
||||||
int scale_factor;
|
|
||||||
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
|
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
|
||||||
|
|
||||||
node->border_slices_texture = st_texture_cache_load_file_to_cogl_texture (st_texture_cache_get_default (),
|
node->border_slices_texture = st_texture_cache_load_file_to_cogl_texture (st_texture_cache_get_default (),
|
||||||
@ -1350,12 +1350,12 @@ st_theme_node_load_background_image (StThemeNode *node)
|
|||||||
{
|
{
|
||||||
GFile *background_image;
|
GFile *background_image;
|
||||||
StShadow *background_image_shadow_spec;
|
StShadow *background_image_shadow_spec;
|
||||||
|
int scale_factor;
|
||||||
|
|
||||||
background_image = st_theme_node_get_background_image (node);
|
background_image = st_theme_node_get_background_image (node);
|
||||||
if (background_image == NULL)
|
if (background_image == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
int scale_factor;
|
|
||||||
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
|
g_object_get (node->context, "scale-factor", &scale_factor, NULL);
|
||||||
|
|
||||||
background_image_shadow_spec = st_theme_node_get_background_image_shadow (node);
|
background_image_shadow_spec = st_theme_node_get_background_image_shadow (node);
|
||||||
|
@ -107,8 +107,10 @@ assert_foreground_color (StThemeNode *node,
|
|||||||
guint32 expected)
|
guint32 expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
ClutterColor color;
|
||||||
|
guint32 value;
|
||||||
|
|
||||||
st_theme_node_get_foreground_color (node, &color);
|
st_theme_node_get_foreground_color (node, &color);
|
||||||
guint32 value = clutter_color_to_pixel (&color);
|
value = clutter_color_to_pixel (&color);
|
||||||
|
|
||||||
if (expected != value)
|
if (expected != value)
|
||||||
{
|
{
|
||||||
@ -124,8 +126,10 @@ assert_background_color (StThemeNode *node,
|
|||||||
guint32 expected)
|
guint32 expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
ClutterColor color;
|
||||||
|
guint32 value;
|
||||||
|
|
||||||
st_theme_node_get_background_color (node, &color);
|
st_theme_node_get_background_color (node, &color);
|
||||||
guint32 value = clutter_color_to_pixel (&color);
|
value = clutter_color_to_pixel (&color);
|
||||||
|
|
||||||
if (expected != value)
|
if (expected != value)
|
||||||
{
|
{
|
||||||
@ -160,8 +164,10 @@ assert_border_color (StThemeNode *node,
|
|||||||
guint32 expected)
|
guint32 expected)
|
||||||
{
|
{
|
||||||
ClutterColor color;
|
ClutterColor color;
|
||||||
|
guint32 value;
|
||||||
|
|
||||||
st_theme_node_get_border_color (node, side, &color);
|
st_theme_node_get_border_color (node, side, &color);
|
||||||
guint32 value = clutter_color_to_pixel (&color);
|
value = clutter_color_to_pixel (&color);
|
||||||
|
|
||||||
if (expected != value)
|
if (expected != value)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user