[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54945] trunk/blender/source/blender/ editors: UI/DPI: user preferences window size now takes into account DPI, otherwise the
Brecht Van Lommel
brechtvanlommel at pandora.be
Thu Feb 28 17:37:20 CET 2013
Revision: 54945
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54945
Author: blendix
Date: 2013-02-28 16:37:19 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
UI/DPI: user preferences window size now takes into account DPI, otherwise the
buttons don't fit properly.
Modified Paths:
--------------
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/screen/screen_ops.c
Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h 2013-02-28 16:37:18 UTC (rev 54944)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2013-02-28 16:37:19 UTC (rev 54945)
@@ -183,6 +183,7 @@
/* scale fixed button widths by this to account for DPI */
#define UI_DPI_FAC ((U.pixelsize * (float)U.dpi) / 72.0f)
+#define UI_DPI_WINDOW_FAC (((float)U.dpi) / 72.0f)
/* 16 to copy ICON_DEFAULT_HEIGHT */
#define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_FAC)
Modified: trunk/blender/source/blender/editors/screen/screen_ops.c
===================================================================
--- trunk/blender/source/blender/editors/screen/screen_ops.c 2013-02-28 16:37:18 UTC (rev 54944)
+++ trunk/blender/source/blender/editors/screen/screen_ops.c 2013-02-28 16:37:19 UTC (rev 54945)
@@ -3427,8 +3427,8 @@
rcti rect;
int sizex, sizey;
- sizex = 800;
- sizey = 480;
+ sizex = 800 * UI_DPI_WINDOW_FAC;
+ sizey = 480 * UI_DPI_WINDOW_FAC;
/* some magic to calculate postition */
/* pixelsize: mouse coords are in U.pixelsize units :/ */
@@ -3447,8 +3447,8 @@
static void SCREEN_OT_userpref_show(struct wmOperatorType *ot)
{
/* identifiers */
- ot->name = "Show/Hide User Preferences";
- ot->description = "Show/hide user preferences";
+ ot->name = "Show User Preferences";
+ ot->description = "Show user preferences";
ot->idname = "SCREEN_OT_userpref_show";
/* api callbacks */
More information about the Bf-blender-cvs
mailing list