cache the display scale factors in the GimpDisplayShell struct and

2007-03-14  Sven Neumann  <sven@gimp.org>

	* app/display/gimpdisplayshell.[ch]: cache the display scale
	factors in the GimpDisplayShell struct and recalculate it in
	gimp_display_shell_scale_factor_changed().

	* app/display/gimpdisplayshell-scale.c
	(gimp_display_shell_scale_set_dot_for_dot)
	* app/display/gimpdisplayshell-handlers.c
	(gimp_display_shell_resolution_changed_handler)
	(gimp_display_shell_monitor_res_notify_handler): update the scale
	factors by calling gimp_display_shell_scale_factor_changed().

	* app/display/gimpdisplayshell-transform.c
	* app/display/gimpnavigationeditor.c: code cleanup.


svn path=/trunk/; revision=22118
This commit is contained in:
Sven Neumann
2007-03-14 10:01:08 +00:00
committed by Sven Neumann
parent 7688860072
commit 74927c03a4
7 changed files with 99 additions and 91 deletions

View File

@ -416,6 +416,8 @@ static void
gimp_display_shell_resolution_changed_handler (GimpImage *image,
GimpDisplayShell *shell)
{
gimp_display_shell_scale_factor_changed (shell);
if (shell->dot_for_dot)
{
gimp_display_shell_scale_setup (shell);
@ -585,6 +587,8 @@ gimp_display_shell_monitor_res_notify_handler (GObject *config,
shell->monitor_yres = GIMP_DISPLAY_CONFIG (config)->monitor_yres;
}
gimp_display_shell_scale_factor_changed (shell);
if (! shell->dot_for_dot)
{
gimp_display_shell_scale_setup (shell);