Commit 6e1f65e5 authored by Sylvain Thery's avatar Sylvain Thery

fix lineWidth & fixed Size of window

parent dc66829a
...@@ -88,7 +88,7 @@ void ShaderBoldColorLines::setLineWidth(float pix) ...@@ -88,7 +88,7 @@ void ShaderBoldColorLines::setLineWidth(float pix)
{ {
glm::i32vec4 viewport; glm::i32vec4 viewport;
glGetIntegerv(GL_VIEWPORT, &(viewport[0])); glGetIntegerv(GL_VIEWPORT, &(viewport[0]));
float lw = float((0.5*pix)/double(viewport[2])); float lw = float(double(pix)/double(viewport[2]));
bind(); bind();
glUniform1f(*m_uniform_lineWidth, lw); glUniform1f(*m_uniform_lineWidth, lw);
...@@ -101,7 +101,7 @@ void ShaderBoldColorLines::updatePixelWidth() ...@@ -101,7 +101,7 @@ void ShaderBoldColorLines::updatePixelWidth()
{ {
glm::i32vec4 viewport; glm::i32vec4 viewport;
glGetIntegerv(GL_VIEWPORT, &(viewport[0])); glGetIntegerv(GL_VIEWPORT, &(viewport[0]));
float lw = float((0.5*m_pixWidth)/double(viewport[2])); float lw = float(double(m_pixWidth)/double(viewport[2]));
bind(); bind();
glUniform1f(*m_uniform_lineWidth, lw); glUniform1f(*m_uniform_lineWidth, lw);
......
...@@ -86,7 +86,7 @@ void ShaderBoldLines::setLineWidth(float pix) ...@@ -86,7 +86,7 @@ void ShaderBoldLines::setLineWidth(float pix)
{ {
glm::i32vec4 viewport; glm::i32vec4 viewport;
glGetIntegerv(GL_VIEWPORT, &(viewport[0])); glGetIntegerv(GL_VIEWPORT, &(viewport[0]));
float lw = float((0.5*pix)/double(viewport[2])); float lw = float(double(pix)/double(viewport[2]));
bind(); bind();
glUniform1f(*m_uniform_lineWidth, lw); glUniform1f(*m_uniform_lineWidth, lw);
...@@ -99,7 +99,7 @@ void ShaderBoldLines::updatePixelWidth() ...@@ -99,7 +99,7 @@ void ShaderBoldLines::updatePixelWidth()
{ {
glm::i32vec4 viewport; glm::i32vec4 viewport;
glGetIntegerv(GL_VIEWPORT, &(viewport[0])); glGetIntegerv(GL_VIEWPORT, &(viewport[0]));
float lw = float((0.5*m_pixWidth)/double(viewport[2])); float lw = float(double(m_pixWidth)/double(viewport[2]));
bind(); bind();
glUniform1f(*m_uniform_lineWidth, lw); glUniform1f(*m_uniform_lineWidth, lw);
......
...@@ -153,7 +153,7 @@ public slots: ...@@ -153,7 +153,7 @@ public slots:
QString saveFileDialog(const QString& title, const QString& dir = QString(), const QString& filter = QString()); QString saveFileDialog(const QString& title, const QString& dir = QString(), const QString& filter = QString());
void setWindowSize(int w, int h) { this->setFixedSize(w, h); } void setWindowSize(int w, int h) { this->resize(w, h); }
private slots: private slots:
void loadPythonScriptFromFileDialog(); void loadPythonScriptFromFileDialog();
......
...@@ -118,6 +118,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt ...@@ -118,6 +118,7 @@ SCHNApps::SCHNApps(const QString& appPath, PythonQtObjectPtr& pythonContext, Pyt
// create & setup central widget (views) // create & setup central widget (views)
m_centralLayout = new QVBoxLayout(centralwidget); m_centralLayout = new QVBoxLayout(centralwidget);
m_centralLayout->setMargin(2);
m_rootSplitter = new QSplitter(centralwidget); m_rootSplitter = new QSplitter(centralwidget);
b_rootSplitterInitialized = false; b_rootSplitterInitialized = false;
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment