moved defines to the header file and changed to 640x400 which is actually

2008-03-21  Sven Neumann  <sven@gimp.org>

	* app/core/gimptemplate.[ch]: moved defines to the header file 
and
	changed to 640x400 which is actually almost the golden mean as
	claimed by the comment.

	* app/display/gimpdisplayshell.c: use the defines here.


svn path=/trunk/; revision=25165
This commit is contained in:
Sven Neumann 2008-03-21 22:09:23 +00:00 committed by Sven Neumann
parent aad791a930
commit 15c7937fc3
4 changed files with 28 additions and 21 deletions

View File

@ -1,3 +1,11 @@
2008-03-21 Sven Neumann <sven@gimp.org>
* app/core/gimptemplate.[ch]: moved defines to the header file and
changed to 640x400 which is actually almost the golden mean as
claimed by the comment.
* app/display/gimpdisplayshell.c: use the defines here.
2008-03-21 Sven Neumann <sven@gimp.org>
* app/core/gimptemplate.c: increased the size of the default image

View File

@ -40,19 +40,6 @@
#include "gimp-intl.h"
/* The default image aspect ratio is the golden mean. We use
* two adjacent fibonacci numbers for the unstable series and
* some less odd values for the stable version.
*/
#ifdef GIMP_UNSTABLE
#define DEFAULT_IMAGE_WIDTH 610
#define DEFAULT_IMAGE_HEIGHT 377
#else
#define DEFAULT_IMAGE_WIDTH 600
#define DEFAULT_IMAGE_HEIGHT 480
#endif
#define DEFAULT_RESOLUTION 72.0
@ -108,12 +95,12 @@ gimp_template_class_init (GimpTemplateClass *klass)
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_WIDTH, "width",
NULL,
GIMP_MIN_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE,
DEFAULT_IMAGE_WIDTH,
GIMP_DEFAULT_IMAGE_WIDTH,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_INT (object_class, PROP_HEIGHT, "height",
NULL,
GIMP_MIN_IMAGE_SIZE, GIMP_MAX_IMAGE_SIZE,
DEFAULT_IMAGE_HEIGHT,
GIMP_DEFAULT_IMAGE_HEIGHT,
GIMP_PARAM_STATIC_STRINGS);
GIMP_CONFIG_INSTALL_PROP_UNIT (object_class, PROP_UNIT, "unit",
N_("The unit used for coordinate display "

View File

@ -26,6 +26,20 @@
#include "gimpviewable.h"
/* The default image aspect ratio is the golden mean. We use
* two adjacent fibonacci numbers for the unstable series and
* some less odd values for the stable version.
*/
#ifdef GIMP_UNSTABLE
#define GIMP_DEFAULT_IMAGE_WIDTH 610
#define GIMP_DEFAULT_IMAGE_HEIGHT 377
#else
#define GIMP_DEFAULT_IMAGE_WIDTH 640
#define GIMP_DEFAULT_IMAGE_HEIGHT 400
#endif
#define GIMP_TYPE_TEMPLATE (gimp_template_get_type ())
#define GIMP_TEMPLATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_TEMPLATE, GimpTemplate))
#define GIMP_TEMPLATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_TEMPLATE, GimpTemplateClass))

View File

@ -45,6 +45,7 @@
#include "core/gimpprojection.h"
#include "core/gimpmarshal.h"
#include "core/gimpsamplepoint.h"
#include "core/gimptemplate.h"
#include "widgets/gimphelp-ids.h"
#include "widgets/gimpmenufactory.h"
@ -668,10 +669,7 @@ gimp_display_shell_new (GimpDisplay *display,
/* the toplevel shell */
shell = g_object_new (GIMP_TYPE_DISPLAY_SHELL,
"window-position", (display->image ?
GTK_WIN_POS_MOUSE :
GTK_WIN_POS_CENTER),
"unit", unit,
"unit", unit,
NULL);
shell->display = display;
@ -683,8 +681,8 @@ gimp_display_shell_new (GimpDisplay *display,
}
else
{
image_width = 640;
image_height = 480;
image_width = GIMP_DEFAULT_IMAGE_WIDTH;
image_height = GIMP_DEFAULT_IMAGE_HEIGHT;
}
shell->dot_for_dot = shell->display->config->default_dot_for_dot;