[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [52954] trunk/blender/source/blender/ editors: remove UI_DPI_FAC, its not needed anymore.
Campbell Barton
ideasman42 at gmail.com
Thu Dec 13 02:21:12 CET 2012
Revision: 52954
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=52954
Author: campbellbarton
Date: 2012-12-13 01:21:12 +0000 (Thu, 13 Dec 2012)
Log Message:
-----------
remove UI_DPI_FAC, its not needed anymore.
Modified Paths:
--------------
trunk/blender/source/blender/editors/include/UI_interface.h
trunk/blender/source/blender/editors/interface/interface_icons.c
trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
Modified: trunk/blender/source/blender/editors/include/UI_interface.h
===================================================================
--- trunk/blender/source/blender/editors/include/UI_interface.h 2012-12-13 01:17:22 UTC (rev 52953)
+++ trunk/blender/source/blender/editors/include/UI_interface.h 2012-12-13 01:21:12 UTC (rev 52954)
@@ -175,12 +175,11 @@
/* uiBut->drawflag */
#define UI_BUT_DRAW_ENUM_ARROWS (1 << 0) /* draw enum-like up/down arrows for button */
-/* scale fixed button widths by this to account for DPI (no difference for buttons or icons anymore */
+/* scale fixed button widths by this to account for DPI */
#define UI_DPI_FAC ((U.pixelsize * (float)U.dpi) / 72.0f)
-#define UI_DPI_ICON_FAC ((U.pixelsize * (float)U.dpi) / 72.0f)
/* 16 to copy ICON_DEFAULT_HEIGHT */
-#define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_ICON_FAC)
+#define UI_DPI_ICON_SIZE ((float)16 * UI_DPI_FAC)
/* Button types, bits stored in 1 value... and a short even!
* - bits 0-4: bitnr (0-31)
Modified: trunk/blender/source/blender/editors/interface/interface_icons.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_icons.c 2012-12-13 01:17:22 UTC (rev 52953)
+++ trunk/blender/source/blender/editors/interface/interface_icons.c 2012-12-13 01:21:12 UTC (rev 52954)
@@ -1161,7 +1161,7 @@
/* draws icon with dpi scale factor */
void UI_icon_draw(float x, float y, int icon_id)
{
- UI_icon_draw_aspect(x, y, icon_id, 1.0f / UI_DPI_ICON_FAC, 1.0f);
+ UI_icon_draw_aspect(x, y, icon_id, 1.0f / UI_DPI_FAC, 1.0f);
}
void UI_icon_draw_size(float x, float y, int size, int icon_id, float alpha)
Modified: trunk/blender/source/blender/editors/space_outliner/outliner_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_outliner/outliner_draw.c 2012-12-13 01:17:22 UTC (rev 52953)
+++ trunk/blender/source/blender/editors/space_outliner/outliner_draw.c 2012-12-13 01:21:12 UTC (rev 52954)
@@ -902,7 +902,7 @@
/* restrict column clip... it has been coded by simply overdrawing, doesnt work for buttons */
if (arg->x >= arg->xmax) {
glEnable(GL_BLEND);
- UI_icon_draw_aspect(arg->x, arg->y, icon, 1.0f / UI_DPI_ICON_FAC, arg->alpha);
+ UI_icon_draw_aspect(arg->x, arg->y, icon, 1.0f / UI_DPI_FAC, arg->alpha);
glDisable(GL_BLEND);
}
else {
Modified: trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c
===================================================================
--- trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c 2012-12-13 01:17:22 UTC (rev 52953)
+++ trunk/blender/source/blender/editors/space_view3d/view3d_buttons.c 2012-12-13 01:21:12 UTC (rev 52954)
@@ -365,7 +365,7 @@
if (block) { /* buttons */
uiBut *but;
int yi = 200;
- const int buth = 20 * UI_DPI_ICON_FAC;
+ const int buth = 20 * UI_DPI_FAC;
const int but_margin = 2;
const char *c;
More information about the Bf-blender-cvs
mailing list