You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3afbc90
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: GPU/GPUTracking/display/CMakeLists.txt
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -186,11 +186,10 @@ if(GLFW_FOUND)
186
186
endif()
187
187
188
188
if(GPUCA_EVENT_DISPLAY_QT)
189
-
qt_wrap_cpp(GPUCA_QT_MOC_SRCSfrontend/GPUDisplayGUI.h) # Explicit moc / uic instead of AUTOMOC / AUTOUIC: rerun only if these files change; add new Q_OBJECT headers / .ui files here
qt_wrap_cpp(GPUCA_QT_MOC_SRCSfrontend/GPUDisplayGUI.h) # Explicit moc instead of AUTOMOC: rerun only if these files change; add new Q_OBJECT headers here
qApp->setStyle(new GUIStyle); // Owned by the application
344
-
mUi->setupUi(this);
345
-
auto* scroll = new QScrollArea; // Vertical scroll bar if the frames do not fit into the window, they wrap to the window width
346
-
scroll->setWidgetResizable(true);
347
-
scroll->setFrameShape(QFrame::NoFrame);
348
-
scroll->setWidget(takeCentralWidget());
349
-
auto* central = new QWidget;
350
-
auto* centralLayout = newQVBoxLayout(central);
351
-
centralLayout->setContentsMargins(0, 0, 0, 0);
352
-
centralLayout->setSpacing(0);
353
-
centralLayout->addWidget(scroll, 1);
344
+
resize(1370, 1210);
345
+
setMinimumSize(500, 500);
354
346
mStatusLabel = new QLabel;
355
347
mStatusLabel->setWordWrap(true);
356
348
mStatusLabel->hide();
357
-
mStatusLabel->setStyleSheet("background-color: rgba(0, 0, 0, 25); padding: 2px 4px;"); // Slightly darker than the window, in light and dark mode
358
-
centralLayout->addWidget(mStatusLabel);
349
+
statusBar()->addWidget(mStatusLabel, 1);
359
350
mDarkMode = darkPalette(); // System scheme, until the display tells otherwise
360
351
connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, &GPUDisplayGUI::colorSchemeChanged, Qt::QueuedConnection); // Queued: after the palette was updated
@@ -68,10 +59,11 @@ class GPUDisplayGUI : public QMainWindow
68
59
voidapplySettings();
69
60
voidapplyElement(GUIElement& element); // Set the element from mState.cfg if the value changed
70
61
voidupdateInfoLabels();
62
+
voidfitStatusLabel(); // Height needed for the wrapped text, otherwise the size hint of the label makes the status bar too high
71
63
booldarkPalette() const;
72
-
voidsetDarkMode(bool dark); // Requests the color scheme from the platform theme
73
-
voidcolorSchemeChanged(); // Style sheets and colors depending on the color scheme
74
-
voidbuildElements(const std::vector<GPUDisplayGUIChannel::Frame>& layout); // One frame per add_gui_binding call, with a labeled element per option
64
+
voidsetDarkMode(bool dark); // Requests the color scheme from the platform theme
65
+
voidcolorSchemeChanged(); // Style sheets and colors depending on the color scheme
66
+
QWidget*buildElements(const std::vector<GPUDisplayGUIChannel::Frame>& layout); // One frame per add_gui_binding call, with a labeled element per option
0 commit comments