diff --git a/src/st/st-theme-context.c b/src/st/st-theme-context.c index cf6893492..eb24212e1 100644 --- a/src/st/st-theme-context.c +++ b/src/st/st-theme-context.c @@ -99,18 +99,6 @@ static void st_theme_context_get_property (GObject *object, GValue *value, GParamSpec *pspec); -static void -st_theme_context_set_scale_factor (StThemeContext *context, - int scale_factor) -{ - if (scale_factor == context->scale_factor) - return; - - context->scale_factor = scale_factor; - g_object_notify_by_pspec (G_OBJECT (context), props[PROP_SCALE_FACTOR]); - st_theme_context_changed (context); -} - static void st_theme_context_finalize (GObject *object) @@ -578,6 +566,27 @@ st_theme_context_get_scale_factor (StThemeContext *context) return context->scale_factor; } +/** + * st_theme_context_set_scale_factor: + * @context: a #StThemeContext + * @factor: the new factor + * + * Set the new scale factor of @context. + */ +void +st_theme_context_set_scale_factor (StThemeContext *context, + int scale_factor) +{ + g_return_if_fail (ST_IS_THEME_CONTEXT (context)); + + if (scale_factor == context->scale_factor) + return; + + context->scale_factor = scale_factor; + g_object_notify_by_pspec (G_OBJECT (context), props[PROP_SCALE_FACTOR]); + st_theme_context_changed (context); +} + /** * st_theme_context_get_resolution: * @context: a #StThemeContext diff --git a/src/st/st-theme-context.h b/src/st/st-theme-context.h index d7ccdff01..69245c0c3 100644 --- a/src/st/st-theme-context.h +++ b/src/st/st-theme-context.h @@ -62,6 +62,8 @@ StThemeNode * st_theme_context_intern_node (StThemeContext StThemeNode *node); int st_theme_context_get_scale_factor (StThemeContext *context); +void st_theme_context_set_scale_factor (StThemeContext *context, + int factor); double st_theme_context_get_resolution (StThemeContext *context);