Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
1d282b89
Commit
1d282b89
authored
Jun 05, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Made dashed line shorter.
parent
5395f175
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
25 deletions
+10
-25
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+9
-23
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+1
-2
No files found.
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
1d282b89
...
@@ -789,35 +789,21 @@ void FlowDrawQt::get_painter(int painter_type, int size)
...
@@ -789,35 +789,21 @@ void FlowDrawQt::get_painter(int painter_type, int size)
{
{
painter.setBrush(QBrush(draw_type_to_color(this, painter_type)));
painter.setBrush(QBrush(draw_type_to_color(this, painter_type)));
painter.setBackground(QBrush(this->background));
painter.setBackground(QBrush(this->background));
switch (painter_type) {
painter.setPen(QPen(painter.brush(), size + 1));
case flow_eDrawType_LineDashed:
case flow_eDrawType_LineDashedRed: {
if (painter_type == flow_eDrawType_LineDashed ||
QPen pen = QPen(painter.brush(), size + 1, Qt::DashLine);
painter_type == flow_eDrawType_LineDashedRed) {
QPen pen = painter.pen();
QVector<double> dashes;
QVector<double> dashes;
dashes <<
7 + size << 7 + size
;
dashes <<
(7 + size) / pen.widthF() << (7 + size) / pen.widthF()
;
pen.setDashPattern(dashes);
pen.setDashPattern(dashes);
painter.setPen(pen);
painter.setPen(pen);
return;
}
}
case flow_eDrawType_TextHelvetica:
case flow_eDrawType_TextHelveticaBold:
if (painter_type >= flow_eDrawType_TextHelvetica &&
case flow_eDrawType_TextHelveticaErase:
painter_type <= flow_eDrawType_TextHelveticaEraseBold) {
case flow_eDrawType_TextHelveticaEraseBold: {
painter.setPen(QPen(painter.brush(), size + 1));
int sizes[9] = {8, 10, 12, 14, 14, 18, 18, 18, 24};
int sizes[9] = {8, 10, 12, 14, 14, 18, 18, 18, 24};
painter.setFont(get_font(painter_type, sizes[size], "Helvetica"));
painter.setFont(get_font(painter_type, sizes[size], "Helvetica"));
return;
}
case flow_eDrawType_Green:
case flow_eDrawType_Yellow:
case flow_eDrawType_DarkGray:
case flow_eDrawType_Line:
case flow_eDrawType_LineErase:
case flow_eDrawType_LineRed:
case flow_eDrawType_LineGray:
default:
painter.setPen(QPen(painter.brush(), size + 1));
return;
}
}
}
}
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
1d282b89
...
@@ -168,9 +168,8 @@ void GlowDrawQt::get_painter(int painter_type, int size)
...
@@ -168,9 +168,8 @@ void GlowDrawQt::get_painter(int painter_type, int size)
if (painter_type == glow_eDrawType_LineDashed ||
if (painter_type == glow_eDrawType_LineDashed ||
painter_type == glow_eDrawType_LineDashedRed) {
painter_type == glow_eDrawType_LineDashedRed) {
QPen pen = painter.pen();
QPen pen = painter.pen();
pen.setStyle(Qt::DashLine);
QVector<double> dashes;
QVector<double> dashes;
dashes <<
7 + size << 7 + size
;
dashes <<
(7 + size) / pen.widthF() << (7 + size) / pen.widthF()
;
pen.setDashPattern(dashes);
pen.setDashPattern(dashes);
painter.setPen(pen);
painter.setPen(pen);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment