mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2025-01-02 22:33:03 +00:00
Fixed layout error message and font aliases for Apple Fonts.
This commit is contained in:
parent
659780d425
commit
dcfa0ce655
@ -18,12 +18,11 @@ int main(int argc, char** argv)
|
||||
QCoreApplication::setOrganizationDomain("lydianscale.com");
|
||||
QCoreApplication::setApplicationName("AppleSAWS");
|
||||
|
||||
qDebug("Adding fonts");
|
||||
auto x = QFontDatabase::addApplicationFont(":/fonts/A2_40Col.ttf");
|
||||
auto y = QFontDatabase::addApplicationFont(":/fonts/A2_80Col.ttf");
|
||||
auto x = QFontDatabase::addApplicationFont(":/fonts/Print_Char_21.ttf");
|
||||
auto y = QFontDatabase::addApplicationFont(":/fonts/PR_Number_3.ttf");
|
||||
|
||||
if (x < 0) { qWarning("Could not load A2_40Col.ttf font."); }
|
||||
if (y < 0) { qWarning("Could not load A2_80Col.ttf font."); }
|
||||
if (x < 0) { qWarning("Could not load Print_Char_21.ttf font."); }
|
||||
if (y < 0) { qWarning("Could not load PR_Number_3.ttf font."); }
|
||||
|
||||
StartupDialog w;
|
||||
w.show();
|
||||
|
@ -1,8 +1,8 @@
|
||||
<RCC>
|
||||
<qresource prefix="/fonts">
|
||||
<file>FreeLicense.txt</file>
|
||||
<file alias="A2_40Col.ttf">PrintChar21.ttf</file>
|
||||
<file alias="A2_80Col.ttf">PRNumber3.ttf</file>
|
||||
<file alias="Print_Char_21.ttf">PrintChar21.ttf</file>
|
||||
<file alias="PR_Number_3.ttf">PRNumber3.ttf</file>
|
||||
</qresource>
|
||||
<qresource prefix="/notes">
|
||||
<file>notes.txt</file>
|
||||
|
@ -16,8 +16,9 @@ CatalogWidget::CatalogWidget(QWidget *parent) :
|
||||
ui(new Ui::CatalogWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QFont catalogFont;
|
||||
catalogFont.setStyleHint(QFont::Monospace);
|
||||
QFont catalogFont("PR Number 3",12);
|
||||
//catalogFont.setStyleHint(QFont::Monospace);
|
||||
|
||||
ui->catalog_list->setFont(catalogFont);
|
||||
ui->noteButton->setText(QChar(0x270d));
|
||||
ui->noteButton->setFont(QFont("sans",16,QFont::Bold));
|
||||
|
@ -15,38 +15,37 @@ DiskExplorerMapWidget::DiskExplorerMapWidget(int numtracks, int numsectors, QWid
|
||||
{
|
||||
m_numtracks = numtracks;
|
||||
m_numsectors = numsectors;
|
||||
m_diskLabel = Q_NULLPTR;
|
||||
m_statusWidget = Q_NULLPTR;
|
||||
|
||||
m_diskLabel = nullptr;
|
||||
m_statusWidget = nullptr;
|
||||
m_currentChecked = nullptr;
|
||||
|
||||
m_deferredSetup = false;
|
||||
|
||||
setWindowTitle("Disk Explorer");
|
||||
|
||||
m_currentChecked = Q_NULLPTR;
|
||||
QGridLayout *gridlayout = new QGridLayout(this);
|
||||
gridlayout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
gridlayout->setHorizontalSpacing(2);
|
||||
gridlayout->setVerticalSpacing(1);
|
||||
|
||||
initColors();
|
||||
|
||||
QGridLayout *layout = new QGridLayout();
|
||||
layout->setSizeConstraint(QLayout::SetFixedSize);
|
||||
layout->setHorizontalSpacing(2);
|
||||
layout->setVerticalSpacing(1);
|
||||
|
||||
m_bgroup = new QButtonGroup(this);
|
||||
|
||||
setLayout(layout);
|
||||
QLabel *tracklabel = new QLabel("Track",this);
|
||||
layout->addWidget(tracklabel,0,0,1,m_numtracks+1,Qt::AlignHCenter);
|
||||
gridlayout->addWidget(tracklabel,0,0,1,m_numtracks+1,Qt::AlignHCenter);
|
||||
for (int track= 0; track < numtracks; track++)
|
||||
{
|
||||
QLabel *label = new QLabel(QString("%1").arg(track));
|
||||
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
layout->addWidget(label,1,track+1);
|
||||
gridlayout->addWidget(label,1,track+1);
|
||||
}
|
||||
for (int sec = 0; sec < numsectors; sec++)
|
||||
{
|
||||
QLabel *label = new QLabel(QString("Sec %1").arg(sec));
|
||||
label->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
|
||||
layout->addWidget(label,sec+2,0);
|
||||
gridlayout->addWidget(label,sec+2,0);
|
||||
}
|
||||
for (int track = 0; track < 35; track++)
|
||||
{
|
||||
@ -62,7 +61,7 @@ DiskExplorerMapWidget::DiskExplorerMapWidget(int numtracks, int numsectors, QWid
|
||||
|
||||
tb->setAutoFillBackground(true);
|
||||
|
||||
layout->addWidget(tb,sec+2,track+1);
|
||||
gridlayout->addWidget(tb,sec+2,track+1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +71,7 @@ DiskExplorerMapWidget::DiskExplorerMapWidget(int numtracks, int numsectors, QWid
|
||||
void DiskExplorerMapWidget::makeStatusWidget()
|
||||
{
|
||||
QWidget *statusWidget = new QWidget(this);
|
||||
QHBoxLayout *hbl = new QHBoxLayout(this);
|
||||
QHBoxLayout *hbl = new QHBoxLayout();
|
||||
statusWidget->setLayout(hbl);
|
||||
|
||||
m_trackSectorLabel = new QLabel(this);
|
||||
|
Loading…
Reference in New Issue
Block a user