Skip to content

Commit

Permalink
Add scrolling widget in the help text (#260)
Browse files Browse the repository at this point in the history
- Add scrolling widget in the help text
  • Loading branch information
DanicaSTFC authored Jun 4, 2024
1 parent 1b85731 commit 4606da0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# ChangeLog

## vx.x.x
* Add scrolling widget in the help text #260
* Add `openpyxl` to recipe files #262
* Allow csv and xlxs formats in point-cloud file & add error dialog #262
* Set registration-box-size default and help text #259
* Make dimensionality 3D the default #256
* Edit README.md to include Prof. Bay citations and ref to DVC executable #255
* Edit "degrees of freedom" widget to be "optimisation parameters" #254
* Enable loading of TIFF files with non integer pixel values. Data will be rescaled to uint16 #228
* fix some missing pip dependencies & update workflows & fix tests #233
* Fix some missing pip dependencies & update workflows & fix tests #233
* Edit registration-tab name from "Manual" to "Initial" #241
* Add automatic registration functionality #304
* Set empty pop-up menus for the main windows #217
Expand Down
20 changes: 17 additions & 3 deletions src/idvc/dvc_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
QDoubleSpinBox, QFileDialog, QFormLayout,
QFrame, QGroupBox, QLabel, QLineEdit,
QMainWindow, QMessageBox,
QProgressDialog, QPushButton, QSpinBox,
QProgressDialog, QPushButton, QScrollArea, QSpinBox,
QTabWidget, QTabBar, QVBoxLayout,
QHBoxLayout, QSizePolicy,
QWidget)
QWidget)
import time
import numpy as np
import math
Expand Down Expand Up @@ -408,6 +408,10 @@ def updateCoordinates(self):
viewer.updatePipeline()

def CreateHelpPanel(self):
"""Creates the help-text dock widget.
Saves the help text for all tabs.
Adds a QLabel in the form of scrollable text."""
help_panel = generateUIDockParameters(self, "Help")
dockWidget = help_panel[0]
dockWidget.setObjectName("HelpPanel")
Expand Down Expand Up @@ -446,9 +450,19 @@ def CreateHelpPanel(self):
"You may also scale the vectors to make them larger and easier to view.")

self.help_label = QLabel(groupBox)
scroll_area_widget = QScrollArea()

self.help_label.setWordWrap(True)
self.help_label.setText(self.help_text[0])
formLayout.setWidget(1, QFormLayout.SpanningRole, self.help_label)

scroll_area_widget.setWidget(self.help_label)
scroll_area_widget.setFrameShape(QFrame.NoFrame)
scroll_area_widget.setFrameShadow(QFrame.Plain)
scroll_area_widget.setStyleSheet("border: 0px;")
scroll_area_widget.setWidgetResizable(True)


formLayout.setWidget(1, QFormLayout.SpanningRole, scroll_area_widget)

def displayHelp(self, open, panel_no = None):
if open:
Expand Down

0 comments on commit 4606da0

Please sign in to comment.