Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3f2a3fc

Browse filesBrowse files
committed
Change layout of test_triager to avoid cropping images.
The previous test triager would crop test images because the 800/500 aspect ratio of the main widget does not match the 6.4:4.8 aspect ratio of the test images. Change the main widget to have size 800x600, and move the thumbnails to the side so that the whole thing still fits in a 1600x900 display.
1 parent bebb206 commit 3f2a3fc
Copy full SHA for 3f2a3fc

File tree

Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+9
-8
lines changed

‎tools/triage_tests.py

Copy file name to clipboardExpand all lines: tools/triage_tests.py
+9-8Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def __init__(self, parent, index, name):
6868
self.image = QtWidgets.QLabel()
6969
self.image.setAlignment(QtCore.Qt.AlignHCenter |
7070
QtCore.Qt.AlignVCenter)
71-
self.image.setMinimumSize(800/3, 500/3)
71+
self.image.setMinimumSize(800/3, 600/3)
7272
layout.addWidget(self.image)
7373
self.setLayout(layout)
7474

@@ -124,21 +124,21 @@ def __init__(self, entries):
124124
for entry in entries:
125125
self.filelist.addItem(entry.display)
126126

127-
images_box = QtWidgets.QWidget()
128-
images_layout = QtWidgets.QVBoxLayout()
129127
thumbnails_box = QtWidgets.QWidget()
130-
thumbnails_layout = QtWidgets.QHBoxLayout()
128+
thumbnails_layout = QtWidgets.QVBoxLayout()
131129
self.thumbnails = []
132130
for i, name in enumerate(('test', 'expected', 'diff')):
133131
thumbnail = Thumbnail(self, i, name)
134132
thumbnails_layout.addWidget(thumbnail)
135133
self.thumbnails.append(thumbnail)
136134
thumbnails_box.setLayout(thumbnails_layout)
135+
136+
images_layout = QtWidgets.QVBoxLayout()
137+
images_box = QtWidgets.QWidget()
137138
self.image_display = QtWidgets.QLabel()
138139
self.image_display.setAlignment(QtCore.Qt.AlignHCenter |
139140
QtCore.Qt.AlignVCenter)
140-
self.image_display.setMinimumSize(800, 500)
141-
images_layout.addWidget(thumbnails_box, 3)
141+
self.image_display.setMinimumSize(800, 600)
142142
images_layout.addWidget(self.image_display, 6)
143143
images_box.setLayout(images_layout)
144144

@@ -154,8 +154,9 @@ def __init__(self, entries):
154154
images_layout.addWidget(buttons_box)
155155

156156
main_layout = QtWidgets.QHBoxLayout()
157-
main_layout.addWidget(self.filelist, 3)
158-
main_layout.addWidget(images_box, 6)
157+
main_layout.addWidget(self.filelist, 1)
158+
main_layout.addWidget(thumbnails_box, 1)
159+
main_layout.addWidget(images_box, 3)
159160

160161
self.setLayout(main_layout)
161162

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.