Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
David MacDonald
purr-data
Commits
13e45e74
Commit
13e45e74
authored
Mar 03, 2012
by
Ivica Ico Bukvic
Browse files
made sliders a bit prettier
parent
2ee8d29f
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/g_hslider.c
View file @
13e45e74
...
...
@@ -48,8 +48,8 @@ static void hslider_draw_update(t_gobj *client, t_glist *glist)
{
int
r
=
text_xpix
(
&
x
->
x_gui
.
x_obj
,
glist
)
+
(
x
->
x_val
+
50
)
/
100
;
sys_vgui
(
".x%lx.c coords %lxKNOB %d %d %d %d
\n
"
,
canvas
,
x
,
r
,
ypos
+
1
,
r
,
ypos
+
x
->
x_gui
.
x_h
);
canvas
,
x
,
r
,
ypos
+
2
,
r
,
ypos
+
x
->
x_gui
.
x_h
-
1
);
if
(
x
->
x_val
==
x
->
x_center
)
{
if
(
!
x
->
x_thick
)
...
...
@@ -101,8 +101,8 @@ static void hslider_draw_new(t_hslider *x, t_glist *glist)
xpos
+
x
->
x_gui
.
x_w
+
2
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxHSLDR text}
\n
"
,
canvas
,
r
,
ypos
+
1
,
r
,
ypos
+
x
->
x_gui
.
x_h
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
canvas
,
r
,
ypos
+
2
,
r
,
ypos
+
x
->
x_gui
.
x_h
-
1
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} %d %s} -fill #%6.6x -tags {%lxLABEL %lxHSLDR text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
...
...
@@ -148,8 +148,8 @@ static void hslider_draw_move(t_hslider *x, t_glist *glist)
xpos
-
3
,
ypos
,
xpos
+
x
->
x_gui
.
x_w
+
2
,
ypos
+
x
->
x_gui
.
x_h
);
sys_vgui
(
".x%lx.c coords %lxKNOB %d %d %d %d
\n
"
,
canvas
,
x
,
r
,
ypos
+
1
,
r
,
ypos
+
x
->
x_gui
.
x_h
);
canvas
,
x
,
r
,
ypos
+
2
,
r
,
ypos
+
x
->
x_gui
.
x_h
-
1
);
sys_vgui
(
".x%lx.c coords %lxLABEL %d %d
\n
"
,
canvas
,
x
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
...
...
src/g_vslider.c
View file @
13e45e74
...
...
@@ -47,8 +47,8 @@ static void vslider_draw_update(t_gobj *client, t_glist *glist)
int
xpos
=
text_xpix
(
&
x
->
x_gui
.
x_obj
,
glist
);
sys_vgui
(
".x%lx.c coords %lxKNOB %d %d %d %d
\n
"
,
glist_getcanvas
(
glist
),
x
,
xpos
+
1
,
r
,
xpos
+
x
->
x_gui
.
x_w
,
r
);
glist_getcanvas
(
glist
),
x
,
xpos
+
2
,
r
,
xpos
+
x
->
x_gui
.
x_w
-
1
,
r
);
}
}
...
...
@@ -84,8 +84,8 @@ static void vslider_draw_new(t_vslider *x, t_glist *glist)
xpos
+
x
->
x_gui
.
x_w
,
ypos
+
x
->
x_gui
.
x_h
+
3
,
x
->
x_gui
.
x_bcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create line %d %d %d %d -width 3 -fill #%6.6x -tags {%lxKNOB %lxVSLDR text}
\n
"
,
canvas
,
xpos
+
1
,
r
,
xpos
+
x
->
x_gui
.
x_w
,
r
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
canvas
,
xpos
+
2
,
r
,
xpos
+
x
->
x_gui
.
x_w
-
1
,
r
,
x
->
x_gui
.
x_fcol
,
x
,
x
);
sys_vgui
(
".x%lx.c create text %d %d -text {%s} -anchor w \
-font {{%s} %d %s} -fill #%6.6x -tags {%lxLABEL %lxVSLDR text}
\n
"
,
canvas
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
,
...
...
@@ -134,8 +134,8 @@ static void vslider_draw_move(t_vslider *x, t_glist *glist)
xpos
,
ypos
-
2
,
xpos
+
x
->
x_gui
.
x_w
,
ypos
+
x
->
x_gui
.
x_h
+
3
);
sys_vgui
(
".x%lx.c coords %lxKNOB %d %d %d %d
\n
"
,
canvas
,
x
,
xpos
+
1
,
r
,
xpos
+
x
->
x_gui
.
x_w
,
r
);
canvas
,
x
,
xpos
+
2
,
r
,
xpos
+
x
->
x_gui
.
x_w
-
1
,
r
);
sys_vgui
(
".x%lx.c coords %lxLABEL %d %d
\n
"
,
canvas
,
x
,
xpos
+
x
->
x_gui
.
x_ldx
,
ypos
+
x
->
x_gui
.
x_ldy
);
if
(
!
x
->
x_gui
.
x_fsf
.
x_snd_able
)
...
...
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