Skip to content

Commit

Permalink
apply stylesheet to input cells again
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel committed Jan 4, 2018
1 parent e5206ef commit f1ce9e9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion OMNotebook/OMNotebookGUI/graphcell.cpp
Expand Up @@ -777,6 +777,10 @@ namespace IAEX {
void GraphCell::createGraphCell()
{
input_ = new MyTextEdit2a( mainWidget() );
Stylesheet *sheet = Stylesheet::instance( "stylesheet.xml" );
CellStyle style = sheet->getStyle( "Input" );
input_->setFont(style.textCharFormat()->font());

mpModelicaTextHighlighter = new ModelicaTextHighlighter(input_->document());
variableButton = new QPushButton("D",input_);
variableButton->setToolTip(tr("New simulation data available"));
Expand Down Expand Up @@ -1404,7 +1408,7 @@ namespace IAEX {
{
int lineCount = input_->document()->lineCount() + 1;
QFontMetrics fm(input_->font());
int lineSpacing = fm.lineSpacing();
int lineSpacing = fm.lineSpacing()+1;
int height = lineCount * lineSpacing;

input_->setMinimumHeight(height);
Expand Down

0 comments on commit f1ce9e9

Please sign in to comment.