Skip to content

Commit

Permalink
Add graph,spinner round support&Update dark colors
Browse files Browse the repository at this point in the history
  • Loading branch information
malisipi committed Feb 10, 2023
1 parent 7d3f91c commit 192c21e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion area_graph.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn add_area_graph(mut app &Window, id string, x IntOrString, y IntOrString,
[unsafe]
fn draw_area_graph(app &Window, object map[string]WindowData){
unsafe{
app.gg.draw_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, object["bg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, app.round_corners, object["bg"].clr)
labels:=object["g_lbl"].str.split("\0")
datas:=object["g_dat"].dat
colors:=object["g_clr"].lcr
Expand Down
2 changes: 1 addition & 1 deletion line_graph.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn add_line_graph(mut app &Window, id string, x IntOrString, y IntOrString,
[unsafe]
fn draw_line_graph(app &Window, object map[string]WindowData){
unsafe{
app.gg.draw_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, object["bg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, app.round_corners, object["bg"].clr)
labels:=object["g_lbl"].str.split("\0")
datas:=object["g_dat"].dat
colors:=object["g_clr"].lcr
Expand Down
2 changes: 1 addition & 1 deletion mui.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ pub fn create(args &WindowConfig) &Window {
if user_light_theme {
[gx.Color{r:240,g:240,b:240}, gx.Color{r:253,g:253,b:253}, gx.Color{r:0,g:120,b:212}, gx.Color{r:0,g:0,b:0}], true
} else {
[gx.Color{r:32,g:33,b:36}, gx.Color{r:53,g:54,b:58}, gx.Color{r:0,g:120,b:212}, gx.Color{r:243,g:243,b:243}], false
[gx.Color{r:32,g:33,b:36}, gx.Color{r:53,g:54,b:58}, gx.Color{r:69,g:178,b:235}, gx.Color{r:243,g:243,b:243}], false
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions spinner.v
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ pub fn add_spinner(mut app &Window, text string, id string, placeholder string,
[unsafe]
fn draw_spinner(app &Window, object map[string]WindowData){
unsafe{
app.gg.draw_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, object["bg"].clr)
app.gg.draw_rect_filled(object["x"].num+2, object["y"].num+2, object["w"].num-20, object["h"].num-4, object["bfg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num, object["y"].num, object["w"].num, object["h"].num, app.round_corners, object["bg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num+2, object["y"].num+2, object["w"].num-20, object["h"].num-4, app.round_corners, object["bfg"].clr)

if app.focus!=object["id"].str{
mut the_text:=object["text"].str.replace("\0","")
Expand Down Expand Up @@ -65,14 +65,14 @@ fn draw_spinner(app &Window, object map[string]WindowData){
})
}

app.gg.draw_rect_filled(object["x"].num + object["w"].num - 16, object["y"].num, 16, object["h"].num / 2 - 1, object["bfg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num + object["w"].num - 16, object["y"].num, 16, object["h"].num / 2 - 1, app.round_corners, object["bfg"].clr)
app.gg.draw_triangle_filled(
object["x"].num+object["w"].num-13, object["y"].num+object["h"].num/4+5-1,
object["x"].num+object["w"].num-3 , object["y"].num+object["h"].num/4+5-1,
object["x"].num+object["w"].num-8, object["y"].num+object["h"].num/4-5-1,
object["fg"].clr)

app.gg.draw_rect_filled(object["x"].num + object["w"].num - 16, object["y"].num + object["h"].num / 2 + 1, 16, object["h"].num / 2 - 1, object["bfg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num + object["w"].num - 16, object["y"].num + object["h"].num / 2 + 1, 16, object["h"].num / 2 - 1, app.round_corners, object["bfg"].clr)
app.gg.draw_triangle_filled(
object["x"].num+object["w"].num-13, object["y"].num+object["h"].num/4*3-5+1,
object["x"].num+object["w"].num-3 , object["y"].num+object["h"].num/4*3-5+1,
Expand Down

0 comments on commit 192c21e

Please sign in to comment.