Skip to content

Commit

Permalink
Fix UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Shostina committed Dec 26, 2023
1 parent eb48309 commit 313dd86
Show file tree
Hide file tree
Showing 7 changed files with 402 additions and 609 deletions.
220 changes: 0 additions & 220 deletions CMakeLists.txt.orig

This file was deleted.

2 changes: 1 addition & 1 deletion features_forest/graphicsitemfeaturenode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void GraphicsItemFeatureNode::drawNodeText(QPainter* painter, QStringList nodeTe
QPainterPath textPath;

QFont font = g_settings->labelFont;
font.setPixelSize(g_settings->textSize);

QFontMetrics metrics(font);
double fontHeight = metrics.ascent();

Expand Down
1 change: 0 additions & 1 deletion graph/graphicsitemnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ void GraphicsItemNode::paint(QPainter * painter, const QStyleOptionGraphicsItem
QPainterPath textPath;

QFont font = g_settings->labelFont;
font.setPixelSize(g_settings->textSize);

QFontMetrics metrics(font);
double fontHeight = metrics.ascent();
Expand Down
2 changes: 1 addition & 1 deletion painting/textgraphicsitemnode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ QPainterPath TextGraphicsItemNode::shape() const
QPainterPath textPath;

QFont font = g_settings->labelFont;
font.setPixelSize(g_settings->textSize);
font.setBold(true);

QFontMetrics metrics(font);
double fontHeight = metrics.ascent();
Expand Down
1 change: 1 addition & 0 deletions program/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ Settings::Settings()
displayNodeCsvData = false;
displayNodeCsvDataCol = 0;
labelFont = QFont();
labelFont.setPixelSize(12);
textOutline = false;
antialiasing = true;
positionTextNodeCentre = false;
Expand Down
18 changes: 14 additions & 4 deletions ui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1998,6 +1998,8 @@ void MainWindow::setUiState(UiState uiState)
ui->actionLoad_paths->setEnabled(false);
ui->actionExport_layout->setEnabled(false);
ui->actionLoad_HiC_data->setEnabled(false);
ui->HiCSettingsWidget->setEnabled(false);
ui->HiC_label->setEnabled(false);
break;
case GRAPH_LOADED:
ui->graphDetailsWidget->setEnabled(true);
Expand All @@ -2012,6 +2014,11 @@ void MainWindow::setUiState(UiState uiState)
ui->actionLoad_paths->setEnabled(true);
ui->actionExport_layout->setEnabled(false);
ui->actionLoad_HiC_data->setEnabled(true);
if (g_settings->multyGraphMode) {
ui->moreInfoButton->setEnabled(false);
} else {
ui->moreInfoButton->setEnabled(true);
}
break;
case GRAPH_DRAWN:
ui->graphDetailsWidget->setEnabled(true);
Expand All @@ -2028,6 +2035,11 @@ void MainWindow::setUiState(UiState uiState)
ui->actionLoad_paths->setEnabled(true);
ui->actionExport_layout->setEnabled(true);
ui->actionLoad_HiC_data->setEnabled(true);
if (g_settings->multyGraphMode) {
ui->moreInfoButton->setEnabled(false);
} else {
ui->moreInfoButton->setEnabled(true);
}
break;
}
}
Expand Down Expand Up @@ -3183,10 +3195,8 @@ void MainWindow::loadHiC(QString fullFileName) {

void MainWindow::setHiCWidgetVisibility(bool visible)
{
//ui->hicSeqLenInfoText->setVisible(visible);
ui->hicSeqLenSpinBox->setVisible(visible);
//ui->hicWeightInfoText->setVisible(visible);
ui->hicWeightSpinBox->setVisible(visible);
ui->HiCSettingsWidget->setEnabled(visible);
ui->HiC_label->setEnabled(visible);
}

void MainWindow::hicInclusionFilterChanged() {
Expand Down
Loading

0 comments on commit 313dd86

Please sign in to comment.