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
997988d8
Commit
997988d8
authored
Jun 04, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Brighten up the green color somewhat.
parent
db528a1c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
24 deletions
+12
-24
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+9
-15
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+3
-9
No files found.
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
997988d8
...
...
@@ -63,12 +63,6 @@ static FlowCtx* last_ctx;
static QMouseEvent* last_event;
static QWidget* last_target;
static QColor flow_allocate_color(const char* named_color)
{
QColor color(named_color);
return color.isValid() ? color : Qt::black;
}
static QColor draw_type_to_color(FlowDrawQt* draw_ctx, int painter_type)
{
switch (painter_type) {
...
...
@@ -83,17 +77,17 @@ static QColor draw_type_to_color(FlowDrawQt* draw_ctx, int painter_type)
return draw_ctx->background;
case flow_eDrawType_LineRed:
case flow_eDrawType_LineDashedRed:
return
flow_allocate_color("red"
);
return
QColor(255, 0, 0
);
case flow_eDrawType_LineGray:
return
flow_allocate_color("gray"
);
return
QColor(160, 160, 160
);
case flow_eDrawType_Green:
return
flow_allocate_color("green"
);
return
QColor(0, 255, 0
);
case flow_eDrawType_Yellow:
return
flow_allocate_color("yellow"
);
return
QColor(255, 255, 0
);
case flow_eDrawType_DarkGray:
return
flow_allocate_color("gray28"
);
return
QColor(128, 128, 128
);
default:
return
flow_allocate_color("black"
);
return
QColor(0, 0, 0
);
}
}
...
...
@@ -193,7 +187,7 @@ FlowDrawQt::FlowDrawQt(QWidget* x_toplevel, void** flow_ctx,
assert(dynamic_cast<QtScrollWidgetFlow*>(toplevel) != NULL);
ctx->mw = dynamic_cast<QtScrollWidgetFlow*>(toplevel);
foreground =
flow_allocate_color("black"
);
foreground =
QColor(0, 0, 0
);
set_white_background();
...
...
@@ -921,7 +915,7 @@ void FlowDrawQt::text(int x, int y, char* text, int len, flow_eDrawType painter_
{
get_painter(painter_type, idx);
if (dimmed) {
painter.setBrush(QBrush(
flow_allocate_color("gray"
)));
painter.setBrush(QBrush(
QColor(160, 160, 160
)));
painter.setPen(QPen(painter.brush(), size+1));
}
...
...
@@ -1118,7 +1112,7 @@ void FlowDrawQt::set_click_sensitivity(int value)
void FlowDrawQt::set_white_background()
{
background =
flow_allocate_color("white"
);
background =
QColor(255, 255, 255
);
QPalette pal;
pal.setColor(QPalette::Background, background);
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
997988d8
...
...
@@ -64,12 +64,6 @@
static QMouseEvent* last_event;
static QWidget* last_target;
static QColor glow_allocate_named_color(const char* named_color)
{
QColor color = QColor(named_color);
return color.isValid() ? color : Qt::black;
}
static QColor glow_allocate_custom_color(GlowDrawQt *draw_ctx,
glow_eDrawType drawtype, int r, int g, int b)
{
...
...
@@ -94,16 +88,16 @@ static QColor draw_type_to_color(
case glow_eDrawType_LineDashed:
case glow_eDrawType_TextHelvetica:
case glow_eDrawType_TextHelveticaBold:
return
glow_allocate_named_color("black"
);
return
QColor(0, 0, 0
);
case glow_eDrawType_LineErase:
case glow_eDrawType_TextHelveticaErase:
case glow_eDrawType_TextHelveticaEraseBold:
return draw_ctx->background;
case glow_eDrawType_LineRed:
case glow_eDrawType_LineDashedRed:
return
glow_allocate_named_color("red"
);
return
QColor(255, 0, 0
);
case glow_eDrawType_LineGray:
return
glow_allocate_named_color("gray"
);
return
QColor(160, 160, 160
);
default: {
if (painter_type >= glow_eDrawType_Color4
&& painter_type <= glow_eDrawType_Color300) {
...
...
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