From a5ea4f19309ff102384ed553a60b222916dbe39b Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Fri, 25 Nov 2022 10:58:27 -0500 Subject: [PATCH] Fix spelling (...and a couple of grammar issues) --- Alignment.go | 6 +++--- Canvas.go | 2 +- ClickableWidgets.go | 10 +++++----- CodeEditor.go | 2 +- Context_test.go | 4 ++-- Events.go | 2 +- Flags.go | 2 +- FontAtlasProsessor.go | 2 +- ImageWidgets.go | 8 ++++---- InputHandler.go | 8 ++++---- InputHandler_test.go | 22 +++++++++++----------- Layout.go | 2 +- ListClipper.go | 2 +- MasterWindow.go | 6 +++--- MemoryEditor.go | 4 ++-- Msgbox.go | 2 +- Popups.go | 2 +- README.md | 5 ++++- SliderWidgets.go | 6 +++--- SplitLayout.go | 4 ++-- StackWidget.go | 4 ++-- TextWidgets.go | 8 ++++---- Widgets.go | 4 ++-- Window.go | 8 ++++---- cmd/gmdeploy/main.go | 6 +++--- examples/align/align.go | 4 ++-- examples/customwidget/customwidget.go | 2 +- 27 files changed, 70 insertions(+), 67 deletions(-) diff --git a/Alignment.go b/Alignment.go index e4ff83a9..23e9ac19 100644 --- a/Alignment.go +++ b/Alignment.go @@ -19,7 +19,7 @@ const ( type AlignmentType byte const ( - // AlignLeft is here just for clearity. + // AlignLeft is here just for clarity. // if set, no action is taken so don't use it. AlignLeft AlignmentType = iota // AlignCenter centers widget. @@ -119,7 +119,7 @@ func (a *AlignmentSetter) Build() { } a.layout.Range(func(item Widget) { - // if item is inil, just skip it + // if item is nil, just skip it if item == nil { return } @@ -168,7 +168,7 @@ func (a *AlignmentSetter) Build() { // // This function is just a workaround used in giu. // -// NOTE: user-definied widgets, which contains more than one +// NOTE: user-defined widgets, which contains more than one // giu widget will be processed incorrectly (only width of the last built // widget will be processed) // diff --git a/Canvas.go b/Canvas.go index d0f27b24..92c38efc 100644 --- a/Canvas.go +++ b/Canvas.go @@ -37,7 +37,7 @@ type DrawFlags int // draw flags enum:. const ( DrawFlagsNone DrawFlags = 0 - // PathStroke(), AddPolyline(): specify that shape should be closed (portant: this is always == 1 for legacy reason). + // PathStroke(), AddPolyline(): specify that shape should be closed (note: this is always == 1 for legacy reasons). DrawFlagsClosed DrawFlags = 1 << 0 // AddRect(), AddRectFilled(), PathRect(): enable rounding top-left corner only (when rounding > 0.0f, we default to all corners). // Was 0x01. diff --git a/ClickableWidgets.go b/ClickableWidgets.go index 13fba65a..9fc9b9ec 100644 --- a/ClickableWidgets.go +++ b/ClickableWidgets.go @@ -30,7 +30,7 @@ func Button(label string) *ButtonWidget { } } -// Buttonf creates button with formated label +// Buttonf creates button with formatted label // NOTE: works like fmt.Sprintf (see `go doc fmt`). func Buttonf(format string, args ...any) *ButtonWidget { return Button(fmt.Sprintf(format, args...)) @@ -121,7 +121,7 @@ func SmallButton(id string) *SmallButtonWidget { } } -// SmallButtonf allows to set formated label for small button. +// SmallButtonf allows to set formatted label for small button. // It calls SmallButton(fmt.Sprintf(label, args...)). func SmallButtonf(format string, args ...any) *SmallButtonWidget { return SmallButton(fmt.Sprintf(format, args...)) @@ -202,7 +202,7 @@ type ImageButtonWidget struct { onClick func() } -// ImageButton constructs image buton widget. +// ImageButton constructs image button widget. func ImageButton(texture *Texture) *ImageButtonWidget { return &ImageButtonWidget{ texture: texture, @@ -384,7 +384,7 @@ type RadioButtonWidget struct { onChange func() } -// RadioButton creates a radio buton. +// RadioButton creates a radio button. func RadioButton(text string, active bool) *RadioButtonWidget { return &RadioButtonWidget{ text: GenAutoID(text), @@ -432,7 +432,7 @@ func Selectable(label string) *SelectableWidget { } } -// Selectablef creates a selectable widget with formated label. +// Selectablef creates a selectable widget with formatted label. func Selectablef(format string, args ...any) *SelectableWidget { return Selectable(fmt.Sprintf(format, args...)) } diff --git a/CodeEditor.go b/CodeEditor.go index d9fc1929..acc75332 100644 --- a/CodeEditor.go +++ b/CodeEditor.go @@ -53,7 +53,7 @@ func (ce *CodeEditorWidget) ID(id string) *CodeEditorWidget { return ce } -// ShowWhitespaces sets if whitespaces are shown in code editor. +// ShowWhitespaces sets if whitespace is shown in code editor. func (ce *CodeEditorWidget) ShowWhitespaces(s bool) *CodeEditorWidget { ce.getState().editor.SetShowWhitespaces(s) return ce diff --git a/Context_test.go b/Context_test.go index b6e50068..96790293 100644 --- a/Context_test.go +++ b/Context_test.go @@ -91,9 +91,9 @@ func Test_invalidState(t *testing.T) { ctx.cleanState() assert.NotNil(t, GetState[teststate](ctx, state2ID), - "altought state has been accessed during the frame, it has ben deleted by invalidAllState/cleanState") + "although state has been accessed during the frame, it has ben deleted by invalidAllState/cleanState") assert.Nil(t, GetState[teststate](ctx, state1ID), - "altought state hasn't been accessed during the frame, it hasn't ben deleted by invalidAllState/cleanState") + "although state hasn't been accessed during the frame, it hasn't ben deleted by invalidAllState/cleanState") } func Test_GetWidgetIndex(t *testing.T) { diff --git a/Events.go b/Events.go index 6d5364a8..93f37760 100644 --- a/Events.go +++ b/Events.go @@ -2,7 +2,7 @@ package giu import "github.com/AllenDang/imgui-go" -// MouseButton represents imgui.MoseButton. +// MouseButton represents imgui.MouseButton. type MouseButton int // mouse buttons. diff --git a/Flags.go b/Flags.go index 8877c5d9..eca9dfcc 100644 --- a/Flags.go +++ b/Flags.go @@ -331,7 +331,7 @@ const ( ColorEditFlagsAlphaPreview ColorEditFlags = imgui.ColorEditFlagsAlphaPreview // ColorEditFlagsAlphaPreviewHalf displays half opaque / half checkerboard, instead of opaque. ColorEditFlagsAlphaPreviewHalf ColorEditFlags = imgui.ColorEditFlagsAlphaPreviewHalf - // ColorEditFlagsHDR = (WIP) surrently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use + // ColorEditFlagsHDR = (WIP) currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use // ImGuiColorEditFlags_Float flag as well). ColorEditFlagsHDR ColorEditFlags = imgui.ColorEditFlagsHDR // ColorEditFlagsRGB sets the format as RGB. diff --git a/FontAtlasProsessor.go b/FontAtlasProsessor.go index 6ba4d98a..b6aa4a1f 100644 --- a/FontAtlasProsessor.go +++ b/FontAtlasProsessor.go @@ -256,7 +256,7 @@ func (a *FontAtlas) rebuildFontAtlas() { ranges := imgui.NewGlyphRanges() builder := imgui.NewFontGlyphRangesBuilder() - // Because we pre-regestered numbers, so default string map's length should greater then 11. + // Because we pre-registered numbers, so default string map's length should greater then 11. if sb.Len() > len(preRegisterString) { builder.AddText(sb.String()) } else { diff --git a/ImageWidgets.go b/ImageWidgets.go index ade33106..ccbf5d85 100644 --- a/ImageWidgets.go +++ b/ImageWidgets.go @@ -111,7 +111,7 @@ type imageState struct { // Dispose cleans imageState (implements Disposable interface). func (is *imageState) Dispose() { is.texture = nil - // Cancel ongoing image downloaidng + // Cancel ongoing image downloading if is.loading && is.cancel != nil { is.cancel() } @@ -119,7 +119,7 @@ func (is *imageState) Dispose() { var _ Widget = &ImageWithRgbaWidget{} -// ImageWithRgbaWidget wrapps ImageWidget. +// ImageWithRgbaWidget wraps ImageWidget. // It is more useful because it doesn't make you to care about // imgui textures. You can just pass golang-native image.Image and // display it in giu. @@ -312,8 +312,8 @@ func (i *ImageWithURLWidget) Build() { SetState(&Context, i.id, imgState) // Prevent multiple invocation to download image. - downloadContext, cancalFunc := ctx.WithCancel(ctx.Background()) - SetState(&Context, i.id, &imageState{loading: true, cancel: cancalFunc}) + downloadContext, cancelFunc := ctx.WithCancel(ctx.Background()) + SetState(&Context, i.id, &imageState{loading: true, cancel: cancelFunc}) errorFn := func(err error) { SetState(&Context, i.id, &imageState{failure: true}) diff --git a/InputHandler.go b/InputHandler.go index c9172971..b78572a1 100644 --- a/InputHandler.go +++ b/InputHandler.go @@ -1,6 +1,6 @@ package giu -// input menager is used to register a keyboard shortcuts in an app. +// input manager is used to register a keyboard shortcuts in an app. // Shortcut represents a keyboard shortcut. type Shortcut struct { @@ -18,7 +18,7 @@ type WindowShortcut struct { Callback func() } -// ShortcutType represens a type of shortcut (global or local). +// ShortcutType represents a type of shortcut (global or local). type ShortcutType bool const ( @@ -32,11 +32,11 @@ const ( type InputHandlerHandleCallback func(Key, Modifier, Action) // InputHandler is an interface which needs to be implemented -// by user-definied input handlers. +// by user-defined input handlers. type InputHandler interface { // RegisterKeyboardShortcuts adds a specified shortcuts into input handler RegisterKeyboardShortcuts(...Shortcut) - // UnregisterKeyboardShortcuts removes iwndow shourtcuts from input handler + // UnregisterKeyboardShortcuts removes window shortcuts from input handler UnregisterWindowShortcuts() // Handle handles a shortcut Handle(Key, Modifier, Action) diff --git a/InputHandler_test.go b/InputHandler_test.go index 87561cb3..e8524255 100644 --- a/InputHandler_test.go +++ b/InputHandler_test.go @@ -20,8 +20,8 @@ func Test_InputHandle_RegisterKeyboardShortcuts(t *testing.T) { isGlobal ShortcutType cb func() }{ - {"global shourtcut", Key(1), Modifier(2), ShortcutType(true), func() {}}, - {"window shourtcut", Key(9), Modifier(3), ShortcutType(false), func() {}}, + {"global shortcut", Key(1), Modifier(2), ShortcutType(true), func() {}}, + {"window shortcut", Key(9), Modifier(3), ShortcutType(false), func() {}}, } for _, tt := range tests { @@ -44,14 +44,14 @@ func Test_InputHandle_RegisterKeyboardShortcuts(t *testing.T) { a.True(exist, "shortcut wasn't registered in input manager") if tt.isGlobal { // TODO: figure out why it doesn't work - // a.Equal(shortcut.global, tt.cb, "worng shortcut set in input manager") - a.NotNil(shortcut.global, "worng shortcut set in input manager") - a.Nil(shortcut.window, "worng shortcut set in input manager") + // a.Equal(shortcut.global, tt.cb, "wrong shortcut set in input manager") + a.NotNil(shortcut.global, "wrong shortcut set in input manager") + a.Nil(shortcut.window, "wrong shortcut set in input manager") } else { // TODO: figure out why it doesn't work - // a.Equal(shortcut.window, tt.cb, "worng shortcut set in input manager") - a.NotNil(shortcut.window, "worng shortcut set in input manager") - a.Nil(shortcut.global, "worng shortcut set in input manager") + // a.Equal(shortcut.window, tt.cb, "wrong shortcut set in input manager") + a.NotNil(shortcut.window, "wrong shortcut set in input manager") + a.Nil(shortcut.global, "wrong shortcut set in input manager") } }) } @@ -90,9 +90,9 @@ func Test_InputHandler_Handle(t *testing.T) { a.False(shortcut1, "Shortcut 1 was handled, but shouldn't.") a.False(shortcut2, "Shortcut 2 was handled, but shouldn't.") i.Handle(Key(5), Modifier(0), Press) - a.True(shortcut1, "Shortcut 1 was not handled, but shouldn be.") + a.True(shortcut1, "Shortcut 1 was not handled, but should be.") a.False(shortcut2, "Shortcut 2 was handled, but shouldn't.") i.Handle(Key(8), Modifier(2), Press) - a.True(shortcut1, "Shortcut 1 was not handled, but shouldn be.") - a.True(shortcut2, "Shortcut 2 was not handled, but shouldn be.") + a.True(shortcut1, "Shortcut 1 was not handled, but should be.") + a.True(shortcut2, "Shortcut 2 was not handled, but should be.") } diff --git a/Layout.go b/Layout.go index c8b3706b..40c3e52e 100644 --- a/Layout.go +++ b/Layout.go @@ -36,7 +36,7 @@ type Splitable interface { Range(func(w Widget)) } -// Range ranges ofer the Layout, calling rangeFunc +// Range ranges over the Layout, calling rangeFunc // on each loop iteration. func (l Layout) Range(rangeFunc func(Widget)) { for _, w := range l { diff --git a/ListClipper.go b/ListClipper.go index d945cb33..caf1f3e7 100644 --- a/ListClipper.go +++ b/ListClipper.go @@ -7,7 +7,7 @@ import ( var _ Widget = &ListClipperWrapper{} // ListClipperWrapper is a ImGuiListClipper implementation. -// it can be used to diplay a large, vertical list of items and +// it can be used to display a large, vertical list of items and // avoid rendering them. type ListClipperWrapper struct { layout Layout diff --git a/MasterWindow.go b/MasterWindow.go index 8bca6c1f..deff2045 100644 --- a/MasterWindow.go +++ b/MasterWindow.go @@ -12,7 +12,7 @@ import ( "gopkg.in/eapache/queue.v1" ) -// MasterWindowFlags wrapps imgui.GLFWWindowFlags. +// MasterWindowFlags wraps imgui.GLFWWindowFlags. type MasterWindowFlags imgui.GLFWWindowFlags // master window flags. @@ -294,7 +294,7 @@ func (w *MasterWindow) SetCloseCallback(cb func() bool) { w.platform.SetCloseCallback(cb) } -// SetDropCallback sets callback when file was droppend into the window. +// SetDropCallback sets callback when file was dropped into the window. func (w *MasterWindow) SetDropCallback(cb func([]string)) { w.platform.SetDropCallback(cb) } @@ -372,7 +372,7 @@ func (w *MasterWindow) SetTitle(title string) { w.platform.SetTitle(title) } -// Close will savely close the master window. +// Close will safely close the master window. func (w *MasterWindow) Close() { w.SetShouldClose(true) } diff --git a/MemoryEditor.go b/MemoryEditor.go index 89ff3ada..2de0cdc9 100644 --- a/MemoryEditor.go +++ b/MemoryEditor.go @@ -32,13 +32,13 @@ func MemoryEditor() *MemoryEditorWidget { } } -// Contents sets editor's conents. +// Contents sets editor's contents. func (me *MemoryEditorWidget) Contents(contents []byte) *MemoryEditorWidget { me.contents = contents return me } -// Build implements widget inetrface. +// Build implements widget interface. func (me *MemoryEditorWidget) Build() { me.getState().editor.DrawContents(me.contents) } diff --git a/Msgbox.go b/Msgbox.go index b11f4c35..79ae6bb3 100644 --- a/Msgbox.go +++ b/Msgbox.go @@ -3,7 +3,7 @@ package giu import "fmt" // DialogResult represents dialog result -// dialog resullt is bool. if OK/Yes it is true, else (Cancel/No) - false. +// dialog result is bool. if OK/Yes it is true, else (Cancel/No) - false. type DialogResult bool // dialog results. diff --git a/Popups.go b/Popups.go index 7fa25dcb..c28464d5 100644 --- a/Popups.go +++ b/Popups.go @@ -35,7 +35,7 @@ func Popup(name string) *PopupWidget { } } -// Flags sets pupup's flags. +// Flags sets popup's flags. func (p *PopupWidget) Flags(flags WindowFlags) *PopupWidget { p.flags = flags return p diff --git a/README.md b/README.md index 1461351e..d3b39d1c 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ A rapid cross-platform GUI framework for Go based on [Dear ImGui](https://github Any contribution (features, widgets, tutorials, documents, etc...) is appreciated! ## Sponsor + (This library is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added. If you are using giu, please consider reaching out.) Businesses: support continued development and maintenance via invoiced technical support, maintenance, sponsoring contracts: @@ -148,11 +149,12 @@ sudo apt install libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-d ``` on Red Hat based distributions: + ```bash sudo dnf install libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel libGL-devel libXxf86vm-devel ``` -you may also need to install C/C++ compiller (like g++) if it isn't already installed. Follow go compilator prompts. +you may also need to install C/C++ compiler (like g++) if it isn't already installed. Follow go compiler prompts. Then, a simple `go build` will work. @@ -185,6 +187,7 @@ go build -ldflags "-s -w -H=windowsgui -extldflags=-static" . 1. Install mingw-64. on Mac: + ```sh brew install mingw-w64 ``` diff --git a/SliderWidgets.go b/SliderWidgets.go index e6ac798e..aa20c1dc 100644 --- a/SliderWidgets.go +++ b/SliderWidgets.go @@ -59,7 +59,7 @@ func (s *SliderIntWidget) Label(label string) *SliderIntWidget { return s } -// Labelf sets formated label. +// Labelf sets formatted label. func (s *SliderIntWidget) Labelf(format string, args ...any) *SliderIntWidget { return s.Label(fmt.Sprintf(format, args...)) } @@ -135,7 +135,7 @@ func (vs *VSliderIntWidget) Label(label string) *VSliderIntWidget { return vs } -// Labelf sets formated label. +// Labelf sets formatted label. func (vs *VSliderIntWidget) Labelf(format string, args ...any) *VSliderIntWidget { return vs.Label(fmt.Sprintf(format, args...)) } @@ -208,7 +208,7 @@ func (sf *SliderFloatWidget) Label(label string) *SliderFloatWidget { return sf } -// Labelf sets formated label. +// Labelf sets formatted label. func (sf *SliderFloatWidget) Labelf(format string, args ...any) *SliderFloatWidget { return sf.Label(fmt.Sprintf(format, args...)) } diff --git a/SplitLayout.go b/SplitLayout.go index 1cf2221c..fde31193 100644 --- a/SplitLayout.go +++ b/SplitLayout.go @@ -27,7 +27,7 @@ func (s *splitLayoutState) Dispose() { // noop } -// SplitLayoutWidget creates two childs with a line between them. +// SplitLayoutWidget creates two children with a line between them. // This line can be moved by the user to adjust child sizes. type SplitLayoutWidget struct { id string @@ -54,7 +54,7 @@ func SplitLayout(direction SplitDirection, sashPos *float32, layout1, layout2 Wi } } -// Border sets if childs should have borders. +// Border sets if children should have borders. func (s *SplitLayoutWidget) Border(b bool) *SplitLayoutWidget { s.border = b return s diff --git a/StackWidget.go b/StackWidget.go index 8557b63b..d76db976 100644 --- a/StackWidget.go +++ b/StackWidget.go @@ -26,8 +26,8 @@ func (s *StackWidget) Build() { visiblePos := GetCursorScreenPos() // build visible layout - // NOTE: it is important to build the visiblely showed layout before - // building another ones, because the interactive layout widgets + // NOTE: it is important to build the visible layout before + // building other ones, because the interactive layout widgets // (e.g. buttons) should be rendered on top of `stack` layouts := s.layouts diff --git a/TextWidgets.go b/TextWidgets.go index f1b1d683..589a3769 100644 --- a/TextWidgets.go +++ b/TextWidgets.go @@ -70,7 +70,7 @@ func (i *InputTextMultilineWidget) Size(width, height float32) *InputTextMultili return i } -// AutoScrollToBottom Enables/Disables auto scroll to bottoim. +// AutoScrollToBottom Enables/Disables auto scroll to bottom. func (i *InputTextMultilineWidget) AutoScrollToBottom(b bool) *InputTextMultilineWidget { i.scrollToBottom = b return i @@ -151,7 +151,7 @@ func (s *inputTextState) Dispose() { var _ Widget = &InputTextWidget{} -// InputTextWidget is a single-line text iinput. +// InputTextWidget is a single-line text input. type InputTextWidget struct { label string hint string @@ -279,7 +279,7 @@ func (i *InputTextWidget) Build() { var _ Widget = &InputIntWidget{} -// InputIntWidget is an input text field acceptiong intager values only. +// InputIntWidget is an input text field accepting integer values only. type InputIntWidget struct { label string value *int32 @@ -464,7 +464,7 @@ func Labelf(format string, args ...any) *LabelWidget { return Label(fmt.Sprintf(format, args...)) } -// Wrapped determinates if label is frapped. +// Wrapped determines if label is wrapped. func (l *LabelWidget) Wrapped(wrapped bool) *LabelWidget { l.wrapped = wrapped return l diff --git a/Widgets.go b/Widgets.go index 2fd5e15a..c5c87c58 100644 --- a/Widgets.go +++ b/Widgets.go @@ -52,7 +52,7 @@ func (l *RowWidget) Build() { }) } -// SameLine wrapps imgui.SomeLine +// SameLine wraps imgui.SomeLine // Don't use if you don't have to (use RowWidget instead). func SameLine() { imgui.SameLine() @@ -149,7 +149,7 @@ func (cc *ComboCustomWidget) Flags(flags ComboFlags) *ComboCustomWidget { return cc } -// Size sets combo preiview width. +// Size sets combo preview width. func (cc *ComboCustomWidget) Size(width float32) *ComboCustomWidget { cc.width = width return cc diff --git a/Window.go b/Window.go index 095e0b97..3903a7d9 100644 --- a/Window.go +++ b/Window.go @@ -7,8 +7,8 @@ import ( ) // SingleWindow creates one window filling all available space -// in MasterWindow. If SingleWindow is set up, no other windows can't be -// definied. +// in MasterWindow. If SingleWindow is set up, no other windows may be +// defined. func SingleWindow() *WindowWidget { size := Context.platform.DisplaySize() title := fmt.Sprintf("SingleWindow_%d", Context.GetWidgetIndex()) @@ -69,7 +69,7 @@ func Window(title string) *WindowWidget { } } -// IsOpen sets if window widget is `opened` (minimalized). +// IsOpen sets if window widget is `opened` (minimized). func (w *WindowWidget) IsOpen(open *bool) *WindowWidget { w.open = open return w @@ -91,7 +91,7 @@ func (w *WindowWidget) Size(width, height float32) *WindowWidget { // Pos sets the window start position // NOTE: The position could be changed by user later. -// To prevent user from changin window position use +// To prevent user from changing window position use // WIndowFlagsNoMove. func (w *WindowWidget) Pos(x, y float32) *WindowWidget { w.x, w.y = x, y diff --git a/cmd/gmdeploy/main.go b/cmd/gmdeploy/main.go index bd5904e4..f1628d6f 100644 --- a/cmd/gmdeploy/main.go +++ b/cmd/gmdeploy/main.go @@ -12,7 +12,7 @@ import ( func main() { flag.Usage = func() { - fmt.Println("Usage: gmdeploy [os] [icon] [path/to/progject]") + fmt.Println("Usage: gmdeploy [os] [icon] [path/to/project]") fmt.Println("Flags:") flag.PrintDefaults() @@ -23,7 +23,7 @@ func main() { flag.StringVar(&targetOS, "os", runtime.GOOS, "target deploy os [windows, darwin, linux]") var iconPath string - flag.StringVar(&iconPath, "icon", "", "applicatio icon file path") + flag.StringVar(&iconPath, "icon", "", "application icon file path") var upx bool flag.BoolVar(&upx, "upx", false, "use upx to compress executable") @@ -140,7 +140,7 @@ func main() { // Rename icon file name to [appName].icns newIconName := filepath.Join(iconsPath, fmt.Sprintf("%s.icns", appName)) - //nolint:gosec // cp comman - cannot fix + //nolint:gosec // cp command - cannot fix cmd = exec.Command("cp", iconPath, newIconName) runCmd(cmd) } diff --git a/examples/align/align.go b/examples/align/align.go index a75791d9..b2bdb87c 100644 --- a/examples/align/align.go +++ b/examples/align/align.go @@ -19,14 +19,14 @@ func loop() { ), giu.Align(giu.AlignRight).To( - giu.Label("I'm a alined to right label"), + giu.Label("I'm an alined to right label"), giu.InputText(&text), ), giu.Align(giu.AlignRight).To( giu.Label("I'm the label"), giu.Layout{ - giu.Label("I'm th e other label embeded in another layout"), + giu.Label("I'm the other label embedded in another layout"), giu.Label("I'm the next label"), }, giu.Label("I'm the last label"), diff --git a/examples/customwidget/customwidget.go b/examples/customwidget/customwidget.go index 530179de..de19d5b5 100644 --- a/examples/customwidget/customwidget.go +++ b/examples/customwidget/customwidget.go @@ -26,7 +26,7 @@ func (c *CircleButtonWidget) Build() { pos := g.GetCursorPos() - // Calcuate the center point + // Calculate the center point radius := int(width/2 + padding*2) // Place a invisible button to be a placeholder for events