Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenFlipper-Free
OpenFlipper
Commits
34567dc0
Commit
34567dc0
authored
Apr 16, 2018
by
Martin Schultz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added stereo flag to opengl opetions in options widget
parent
05e1a82f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
16 deletions
+137
-16
widgets/optionsWidget/optionsWidget.cc
widgets/optionsWidget/optionsWidget.cc
+11
-1
widgets/optionsWidget/optionsWidget.ui
widgets/optionsWidget/optionsWidget.ui
+126
-15
No files found.
widgets/optionsWidget/optionsWidget.cc
View file @
34567dc0
...
...
@@ -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
)
...
...
widgets/optionsWidget/optionsWidget.ui
View file @
34567dc0
...
...
@@ -316,7 +316,7 @@
<x>
10
</x>
<y>
9
</y>
<width>
532
</width>
<height>
1
63
</height>
<height>
1
91
</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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment