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
|
||||
|
||||
bugs to fix {
|
||||
connecting a CapaXitor up for the first time during playback deadlocks audio engine
|
||||
PLAYBACK BREAKS AFTER FIRST PLAY??? {
|
||||
- font fuckiness with additional windows
|
||||
|
||||
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??
|
||||
resolves itself after project switch
|
||||
does NOT break preview mode??
|
||||
|
|
|
@ -468,6 +468,9 @@ MainWindow::MainWindow(QWidget *parent, const QString& fileName) :
|
|||
emit ui->spinSampleNoteSub->valueChanged(0.0); // force refresh
|
||||
}
|
||||
|
||||
// force fonts to display properly
|
||||
updateFont();
|
||||
|
||||
// Set up signaling from project to UI
|
||||
socket->setParent(this);
|
||||
socket->window = this;
|
||||
|
@ -800,6 +803,19 @@ void MainWindow::updateTitle() {
|
|||
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) {
|
||||
if (open) {
|
||||
ui->songInfoPane->setCurrentIndex(1);
|
||||
|
|
|
@ -53,6 +53,7 @@ namespace Xybrid {
|
|||
void openPatternProperties(const std::shared_ptr<Data::Pattern>&);
|
||||
|
||||
void updateTitle();
|
||||
void updateFont();
|
||||
|
||||
void setSongInfoPaneExpanded(bool);
|
||||
void setFloater(QWidget* = nullptr);
|
||||
|
|
|
@ -453,6 +453,8 @@
|
|||
<font>
|
||||
<family>Iosevka Term Light</family>
|
||||
<pointsize>10</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
|
@ -505,6 +507,8 @@
|
|||
<font>
|
||||
<family>Iosevka Term Light</family>
|
||||
<pointsize>10</pointsize>
|
||||
<italic>false</italic>
|
||||
<bold>false</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
|
|
|
@ -112,13 +112,13 @@ QVariant PatternEditorModel::data(const QModelIndex &index, int role) const {
|
|||
if (cc % 2 == 0) {
|
||||
if (row.numParams() > cp) return QString(1,static_cast<char>(row.params->at(cp)[0]));
|
||||
if (row.numParams() == cp) return qs("» ");
|
||||
return qs("");
|
||||
return QString();
|
||||
}
|
||||
if (row.numParams() > cp) {
|
||||
if (row.params->at(cp)[0] == ' ') return qs("- ");
|
||||
return byteStr(row.params->at(cp)[1]);
|
||||
}
|
||||
return qs("");
|
||||
return QString();
|
||||
}
|
||||
} else if (role == Qt::SizeHintRole) {
|
||||
if (index.row() >= pattern->rows) return QSize(-1, -1);
|
||||
|
|
Loading…
Reference in New Issue