Commit 34567dc0 authored by Martin Schultz's avatar Martin Schultz

added stereo flag to opengl opetions in options widget

parent 05e1a82f
......@@ -299,7 +299,17 @@ void OptionsWidget::showEvent ( QShowEvent * /*event*/ ) {
else
warning.setColor(samplesWarning->foregroundRole(),Qt::black);
samplesWarning->setPalette(warning);
stereoCheckBox->setChecked(OpenFlipper::Options::glStereo());
QPalette stereoWarn = stereoWarning->palette();
QString stereoValue;
QOpenGLContext::currentContext()->format().stereo() ? stereoValue = "true" : stereoValue = "false";
stereoWarning->setText(stereoValue);
QOpenGLContext::currentContext()->format().stereo() == OpenFlipper::Options::glStereo() ?
stereoWarn.setColor(stereoWarning->foregroundRole(), Qt::black) :
stereoWarn.setColor(stereoWarning->foregroundRole(), Qt::red);
stereoWarning->setPalette(stereoWarn);
VersionComboBox->setCurrentIndex( VersionComboBox->findData(QVariant::fromValue(OpenFlipper::Options::glVersion())));
QPalette version = versionWarning->palette();
versionWarning->setText(QString("%1.%2").arg(QOpenGLContext::currentContext()->format().version().first)
......
......@@ -316,7 +316,7 @@
<x>10</x>
<y>9</y>
<width>532</width>
<height>163</height>
<height>191</height>
</rect>
</property>
<layout class="QVBoxLayout" name="verticalLayout_28">
......@@ -491,6 +491,20 @@
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="profileComboBox">
<item>
<property name="text">
<string>Core</string>
</property>
</item>
<item>
<property name="text">
<string>Compatibility</string>
</property>
</item>
</widget>
</item>
<item row="2" column="3">
<widget class="QLabel" name="samplesWarning">
<property name="palette">
......@@ -645,20 +659,6 @@
</property>
</spacer>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="profileComboBox">
<item>
<property name="text">
<string>Core</string>
</property>
</item>
<item>
<property name="text">
<string>Compatibility</string>
</property>
</item>
</widget>
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_33">
<property name="text">
......@@ -680,6 +680,117 @@
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_32">
<property name="text">
<string>Stereo Buffers:</string>
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QLabel" name="label_36">
<property name="text">
<string>Reported value:</string>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QLabel" name="stereoWarning">
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>204</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>204</red>
<green>0</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>190</red>
<green>190</green>
<blue>190</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>Value</string>
</property>
</widget>
</item>
<item row="3" column="4">
<spacer name="horizontalSpacer_14">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_28">
<item>
<spacer name="horizontalSpacer_15">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="stereoCheckBox">
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_16">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
......
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