]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/tbarsmpl.cpp
compilation fix for non-threaded compilation (threads are still broken
[wxWidgets.git] / src / generic / tbarsmpl.cpp
index d439947bb5338763116973dc120ef756292fb344..88f45ba452d6178bd917134e7c7c3b0a6a18096a 100644 (file)
@@ -303,8 +303,8 @@ bool wxToolBarSimple::Realize()
                     m_lastX = m_xMargin;
                     m_lastY += maxToolHeight + m_toolPacking;
                 }
-                tool->m_x = (m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
-                tool->m_y = (m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
+                tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
+                tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
 
                 m_lastX += maxToolWidth + m_toolPacking;
             }
@@ -316,8 +316,8 @@ bool wxToolBarSimple::Realize()
                     m_lastX += (maxToolWidth + m_toolPacking);
                     m_lastY = m_yMargin;
                 }
-                tool->m_x = (m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
-                tool->m_y = (m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
+                tool->m_x = (wxCoord)(m_lastX + (maxToolWidth - tool->GetWidth())/2.0);
+                tool->m_y = (wxCoord)(m_lastY + (maxToolHeight - tool->GetHeight())/2.0);
 
                 m_lastY += maxToolHeight + m_toolPacking;
             }