Merge pull request #317 from Mateos81/DisplaySizeInfo

DisplaySizeInfo: Lower x print + Add a space after the ':' char + Tabs instead of spaces.
This commit is contained in:
Timothee "TTimo" Besset 2015-10-03 11:58:55 -05:00
commit 6c81fef524

View file

@ -2140,8 +2140,7 @@ void XYWnd::XY_DrawGrid(){
if (stepSize > step)
{
int i;
for (i = 1; i < stepSize; i <<= 1)
;
for (i = 1; i < stepSize; i <<= 1);
step = i;
}
*/
@ -2272,8 +2271,9 @@ void XYWnd::XY_DrawGrid(){
// Pixels between left of label and
// - left of grid view window (for horizontal grid line label) or
// - drawn vertical grid line (for vertical grid line label).
const int pixelsLeftCushion = 2; // IMPORTANT! Must be at least 1 otherwise labels might not be drawn
// because the origin of the text might be off screen due to rounding.
// IMPORTANT! Must be at least 1 otherwise labels might not be drawn,
// because the origin of the text might be off screen due to rounding
const int pixelsLeftCushion = 2;
// Pixels between baseline of horizontal grid line label and drawn horizontal grid line.
const int pixelsButtomCushion = 2;
@ -2596,7 +2596,7 @@ void XYWnd::DrawZIcon( void ){
// which is not an excuse, just a fact
void XYWnd::PaintSizeInfo( int nDim1, int nDim2, vec3_t vMinBounds, vec3_t vMaxBounds ){
const char* g_pDimStrings[] = {"x: %.f", "y: %.f", "z: %.f"};
const char* g_pOrgStrings[] = {"(x:%.f y:%.f)", "(x:%.f z:%.f)", "(y:%.f z:%.f)"};
const char* g_pOrgStrings[] = {"(x: %.f, y: %.f)", "(x: %.f, z: %.f)", "(y: %.f, z: %.f)"};
CString g_strDim;
@ -2631,7 +2631,7 @@ void XYWnd::PaintSizeInfo( int nDim1, int nDim2, vec3_t vMinBounds, vec3_t vMaxB
qglEnd();
qglRasterPos3f( Betwixt( vMinBounds[nDim1], vMaxBounds[nDim1] ), vMinBounds[nDim2] - 20.0 / m_fScale, 0.0f );
qglRasterPos3f( Betwixt( vMinBounds[nDim1], vMaxBounds[nDim1] ), vMinBounds[nDim2] - 25.0 / m_fScale, 0.0f );
g_strDim.Format( g_pDimStrings[nDim1], vSize[nDim1] );
gtk_glwidget_print_string( (char *) g_strDim.GetBuffer() );