Skip to content

Commit

Permalink
Add monospace to more widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
korcankaraokcu committed May 12, 2024
1 parent d742573 commit 8f5b416
Show file tree
Hide file tree
Showing 29 changed files with 285 additions and 108 deletions.
2 changes: 2 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ Consider doing these when creating a new QTableWidget or QTableView
- 15/02/2024 - Don't always trust the "Adjust Size" button of the Qt Designer, it might expand widgets much more than needed, especially for smaller widgets. Consider the use cases
and adjust manually. This also helps functions like `guiutils.center_to_parent` work properly

- 13/05/2024 - Monospace font and `utils.upper_hex` function greatly improve readability if the text area includes hex data, consider using those when creating new text areas. Memory Viewer is a good example for this

- 02/09/2018 - All functions with docstrings should have their subfunctions written after their docstrings. For instance:
```python
def test():
Expand Down
17 changes: 10 additions & 7 deletions GUI/BookmarkWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'BookmarkWidget.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -19,26 +19,29 @@ def setupUi(self, Form):
self.horizontalLayout.setObjectName("horizontalLayout")
self.verticalLayout = QtWidgets.QVBoxLayout()
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtWidgets.QLabel(Form)
self.label = QtWidgets.QLabel(parent=Form)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.listWidget = QtWidgets.QListWidget(Form)
self.listWidget = QtWidgets.QListWidget(parent=Form)
font = QtGui.QFont()
font.setFamily("Monospace")
self.listWidget.setFont(font)
self.listWidget.setObjectName("listWidget")
self.verticalLayout.addWidget(self.listWidget)
self.horizontalLayout.addLayout(self.verticalLayout)
self.verticalLayout_2 = QtWidgets.QVBoxLayout()
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.label_2 = QtWidgets.QLabel(Form)
self.label_2 = QtWidgets.QLabel(parent=Form)
self.label_2.setObjectName("label_2")
self.verticalLayout_2.addWidget(self.label_2)
self.lineEdit_Info = QtWidgets.QLineEdit(Form)
self.lineEdit_Info = QtWidgets.QLineEdit(parent=Form)
self.lineEdit_Info.setReadOnly(True)
self.lineEdit_Info.setObjectName("lineEdit_Info")
self.verticalLayout_2.addWidget(self.lineEdit_Info)
self.label_3 = QtWidgets.QLabel(Form)
self.label_3 = QtWidgets.QLabel(parent=Form)
self.label_3.setObjectName("label_3")
self.verticalLayout_2.addWidget(self.label_3)
self.lineEdit_Comment = QtWidgets.QLineEdit(Form)
self.lineEdit_Comment = QtWidgets.QLineEdit(parent=Form)
self.lineEdit_Comment.setReadOnly(True)
self.lineEdit_Comment.setObjectName("lineEdit_Comment")
self.verticalLayout_2.addWidget(self.lineEdit_Comment)
Expand Down
8 changes: 7 additions & 1 deletion GUI/BookmarkWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
</widget>
</item>
<item>
<widget class="QListWidget" name="listWidget"/>
<widget class="QListWidget" name="listWidget">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
</widget>
</item>
</layout>
</item>
Expand Down
12 changes: 9 additions & 3 deletions GUI/BreakpointInfoWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'BreakpointInfoWidget.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -17,7 +17,10 @@ def setupUi(self, TabWidget):
self.tab_BreakpointInfo.setObjectName("tab_BreakpointInfo")
self.gridLayout_2 = QtWidgets.QGridLayout(self.tab_BreakpointInfo)
self.gridLayout_2.setObjectName("gridLayout_2")
self.tableWidget_BreakpointInfo = QtWidgets.QTableWidget(self.tab_BreakpointInfo)
self.tableWidget_BreakpointInfo = QtWidgets.QTableWidget(parent=self.tab_BreakpointInfo)
font = QtGui.QFont()
font.setFamily("Monospace")
self.tableWidget_BreakpointInfo.setFont(font)
self.tableWidget_BreakpointInfo.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget_BreakpointInfo.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.tableWidget_BreakpointInfo.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
Expand Down Expand Up @@ -54,7 +57,10 @@ def setupUi(self, TabWidget):
self.tab_RawBreakpointInfo.setObjectName("tab_RawBreakpointInfo")
self.gridLayout = QtWidgets.QGridLayout(self.tab_RawBreakpointInfo)
self.gridLayout.setObjectName("gridLayout")
self.textBrowser_BreakpointInfo = QtWidgets.QTextBrowser(self.tab_RawBreakpointInfo)
self.textBrowser_BreakpointInfo = QtWidgets.QTextBrowser(parent=self.tab_RawBreakpointInfo)
font = QtGui.QFont()
font.setFamily("Monospace")
self.textBrowser_BreakpointInfo.setFont(font)
self.textBrowser_BreakpointInfo.setObjectName("textBrowser_BreakpointInfo")
self.gridLayout.addWidget(self.textBrowser_BreakpointInfo, 0, 0, 1, 1)
TabWidget.addTab(self.tab_RawBreakpointInfo, "")
Expand Down
13 changes: 12 additions & 1 deletion GUI/BreakpointInfoWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidget_BreakpointInfo">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
Expand Down Expand Up @@ -105,7 +110,13 @@
</attribute>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextBrowser" name="textBrowser_BreakpointInfo"/>
<widget class="QTextBrowser" name="textBrowser_BreakpointInfo">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
</widget>
</item>
</layout>
</widget>
Expand Down
5 changes: 4 additions & 1 deletion GUI/DissectCodeDialog.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'DissectCodeDialog.ui'
#
# Created by: PyQt6 UI code generator 6.5.1
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -19,6 +19,9 @@ def setupUi(self, Dialog):
self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.splitter.setObjectName("splitter")
self.tableWidget_ExecutableMemoryRegions = QtWidgets.QTableWidget(parent=self.splitter)
font = QtGui.QFont()
font.setFamily("Monospace")
self.tableWidget_ExecutableMemoryRegions.setFont(font)
self.tableWidget_ExecutableMemoryRegions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget_ExecutableMemoryRegions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
self.tableWidget_ExecutableMemoryRegions.setWordWrap(False)
Expand Down
5 changes: 5 additions & 0 deletions GUI/DissectCodeDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<enum>Qt::Horizontal</enum>
</property>
<widget class="QTableWidget" name="tableWidget_ExecutableMemoryRegions">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
Expand Down
24 changes: 15 additions & 9 deletions GUI/ExamineReferrersWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'ExamineReferrersWidget.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -16,34 +16,40 @@ def setupUi(self, Form):
Form.setToolTip("")
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.splitter = QtWidgets.QSplitter(Form)
self.splitter = QtWidgets.QSplitter(parent=Form)
self.splitter.setOrientation(QtCore.Qt.Orientation.Horizontal)
self.splitter.setObjectName("splitter")
self.layoutWidget = QtWidgets.QWidget(self.splitter)
self.layoutWidget = QtWidgets.QWidget(parent=self.splitter)
self.layoutWidget.setObjectName("layoutWidget")
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.lineEdit_Regex = QtWidgets.QLineEdit(self.layoutWidget)
self.lineEdit_Regex = QtWidgets.QLineEdit(parent=self.layoutWidget)
self.lineEdit_Regex.setObjectName("lineEdit_Regex")
self.horizontalLayout_2.addWidget(self.lineEdit_Regex)
self.checkBox_CaseSensitive = QtWidgets.QCheckBox(self.layoutWidget)
self.checkBox_CaseSensitive = QtWidgets.QCheckBox(parent=self.layoutWidget)
self.checkBox_CaseSensitive.setObjectName("checkBox_CaseSensitive")
self.horizontalLayout_2.addWidget(self.checkBox_CaseSensitive)
self.checkBox_Regex = QtWidgets.QCheckBox(self.layoutWidget)
self.checkBox_Regex = QtWidgets.QCheckBox(parent=self.layoutWidget)
self.checkBox_Regex.setObjectName("checkBox_Regex")
self.horizontalLayout_2.addWidget(self.checkBox_Regex)
self.pushButton_Search = QtWidgets.QPushButton(self.layoutWidget)
self.pushButton_Search = QtWidgets.QPushButton(parent=self.layoutWidget)
self.pushButton_Search.setObjectName("pushButton_Search")
self.horizontalLayout_2.addWidget(self.pushButton_Search)
self.verticalLayout.addLayout(self.horizontalLayout_2)
self.listWidget_Referrers = QtWidgets.QListWidget(self.layoutWidget)
self.listWidget_Referrers = QtWidgets.QListWidget(parent=self.layoutWidget)
font = QtGui.QFont()
font.setFamily("Monospace")
self.listWidget_Referrers.setFont(font)
self.listWidget_Referrers.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.listWidget_Referrers.setObjectName("listWidget_Referrers")
self.verticalLayout.addWidget(self.listWidget_Referrers)
self.textBrowser_DisasInfo = QtWidgets.QTextBrowser(self.splitter)
self.textBrowser_DisasInfo = QtWidgets.QTextBrowser(parent=self.splitter)
font = QtGui.QFont()
font.setFamily("Monospace")
self.textBrowser_DisasInfo.setFont(font)
self.textBrowser_DisasInfo.setLineWrapMode(QtWidgets.QTextEdit.LineWrapMode.NoWrap)
self.textBrowser_DisasInfo.setObjectName("textBrowser_DisasInfo")
self.gridLayout.addWidget(self.splitter, 0, 0, 1, 1)
Expand Down
10 changes: 10 additions & 0 deletions GUI/ExamineReferrersWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
</item>
<item>
<widget class="QListWidget" name="listWidget_Referrers">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
Expand All @@ -75,6 +80,11 @@
</layout>
</widget>
<widget class="QTextBrowser" name="textBrowser_DisasInfo">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
Expand Down
20 changes: 13 additions & 7 deletions GUI/FunctionsInfoWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'FunctionsInfoWidget.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -15,7 +15,10 @@ def setupUi(self, Form):
Form.resize(640, 555)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.tableWidget_SymbolInfo = QtWidgets.QTableWidget(Form)
self.tableWidget_SymbolInfo = QtWidgets.QTableWidget(parent=Form)
font = QtGui.QFont()
font.setFamily("Monospace")
self.tableWidget_SymbolInfo.setFont(font)
self.tableWidget_SymbolInfo.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget_SymbolInfo.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.tableWidget_SymbolInfo.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
Expand All @@ -34,21 +37,24 @@ def setupUi(self, Form):
self.gridLayout.addWidget(self.tableWidget_SymbolInfo, 2, 0, 1, 1)
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.lineEdit_SearchInput = QtWidgets.QLineEdit(Form)
self.lineEdit_SearchInput = QtWidgets.QLineEdit(parent=Form)
self.lineEdit_SearchInput.setObjectName("lineEdit_SearchInput")
self.horizontalLayout.addWidget(self.lineEdit_SearchInput)
self.checkBox_CaseSensitive = QtWidgets.QCheckBox(Form)
self.checkBox_CaseSensitive = QtWidgets.QCheckBox(parent=Form)
self.checkBox_CaseSensitive.setObjectName("checkBox_CaseSensitive")
self.horizontalLayout.addWidget(self.checkBox_CaseSensitive)
self.pushButton_Search = QtWidgets.QPushButton(Form)
self.pushButton_Search = QtWidgets.QPushButton(parent=Form)
self.pushButton_Search.setObjectName("pushButton_Search")
self.horizontalLayout.addWidget(self.pushButton_Search)
self.pushButton_Help = QtWidgets.QPushButton(Form)
self.pushButton_Help = QtWidgets.QPushButton(parent=Form)
self.pushButton_Help.setText("")
self.pushButton_Help.setObjectName("pushButton_Help")
self.horizontalLayout.addWidget(self.pushButton_Help)
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
self.textBrowser_AddressInfo = QtWidgets.QTextBrowser(Form)
self.textBrowser_AddressInfo = QtWidgets.QTextBrowser(parent=Form)
font = QtGui.QFont()
font.setFamily("Monospace")
self.textBrowser_AddressInfo.setFont(font)
self.textBrowser_AddressInfo.setObjectName("textBrowser_AddressInfo")
self.gridLayout.addWidget(self.textBrowser_AddressInfo, 1, 0, 1, 1)

Expand Down
13 changes: 12 additions & 1 deletion GUI/FunctionsInfoWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<layout class="QGridLayout" name="gridLayout">
<item row="2" column="0">
<widget class="QTableWidget" name="tableWidget_SymbolInfo">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
Expand Down Expand Up @@ -91,7 +96,13 @@
</layout>
</item>
<item row="1" column="0">
<widget class="QTextBrowser" name="textBrowser_AddressInfo"/>
<widget class="QTextBrowser" name="textBrowser_AddressInfo">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
</widget>
</item>
</layout>
</widget>
Expand Down
11 changes: 7 additions & 4 deletions GUI/LogFileWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'LogFileWidget.ui'
#
# Created by: PyQt6 UI code generator 6.3.1
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -17,15 +17,18 @@ def setupUi(self, Form):
self.gridLayout.setObjectName("gridLayout")
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.label_FilePath = QtWidgets.QLabel(Form)
self.label_FilePath = QtWidgets.QLabel(parent=Form)
self.label_FilePath.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.LinksAccessibleByMouse|QtCore.Qt.TextInteractionFlag.TextSelectableByMouse)
self.label_FilePath.setObjectName("label_FilePath")
self.horizontalLayout.addWidget(self.label_FilePath)
self.label_LoggingStatus = QtWidgets.QLabel(Form)
self.label_LoggingStatus = QtWidgets.QLabel(parent=Form)
self.label_LoggingStatus.setObjectName("label_LoggingStatus")
self.horizontalLayout.addWidget(self.label_LoggingStatus)
self.gridLayout.addLayout(self.horizontalLayout, 0, 0, 1, 1)
self.textBrowser_LogContent = QtWidgets.QTextBrowser(Form)
self.textBrowser_LogContent = QtWidgets.QTextBrowser(parent=Form)
font = QtGui.QFont()
font.setFamily("Monospace")
self.textBrowser_LogContent.setFont(font)
self.textBrowser_LogContent.setLineWrapMode(QtWidgets.QTextEdit.LineWrapMode.NoWrap)
self.textBrowser_LogContent.setObjectName("textBrowser_LogContent")
self.gridLayout.addWidget(self.textBrowser_LogContent, 1, 0, 1, 1)
Expand Down
5 changes: 5 additions & 0 deletions GUI/LogFileWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@
</item>
<item row="1" column="0">
<widget class="QTextBrowser" name="textBrowser_LogContent">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="lineWrapMode">
<enum>QTextEdit::NoWrap</enum>
</property>
Expand Down
7 changes: 5 additions & 2 deletions GUI/MemoryRegionsWidget.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MemoryRegionsWidget.ui'
#
# Created by: PyQt6 UI code generator 6.4.0
# Created by: PyQt6 UI code generator 6.4.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic6 is
# run again. Do not edit this file unless you know what you are doing.
Expand All @@ -15,7 +15,10 @@ def setupUi(self, Form):
Form.resize(684, 539)
self.gridLayout = QtWidgets.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.tableWidget_MemoryRegions = QtWidgets.QTableWidget(Form)
self.tableWidget_MemoryRegions = QtWidgets.QTableWidget(parent=Form)
font = QtGui.QFont()
font.setFamily("Monospace")
self.tableWidget_MemoryRegions.setFont(font)
self.tableWidget_MemoryRegions.setEditTriggers(QtWidgets.QAbstractItemView.EditTrigger.NoEditTriggers)
self.tableWidget_MemoryRegions.setSelectionMode(QtWidgets.QAbstractItemView.SelectionMode.SingleSelection)
self.tableWidget_MemoryRegions.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectionBehavior.SelectRows)
Expand Down
5 changes: 5 additions & 0 deletions GUI/MemoryRegionsWidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTableWidget" name="tableWidget_MemoryRegions">
<property name="font">
<font>
<family>Monospace</family>
</font>
</property>
<property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
Expand Down
Loading

0 comments on commit 8f5b416

Please sign in to comment.