summaryrefslogtreecommitdiffstats
path: root/scene/gui/gradient_edit.h
diff options
context:
space:
mode:
authorRémi Verschelde <remi@verschelde.fr>2021-10-04 16:12:52 +0200
committerGitHub <noreply@github.com>2021-10-04 16:12:52 +0200
commit865b62b1cddbb7989bc520eed2d8428c6923fee9 (patch)
tree5e021d90f23d64a161bec950593766d1b8aaa365 /scene/gui/gradient_edit.h
parent2a09e119864432b0074941eb7eba802c08faa72a (diff)
parentbdbb7b3999cddc821489d11350ad21bf89af5a42 (diff)
downloadredot-engine-865b62b1cddbb7989bc520eed2d8428c6923fee9.tar.gz
Merge pull request #53341 from pycbouh/gui-editor-scale-encapsulation
Diffstat (limited to 'scene/gui/gradient_edit.h')
-rw-r--r--scene/gui/gradient_edit.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/gui/gradient_edit.h b/scene/gui/gradient_edit.h
index a173631963..f3a39daaf6 100644
--- a/scene/gui/gradient_edit.h
+++ b/scene/gui/gradient_edit.h
@@ -46,6 +46,13 @@ class GradientEdit : public Control {
int grabbed = -1;
Vector<Gradient::Point> points;
+ // Make sure to use the scaled value below.
+ const int BASE_SPACING = 3;
+ const int BASE_POINT_WIDTH = 8;
+
+ int draw_spacing = BASE_SPACING;
+ int draw_point_width = BASE_POINT_WIDTH;
+
void _draw_checker(int x, int y, int w, int h);
void _color_changed(const Color &p_color);
int _get_point_from_pos(int x);