fix fonts breaking in pattern editor
parent
e962cda5cc
commit
4330ab847f
6
notes
6
notes
|
@ -75,8 +75,10 @@ TODO {
|
||||||
maybe interpolate between resampler LUT levels
|
maybe interpolate between resampler LUT levels
|
||||||
|
|
||||||
bugs to fix {
|
bugs to fix {
|
||||||
connecting a CapaXitor up for the first time during playback deadlocks audio engine
|
- font fuckiness with additional windows
|
||||||
PLAYBACK BREAKS AFTER FIRST PLAY??? {
|
|
||||||
|
x connecting a CapaXitor up for the first time during playback deadlocks audio engine
|
||||||
|
x PLAYBACK BREAKS AFTER FIRST PLAY??? {
|
||||||
doesn't happen in Lovely Storm; only where Capaxitor is used??
|
doesn't happen in Lovely Storm; only where Capaxitor is used??
|
||||||
resolves itself after project switch
|
resolves itself after project switch
|
||||||
does NOT break preview mode??
|
does NOT break preview mode??
|
||||||
|
|
|
@ -468,6 +468,9 @@ MainWindow::MainWindow(QWidget *parent, const QString& fileName) :
|
||||||
emit ui->spinSampleNoteSub->valueChanged(0.0); // force refresh
|
emit ui->spinSampleNoteSub->valueChanged(0.0); // force refresh
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// force fonts to display properly
|
||||||
|
updateFont();
|
||||||
|
|
||||||
// Set up signaling from project to UI
|
// Set up signaling from project to UI
|
||||||
socket->setParent(this);
|
socket->setParent(this);
|
||||||
socket->window = this;
|
socket->window = this;
|
||||||
|
@ -800,6 +803,19 @@ void MainWindow::updateTitle() {
|
||||||
setWindowTitle(qs("Xybrid - ") % songTitle);
|
setWindowTitle(qs("Xybrid - ") % songTitle);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateFont() {
|
||||||
|
QString font = qs("Iosevka Term Light");
|
||||||
|
double pt = 10.0;
|
||||||
|
|
||||||
|
QString fstr = qs("font: %2pt \"%1\";").arg(font).arg(pt);
|
||||||
|
QString tfstr = qs("QTableView { %1 }").arg(fstr);
|
||||||
|
QString hfstr = qs("QHeaderView { %1 }").arg(fstr);
|
||||||
|
|
||||||
|
ui->patternSequencer->setStyleSheet(tfstr);
|
||||||
|
ui->patternEditor->setStyleSheet(tfstr);
|
||||||
|
ui->patternEditor->verticalHeader()->setStyleSheet(hfstr);
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::setSongInfoPaneExpanded(bool open) {
|
void MainWindow::setSongInfoPaneExpanded(bool open) {
|
||||||
if (open) {
|
if (open) {
|
||||||
ui->songInfoPane->setCurrentIndex(1);
|
ui->songInfoPane->setCurrentIndex(1);
|
||||||
|
|
|
@ -53,6 +53,7 @@ namespace Xybrid {
|
||||||
void openPatternProperties(const std::shared_ptr<Data::Pattern>&);
|
void openPatternProperties(const std::shared_ptr<Data::Pattern>&);
|
||||||
|
|
||||||
void updateTitle();
|
void updateTitle();
|
||||||
|
void updateFont();
|
||||||
|
|
||||||
void setSongInfoPaneExpanded(bool);
|
void setSongInfoPaneExpanded(bool);
|
||||||
void setFloater(QWidget* = nullptr);
|
void setFloater(QWidget* = nullptr);
|
||||||
|
|
|
@ -453,6 +453,8 @@
|
||||||
<font>
|
<font>
|
||||||
<family>Iosevka Term Light</family>
|
<family>Iosevka Term Light</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
|
@ -505,6 +507,8 @@
|
||||||
<font>
|
<font>
|
||||||
<family>Iosevka Term Light</family>
|
<family>Iosevka Term Light</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
|
<italic>false</italic>
|
||||||
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="editTriggers">
|
<property name="editTriggers">
|
||||||
|
|
|
@ -112,13 +112,13 @@ QVariant PatternEditorModel::data(const QModelIndex &index, int role) const {
|
||||||
if (cc % 2 == 0) {
|
if (cc % 2 == 0) {
|
||||||
if (row.numParams() > cp) return QString(1,static_cast<char>(row.params->at(cp)[0]));
|
if (row.numParams() > cp) return QString(1,static_cast<char>(row.params->at(cp)[0]));
|
||||||
if (row.numParams() == cp) return qs("» ");
|
if (row.numParams() == cp) return qs("» ");
|
||||||
return qs("");
|
return QString();
|
||||||
}
|
}
|
||||||
if (row.numParams() > cp) {
|
if (row.numParams() > cp) {
|
||||||
if (row.params->at(cp)[0] == ' ') return qs("- ");
|
if (row.params->at(cp)[0] == ' ') return qs("- ");
|
||||||
return byteStr(row.params->at(cp)[1]);
|
return byteStr(row.params->at(cp)[1]);
|
||||||
}
|
}
|
||||||
return qs("");
|
return QString();
|
||||||
}
|
}
|
||||||
} else if (role == Qt::SizeHintRole) {
|
} else if (role == Qt::SizeHintRole) {
|
||||||
if (index.row() >= pattern->rows) return QSize(-1, -1);
|
if (index.row() >= pattern->rows) return QSize(-1, -1);
|
||||||
|
|
Loading…
Reference in New Issue