Skip to content

Commit be6cb5f

Browse files
author
hackcatml
committed
change minimum height from 785 to 670. it's too big for the small screen
1 parent 765cf7a commit be6cb5f

5 files changed

Lines changed: 16 additions & 11 deletions

File tree

main.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import re
55

66
from PyQt6 import QtCore
7-
from PyQt6.QtCore import QThread, pyqtSlot, Qt, QEvent
7+
from PyQt6.QtCore import QThread, pyqtSlot, Qt, QEvent, QSize
88
from PyQt6.QtGui import QPixmap, QTextCursor, QShortcut, QKeySequence, QColor, QIcon, QPalette
99
from PyQt6.QtWidgets import QLabel, QMainWindow, QMessageBox, QApplication, QInputDialog
1010

@@ -282,8 +282,13 @@ def il2cppdumpsig_func(self, il2cppdumpsig: str):
282282

283283
def adjust_label_pos(self):
284284
tc = self.hexViewer.textCursor()
285-
self.label_3.setIndent(28 - (77 - len(tc.block().text())) * 7) if len(
286-
tc.block().text()) < 77 else self.label_3.setIndent(28)
285+
text_length = len(tc.block().text())
286+
current_height = self.height()
287+
self.resize(text_length * 13, current_height)
288+
if text_length >= 77:
289+
self.label_3.setIndent(28 + (text_length - 77) * 8)
290+
else:
291+
self.label_3.setIndent(28 - (77 - text_length) * 7)
287292

288293
def remote_attach(self, state):
289294
if state == Qt.CheckState.Checked.value:

ui.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
class Ui_MainWindow(object):
1616
def setupUi(self, MainWindow):
1717
MainWindow.setObjectName("MainWindow")
18-
MainWindow.resize(1007, 785)
19-
MainWindow.setMinimumSize(QtCore.QSize(1007, 785))
18+
MainWindow.resize(1007, 670)
19+
MainWindow.setMinimumSize(QtCore.QSize(1007, 670))
2020
font = QtGui.QFont()
2121
font.setFamily("Courier New")
2222
MainWindow.setFont(font)

ui.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<x>0</x>
88
<y>0</y>
99
<width>1007</width>
10-
<height>785</height>
10+
<height>670</height>
1111
</rect>
1212
</property>
1313
<property name="minimumSize">
1414
<size>
1515
<width>1007</width>
16-
<height>785</height>
16+
<height>670</height>
1717
</size>
1818
</property>
1919
<property name="font">

ui_win.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
class Ui_MainWindow(object):
1616
def setupUi(self, MainWindow):
1717
MainWindow.setObjectName("MainWindow")
18-
MainWindow.resize(1007, 785)
19-
MainWindow.setMinimumSize(QtCore.QSize(1007, 785))
18+
MainWindow.resize(1007, 670)
19+
MainWindow.setMinimumSize(QtCore.QSize(1007, 670))
2020
font = QtGui.QFont()
2121
font.setFamily("Courier New")
2222
font.setPointSize(10)

ui_win.ui

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
<x>0</x>
88
<y>0</y>
99
<width>1007</width>
10-
<height>785</height>
10+
<height>670</height>
1111
</rect>
1212
</property>
1313
<property name="minimumSize">
1414
<size>
1515
<width>1007</width>
16-
<height>785</height>
16+
<height>670</height>
1717
</size>
1818
</property>
1919
<property name="font">

0 commit comments

Comments
 (0)