Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix labels of SPICE netlist sections being rendered too small on some devices #756

Merged
merged 1 commit into from
Jun 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion qucs/components/equation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "extsimkernels/spicecompat.h"
#include "extsimkernels/verilogawriter.h"

#include <QFontInfo>
#include <QFontMetrics>

Equation::Equation()
Expand All @@ -38,7 +39,7 @@ Equation::Equation()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkBlue,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkBlue,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr("Equation"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/incl_script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
***************************************************************************/
#include "incl_script.h"
#include "main.h"
#include <QFontInfo>
#include <QFontMetrics>


Expand All @@ -37,7 +38,7 @@ InclScript::InclScript()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".INCLUDE SCRIPT"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_func.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceFunc::SpiceFunc()
Expand All @@ -37,7 +38,7 @@ SpiceFunc::SpiceFunc()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".FUNC"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_globalpar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_globalpar.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceGlobalParam::SpiceGlobalParam()
Expand All @@ -37,7 +38,7 @@ SpiceGlobalParam::SpiceGlobalParam()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".GLOBAL PARAM"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_ic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_ic.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceIC::SpiceIC()
Expand All @@ -37,7 +38,7 @@ SpiceIC::SpiceIC()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".IC"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_include.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "main.h"
#include "misc.h"

#include <QFontInfo>
#include <QFontMetrics>

S4Q_Include::S4Q_Include()
Expand All @@ -38,7 +39,7 @@ S4Q_Include::S4Q_Include()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".INCLUDE"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_lib.h"
#include "main.h"
#include "misc.h"
#include <QFontInfo>
#include <QFontMetrics>

S4Q_Lib::S4Q_Lib()
Expand All @@ -37,7 +38,7 @@ S4Q_Lib::S4Q_Lib()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".LIB"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_model.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

S4Q_Model::S4Q_Model()
Expand All @@ -39,7 +40,7 @@ S4Q_Model::S4Q_Model()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".MODEL"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_nodeset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_nodeset.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceNodeset::SpiceNodeset()
Expand All @@ -37,7 +38,7 @@ SpiceNodeset::SpiceNodeset()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".NODESET"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_nutmeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_nutmeg.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>
#include <QRegularExpression>

Expand All @@ -38,7 +39,7 @@ NutmegEquation::NutmegEquation()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::blue,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::blue,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr("Nutmeg"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_options.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceOptions::SpiceOptions()
Expand All @@ -37,7 +38,7 @@ SpiceOptions::SpiceOptions()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".OPTIONS"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "sp_parameter.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceParam::SpiceParam()
Expand All @@ -37,7 +38,7 @@ SpiceParam::SpiceParam()
Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".PARAM"),
QColor(0,0,0), 12.0));
QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
3 changes: 2 additions & 1 deletion qucs/spicecomponents/sp_spiceinit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include "sp_spiceinit.h"
#include "main.h"

#include <QFontInfo>
#include <QFontMetrics>

SpiceSpiceinit::SpiceSpiceinit()
Expand All @@ -33,7 +34,7 @@ SpiceSpiceinit::SpiceSpiceinit()

Lines.append(new qucs::Line(-xb, -yb, -xb, yb,QPen(Qt::darkRed,2)));
Lines.append(new qucs::Line(-xb, yb, xb+3,yb,QPen(Qt::darkRed,2)));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".spiceinit"), QColor(0,0,0), 12.0));
Texts.append(new Text(-xb+4, -yb-3, QObject::tr(".spiceinit"), QColor(0,0,0), QFontInfo(f).pixelSize()));

x1 = -xb-3; y1 = -yb-5;
x2 = xb+9; y2 = yb+3;
Expand Down
Loading