Skip to content

Commit

Permalink
Merge pull request #17 from malisipi/native-for-windows
Browse files Browse the repository at this point in the history
Native theme for Win11 & Linux
  • Loading branch information
malisipi committed Feb 13, 2023
2 parents 8377046 + 9d91b94 commit 806e779
Show file tree
Hide file tree
Showing 42 changed files with 466 additions and 902 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,9 @@ For Windows;
## How to use TCC on Windows?

* If you're using webview sub-module, TCC never works. But you can still use TCC for Windows to compile faster.
* You need full winapi for TCC. [winapi-full-for-0.9.27.zip at download-mirror.savannah.gnu.org](https://download-mirror.savannah.gnu.org/releases/tinycc/) Download it and extract to somewhere that not include spaces.
* ```v -cc tcc -cflags "-isystem path\to\winapi-full-for-0.9.27\include\winapi" run example.v```
* You need full winapi for TCC. [winapi-full-for-0.9.27.zip at download-mirror.savannah.gnu.org](https://download-mirror.savannah.gnu.org/releases/tinycc/) Download it and extract.
* Move ```path\to\winapi-full-for-0.9.27\include\winapi``` to ```C:\winapi```.
* ```v -cc tcc run example.v```
* And it's works like a charm.

## Suggestions
Expand Down
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 button.v
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub fn add_button(mut app &Window, text string, id string, x IntOrString, y IntO
[unsafe]
fn draw_button(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)
app.gg.draw_text(object["x"].num+object["w"].num/2, object["y"].num+object["h"].num/2, object["text"].str, gx.TextCfg{
color: object["fg"].clr
size: object["tSize"].num
Expand Down
4 changes: 2 additions & 2 deletions checkbox.v
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ pub fn add_checkbox(mut app &Window, text string, id string, x IntOrString, y In
[unsafe]
fn draw_checkbox(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)
if object["c"].bol{
app.gg.draw_rect_filled(object["x"].num+2, object["y"].num+2, object["w"].num-4, object["h"].num-4, object["bfg"].clr)
app.gg.draw_rounded_rect_filled(object["x"].num+2, object["y"].num+2, object["w"].num-4, object["h"].num-4, app.round_corners, object["bfg"].clr)
}
app.gg.draw_text(object["x"].num+object["w"].num+4, object["y"].num+object["h"].num/2, object["text"].str, gx.TextCfg{
color: object["fg"].clr
Expand Down
Loading

0 comments on commit 806e779

Please sign in to comment.