Skip to content

Commit

Permalink
add adjustable splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
yconst committed Apr 29, 2024
1 parent 1288487 commit 4e7a77c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 2 additions & 0 deletions studio/Python/tinymovr/gui/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@

app_stylesheet_dark = """
QSplitter::handle { background-color: black; }
/* --------------------------------------- QPushButton -----------------------------------*/
QPushButton {
Expand Down
13 changes: 10 additions & 3 deletions studio/Python/tinymovr/gui/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
QLabel,
QMessageBox,
QTreeWidgetItem,
QSplitter
)
from PySide6.QtGui import QAction
import pyqtgraph as pg
Expand Down Expand Up @@ -110,6 +111,10 @@ def __init__(self, app, arguments, logger):
self.status_label = QLabel()
self.status_label.setStyleSheet("margin: 5px;")

# Create splitter and add frames
self.splitter = QSplitter(QtCore.Qt.Horizontal)
self.splitter.setHandleWidth(0)

self.left_frame = QFrame(self)
self.left_layout = QVBoxLayout()
self.left_layout.addWidget(self.tree_widget)
Expand All @@ -127,9 +132,11 @@ def __init__(self, app, arguments, logger):
self.right_layout.setContentsMargins(0, 0, 0, 0)
self.right_frame.setLayout(self.right_layout)

main_layout = QHBoxLayout()
main_layout.addWidget(self.left_frame)
main_layout.addWidget(self.right_frame)
self.splitter.addWidget(self.left_frame)
self.splitter.addWidget(self.right_frame)

main_layout = QVBoxLayout()
main_layout.addWidget(self.splitter)
main_layout.setSpacing(0)
main_layout.setContentsMargins(0, 0, 0, 0)

Expand Down

0 comments on commit 4e7a77c

Please sign in to comment.