Monospace font setting moved to uefitool.cpp

This commit is contained in:
Nikolaj Schlej 2014-11-15 21:40:28 +01:00
parent d0280acfdc
commit 39e53719d4
4 changed files with 58 additions and 52 deletions

View File

@ -1462,12 +1462,11 @@ UINT8 FfsEngine::parseSection(const QByteArray & section, QModelIndex & index, c
// Get info for it
QString signatureInfo = tr("Size: 0x%1").hexarg(signature.size(), 8);
// Add it to the tree
QModelIndex signatureIndex = model->addItem(Types::Padding, Subtypes::DataPadding, COMPRESSION_ALGORITHM_NONE, tr("Padding"), tr("Intel signature"), signatureInfo, QByteArray(), signature, QByteArray(), index, mode);
model->addItem(Types::Padding, Subtypes::DataPadding, COMPRESSION_ALGORITHM_NONE, tr("Padding"), tr("Intel signature"), signatureInfo, QByteArray(), signature, QByteArray(), index, mode);
// Get internal lzma section data
QByteArray lzmaSection = body.mid(signature.size());
// Parse internal section
QModelIndex lzmaSectionIndex;
// Parse internal sections
result = parseSections(lzmaSection, index);
if (result)
return result;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>214</height>
<height>237</height>
</rect>
</property>
<property name="windowTitle">
@ -36,12 +36,6 @@
</item>
<item row="0" column="1">
<widget class="QLineEdit" name="hexEdit">
<property name="font">
<font>
<family>Consolas</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="inputMask">
<string/>
</property>
@ -53,12 +47,6 @@
<string>Search scope</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QRadioButton" name="hexScopeFullRadioButton">
<property name="text">
@ -102,14 +90,8 @@
</item>
<item row="0" column="1">
<widget class="GuidLineEdit" name="guidEdit">
<property name="font">
<font>
<family>Consolas</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="inputMask">
<string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx; </string>
<string>xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</string>
</property>
<property name="text">
<string>........-....-....-....-............</string>
@ -122,12 +104,6 @@
<string>Search scope</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<widget class="QRadioButton" name="guidScopeFullRadioButton">
<property name="text">

View File

@ -56,6 +56,19 @@ version(tr("0.19.2"))
// Set current directory
currentDir = ".";
// Set monospace font for some controls
QFont font("Courier New", 10);
#if defined Q_OS_OSX
font = QFont("Menlo", 10);
#elif defined Q_OS_WIN
font = QFont("Consolas", 9);
#endif
ui->infoEdit->setFont(font);
ui->messageListWidget->setFont(font);
ui->structureTreeView->setFont(font);
searchDialog->ui->guidEdit->setFont(font);
searchDialog->ui->hexEdit->setFont(font);
// Initialize non-persistent data
init();

View File

@ -33,7 +33,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
@ -53,7 +62,16 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
@ -64,12 +82,6 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<family>Consolas</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="indentation">
<number>10</number>
</property>
@ -97,17 +109,20 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="QPlainTextEdit" name="infoEdit">
<property name="font">
<font>
<family>Consolas</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
@ -133,17 +148,20 @@
<property name="spacing">
<number>0</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item>
<widget class="QListWidget" name="messageListWidget">
<property name="font">
<font>
<family>Consolas</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
@ -162,7 +180,7 @@
<x>0</x>
<y>0</y>
<width>800</width>
<height>21</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="menuFile">