Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
35b6e7e2
Unverified
Commit
35b6e7e2
authored
Dec 16, 2017
by
Rémi Verschelde
Committed by
GitHub
Dec 16, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14707 from poke1024/fix14691
Fix thin lines in editor gui on hidpi (issue 14691)
parents
cf7bd1a7
3b79529c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
rich_text_label.cpp
scene/gui/rich_text_label.cpp
+10
-1
tree.cpp
scene/gui/tree.cpp
+12
-2
No files found.
scene/gui/rich_text_label.cpp
View file @
35b6e7e2
...
...
@@ -31,6 +31,11 @@
#include "os/keyboard.h"
#include "os/os.h"
#include "scene/scene_string_names.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
#endif
RichTextLabel
::
Item
*
RichTextLabel
::
_get_next_item
(
Item
*
p_item
,
bool
p_free
)
{
if
(
p_free
)
{
...
...
@@ -370,7 +375,11 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
Color
uc
=
color
;
uc
.
a
*=
0.5
;
int
uy
=
y
+
lh
-
fh
+
ascent
+
2
;
VS
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
p_ofs
+
Point2
(
align_ofs
+
pofs
,
uy
),
p_ofs
+
Point2
(
align_ofs
+
pofs
+
cw
,
uy
),
uc
);
float
underline_width
=
1.0
;
#ifdef TOOLS_ENABLED
underline_width
*=
EDSCALE
;
#endif
VS
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
p_ofs
+
Point2
(
align_ofs
+
pofs
,
uy
),
p_ofs
+
Point2
(
align_ofs
+
pofs
+
cw
,
uy
),
uc
,
underline_width
);
}
ofs
+=
cw
;
}
...
...
scene/gui/tree.cpp
View file @
35b6e7e2
...
...
@@ -30,6 +30,7 @@
#include "tree.h"
#include <limits.h>
#include "math_funcs.h"
#include "os/input.h"
#include "os/keyboard.h"
#include "os/os.h"
...
...
@@ -37,6 +38,10 @@
#include "project_settings.h"
#include "scene/main/viewport.h"
#ifdef TOOLS_ENABLED
#include "editor/editor_node.h"
#endif
void
TreeItem
::
move_to_top
()
{
if
(
!
parent
||
parent
->
childs
==
this
)
...
...
@@ -1412,9 +1417,14 @@ int Tree::draw_item(const Point2i &p_pos, const Point2 &p_draw_ofs, const Size2
if
(
c
->
get_children
()
!=
NULL
)
root_pos
-=
Point2i
(
cache
.
arrow
->
get_width
(),
0
);
float
line_width
=
1.0
;
#ifdef TOOLS_ENABLED
line_width
*=
EDSCALE
;
#endif
Point2i
parent_pos
=
Point2i
(
parent_ofs
-
cache
.
arrow
->
get_width
()
/
2
,
p_pos
.
y
+
label_h
/
2
+
cache
.
arrow
->
get_height
()
/
2
)
-
cache
.
offset
+
p_draw_ofs
;
VisualServer
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
root_pos
,
Point2i
(
parent_pos
.
x
,
root_pos
.
y
),
cache
.
relationship_line_color
);
VisualServer
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
Point2i
(
parent_pos
.
x
,
root_pos
.
y
),
parent_pos
,
cache
.
relationship_line_color
);
VisualServer
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
root_pos
,
Point2i
(
parent_pos
.
x
-
Math
::
floor
(
line_width
/
2
),
root_pos
.
y
),
cache
.
relationship_line_color
,
line_width
);
VisualServer
::
get_singleton
()
->
canvas_item_add_line
(
ci
,
Point2i
(
parent_pos
.
x
,
root_pos
.
y
),
parent_pos
,
cache
.
relationship_line_color
,
line_width
);
}
int
child_h
=
draw_item
(
children_pos
,
p_draw_ofs
,
p_draw_size
,
c
);
...
...
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