Skip to content

Commit

Permalink
fmt all the components
Browse files Browse the repository at this point in the history
  • Loading branch information
yuyi98 committed Oct 20, 2023
1 parent 6dfcc90 commit 4e3a119
Show file tree
Hide file tree
Showing 14 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion component/accordion.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import gx
[heap]
pub struct AccordionComponent {
pub mut:
layout &ui.Stack = unsafe { nil }
layout &ui.Stack = unsafe { nil }
// required
titles map[string]string
selected map[string]bool
Expand Down
6 changes: 3 additions & 3 deletions component/colorbox.v
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@ mut:
// options
light bool
// light theme
hsl bool
hsl bool
// use hsl instead of hsv
drag bool
drag bool
// drag mode for canvas on h
pub mut:
layout &ui.Stack = unsafe { nil }
layout &ui.Stack = unsafe { nil }
// required
cv_h &ui.CanvasLayout = unsafe { nil }
cv_sv &ui.CanvasLayout = unsafe { nil }
Expand Down
10 changes: 5 additions & 5 deletions component/colorbutton.v
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ pub struct ColorButtonParams {
tooltip_side ui.Side = .top
radius f64
// = 5.0
padding f64
left_side bool
bg_color &gx.Color = unsafe { nil }
on_click ColorButtonFn = ColorButtonFn(0)
on_changed ColorButtonFn = ColorButtonFn(0)
padding f64
left_side bool
bg_color &gx.Color = unsafe { nil }
on_click ColorButtonFn = ColorButtonFn(0)
on_changed ColorButtonFn = ColorButtonFn(0)
}

// TODO: documentation
Expand Down
6 changes: 3 additions & 3 deletions component/colorpalette.v
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ import math
[heap]
pub struct ColorPaletteComponent {
pub mut:
id string
layout &ui.Stack = unsafe { nil }
id string
layout &ui.Stack = unsafe { nil }
// required
colbtn &ui.Button = unsafe { nil }
colbtn &ui.Button = unsafe { nil }
// current
ncolors int
alpha &AlphaComponent = unsafe { nil }
Expand Down
2 changes: 1 addition & 1 deletion component/colorsliders.v
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type ColorSlidersFn = fn (cs &ColorSlidersComponent)
pub struct ColorSlidersComponent {
id string
pub mut:
layout &ui.Stack = unsafe { nil }
layout &ui.Stack = unsafe { nil }
// required
orientation ui.Orientation
r_slider &ui.Slider = unsafe { nil }
Expand Down
6 changes: 3 additions & 3 deletions component/demo.v
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import ui
[heap]
pub struct DemoComponent {
pub mut:
layout &ui.Stack = unsafe { nil }
layout &ui.Stack = unsafe { nil }
// required
tb_text string = 'textbox text'
tbm_text string = 'textbox multilines text\nsecond line\n' + ('blah blah'.repeat(10) +
tb_text string = 'textbox text'
tbm_text string = 'textbox multilines text\nsecond line\n' + ('blah blah'.repeat(10) +
'blah\n').repeat(20)
}

Expand Down
2 changes: 1 addition & 1 deletion component/double_listbox.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import ui
[heap]
pub struct DoubleListBoxComponent {
pub mut:
layout &ui.Stack = unsafe { nil }
layout &ui.Stack = unsafe { nil }
// required
lb_left &ui.ListBox = unsafe { nil }
lb_right &ui.ListBox = unsafe { nil }
Expand Down
24 changes: 12 additions & 12 deletions component/filebrowser.v
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ pub mut:

[params]
pub struct FileBrowserParams {
id string
dirs []string = [os.expand_tilde_to_home('~'), '/']
text_ok string = 'Ok'
text_cancel string = 'Cancel'
height int = int(ui.compact)
width int = int(ui.compact)
z_index int
folder_only bool
filter_types []string
with_fpath bool
hidden bool
bg_color gx.Color = gx.red
id string
dirs []string = [os.expand_tilde_to_home('~'), '/']
text_ok string = 'Ok'
text_cancel string = 'Cancel'
height int = int(ui.compact)
width int = int(ui.compact)
z_index int
folder_only bool
filter_types []string
with_fpath bool
hidden bool
bg_color gx.Color = gx.red
// gx.hex(0xfcf4e4ff)
on_click_ok ui.ButtonFn = ui.ButtonFn(0)
on_click_cancel ui.ButtonFn = ui.ButtonFn(0)
Expand Down
2 changes: 1 addition & 1 deletion component/fontchooser.v
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct FontChooserComponent {
pub mut:
layout &ui.Stack = unsafe { nil }
// required
dtw ui.DrawTextWidget
dtw ui.DrawTextWidget
}

[params]
Expand Down
2 changes: 1 addition & 1 deletion component/grid.v
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub mut:
// height
cell_height int
// when > 0 all cells have same height to speed up visible_cells
min_height int
min_height int
// index for swap of rows
index []int
// current
Expand Down
8 changes: 4 additions & 4 deletions component/grid_formula.v
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ struct GridCellBlock {

struct GridFormulaMngr {
mut:
formulas map[string]GridFormula
formulas map[string]GridFormula
// list of formula: key string is the alphacell of the formula
active_cell_to_formula map[string]string
// key string is "Block cells" or a "Cell" and the value string is the formula cell (AlphaCell)
active_cells []ActiveCells
cells_to_activate []AlphaCell
sel_formula string
active_cells []ActiveCells
cells_to_activate []AlphaCell
sel_formula string
}

// constructor
Expand Down
2 changes: 1 addition & 1 deletion component/rasterview.v
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub mut:
// height int
// channels int = 4
// data []byte
size int = 11
size int = 11
// pixel_size + inter
inter int = 1
pixel_size int = 10
Expand Down
4 changes: 2 additions & 2 deletions component/tabs.v
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ enum TabsMode {
[heap]
pub struct TabsComponent {
pub mut:
id string
layout &ui.Stack = unsafe { nil }
id string
layout &ui.Stack = unsafe { nil }
// required
active string
prev_active string
Expand Down
4 changes: 2 additions & 2 deletions component/treeview.v
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ type TreeViewClickFn = fn (c &ui.CanvasLayout, mut tv TreeViewComponent)
[heap]
pub struct TreeViewComponent {
pub mut:
id string
layout &ui.Stack = unsafe { nil }
id string
layout &ui.Stack = unsafe { nil }
// required
trees []Tree
icon_paths map[string]string
Expand Down

0 comments on commit 4e3a119

Please sign in to comment.