Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions desktop/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ toolchain go1.27.4
require (
github.com/creack/pty v1.1.24
github.com/tailscale/hujson v0.0.0-20260727124030-b80ff77dac4f
github.com/vivaui/viva v0.6.8-0.20261123124712-471ea7ab5f81
github.com/vivaui/viva v0.6.9-0.20261125164855-ac665a8f86e4
github.com/zalando/go-keyring v0.2.8
golang.org/x/sys v0.50.0
)
Expand All @@ -21,4 +21,4 @@ require (
github.com/pelletier/go-toml/v2 v2.4.3 // indirect
)

replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.8-0.20261125075943-36cbd3ab6859
replace github.com/vivaui/viva => github.com/Lithe-IDEA/viva v0.6.9-0.20261125212154-448b0553faf8
4 changes: 2 additions & 2 deletions desktop/go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/Lithe-IDEA/viva v0.6.8-0.20261125075943-36cbd3ab6859 h1:lH0J2vPKZT8iGBTPBo1NHhfkg2ub9jmGUg92N7cEnAA=
github.com/Lithe-IDEA/viva v0.6.8-0.20261125075943-36cbd3ab6859/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk=
github.com/Lithe-IDEA/viva v0.6.9-0.20261125212154-448b0553faf8 h1:173R5DZnHAMCKirBySDLwSV0CfUHl1SjqLRXxiCwwcY=
github.com/Lithe-IDEA/viva v0.6.9-0.20261125212154-448b0553faf8/go.mod h1:e9In6+J77G7B9ow4enZ2FSOFh7U3q4cQ5iJr3Qn/Olk=
github.com/creack/pty v1.1.24 h1:bJrF4RRfyJnbTJqzRLHzcGaZK1NeM5kTC9jGgovnR1s=
github.com/creack/pty v1.1.24/go.mod h1:08sCNb52WyoAwi2QDyzUCTgcvVFhUzewun7wtTfvcwE=
github.com/danieljoos/wincred v1.2.3 h1:v7dZC2x32Ut3nEfRH+vhoZGvN72+dQ/snVXo/vMFLdQ=
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/logwindow/exportsheet.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (w *window) exportSheet(c ui.C) {
logs := &w.text.Logs
m := &logs.ExportDialog
open := true
ui.ModalWith(c, &open, logs.ExportLabel, ui.ModalSpec{Description: m.Subtitle, Width: exportSheetWidth}, func() {
ui.Modal(c, &open, logs.ExportLabel, ui.ModalSpec{Description: m.Subtitle, Width: exportSheetWidth}, func() {
ui.Column(c).FillWidth().Items(ui.Start).Gap(exportGap).Children(func() {
w.exportBody(c)
})
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/logwindow/toolbar.go
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ func (w *window) rangeEditor(c ui.C, anchor ui.Box) {
w.rangeEnd = end.Format(toolbarTimeFormat)
}
spec := ui.PopoverSpec{Width: toolbarRangeWidth, Align: ui.Start, Offset: toolbarMenuGap}
ui.PopoverWith(c, anchor, &w.menus.timeRange, spec, func() {
ui.Popover(c, anchor, &w.menus.timeRange, spec, func() {
start, startOK := parseRangeTime(w.rangeStart)
end, endOK := parseRangeTime(w.rangeEnd)
readable := startOK && endOK
Expand Down
4 changes: 2 additions & 2 deletions desktop/internal/logwindow/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ func (w *window) status(c ui.C) {
// name of a filter to save.
func (w *window) dialogs(c ui.C) {
logs := &w.text.Logs
ui.ModalWith(c, &w.clearOpen, logs.ClearTitle, ui.ModalSpec{Description: logs.ClearMessage, Width: 420}, nil, func() {
ui.Modal(c, &w.clearOpen, logs.ClearTitle, ui.ModalSpec{Description: logs.ClearMessage, Width: 420}, nil, func() {
if ui.Button(c, logs.Cancel).Outline().Clicked() {
w.clearOpen = false
}
Expand All @@ -541,7 +541,7 @@ func (w *window) dialogs(c ui.C) {
w.clearOpen = false
}
})
closed := ui.ModalWith(c, &w.bookmarkOpen, logs.NameForFilter, ui.ModalSpec{Width: 360}, func() {
closed := ui.Modal(c, &w.bookmarkOpen, logs.NameForFilter, ui.ModalSpec{Width: 360}, func() {
field := ui.TextField(c, &w.bookmarkName, logs.NameForFilter, logs.NameForFilter).FillWidth()
if field.Submitted() {
w.saveBookmark()
Expand Down
8 changes: 4 additions & 4 deletions desktop/internal/pluginview/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ type Host struct {
Icon func(name string) (gfx.Icon, bool)
// Images reads the PNGs of the plugin's package a canvas draws; nil draws none.
Images *Images
// Info draws the host's ⓘ for an info text.
Info func(c ui.C, text string)
// Info draws the host's ⓘ for an info text. It is a callback the renderer calls with
// the paint's own c, as Viva's PageConfig.View is; it keeps no context.
Info func(c ui.C, text string) // viva:ignore kept-context
// Settings is the settings page of a region; nil in a tool window.
Settings SettingsHost
}
Expand Down Expand Up @@ -96,7 +97,7 @@ func Draw(c ui.C, s *Session, host *Host, fill bool) {
canvas.RequestFrameIn(wait)
}
}
r := &renderer{c: c, s: s, host: host}
r := &renderer{s: s, host: host}
// The paint measures the width the nodes are laid out in: the view's, less the body's
// padding in a tool window. It sends open, and later resize; the scroll bars of the
// body float over it, so they take none of the width.
Expand Down Expand Up @@ -155,7 +156,6 @@ func hasTree(nodes []Node) bool {

// renderer declares the nodes of one view in one paint.
type renderer struct {
c ui.C
s *Session
host *Host
// fillTree says a tree declared now is a top-level node of a view that fills its
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/command_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ func (w *window) commandInstallModal(c ui.C) {
installFailed := dialog.output != nil && !installing && dialog.installErr != nil
var cancelled, confirmed, retried bool
title := i18n.SharedFormat(language, "desktop.plugins.commandInstallTitle", map[string]string{"commands": commandList(dialog.missing.Commands)})
closed := ui.ModalWith(c, &dialog.open, title, ui.ModalSpec{Width: 620, Description: dialog.pluginName}, func() {
closed := ui.Modal(c, &dialog.open, title, ui.ModalSpec{Width: 620, Description: dialog.pluginName}, func() {
ui.Column(c).FillWidth().Gap(8).Children(func() {
switch {
case installing:
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/installed_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ func (w *window) uninstallModal(c ui.C, language i18n.Language) {
return
}
title := i18n.SharedFormat(language, "native.uninstall", map[string]string{"arg1": s.uninstallName})
ui.ModalWith(c.Part("uninstall"), &s.uninstallOpen, title, ui.ModalSpec{Width: 400}, nil, func() {
ui.Modal(c.Part("uninstall"), &s.uninstallOpen, title, ui.ModalSpec{Width: 400}, nil, func() {
if ui.Button(c, i18n.Shared(language, "ui.cancel")).Outline().Clicked() {
s.uninstallOpen = false
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/keymap_import_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func (w *window) keymapImportDialog(c ui.C) {
return
}
language := w.marketLanguage()
ui.ModalWith(c.Part("keymap-import-dialog"), &s.open, i18n.Shared(language, "desktop.keymapImport.title"), ui.ModalSpec{Width: 620}, func() {
ui.Modal(c.Part("keymap-import-dialog"), &s.open, i18n.Shared(language, "desktop.keymapImport.title"), ui.ModalSpec{Width: 620}, func() {
ui.Column(c).FillWidth().Gap(10).Children(func() {
ui.Row(c).FillWidth().Gap(8).Items(ui.Center).Children(func() {
source := s.format
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/keymap_schemes_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (w *window) keymapSchemeCard(c ui.C) {
if s.operation == "delete" {
title = i18n.Shared(w.marketLanguage(), "desktop.keymapSchemes.delete")
}
ui.ModalWith(c.Part("scheme-name"), &s.open, title, ui.ModalSpec{Width: 410}, func() {
ui.Modal(c.Part("scheme-name"), &s.open, title, ui.ModalSpec{Width: 410}, func() {
if s.operation != "delete" {
ui.TextField(c, &s.name, i18n.Shared(w.marketLanguage(), "desktop.keymapSchemes.name"), "").FillWidth()
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/local_history_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (w *window) localHistoryCard(c ui.C) {
})
})
if d.confirmClear {
ui.Modal(c, &d.confirmClear, i18n.Shared(language, "native.clearThisProjectSLocalHistory"), func() {
ui.Modal(c, &d.confirmClear, i18n.Shared(language, "native.clearThisProjectSLocalHistory"), ui.ModalSpec{}, func() {
ui.Wrap(c, i18n.Shared(language, "native.everySavedVersionOfThisProjectSFilesIsDeletedOpenFilesAreNotChanged")).FontSize(12).Color(w.pal.text)
}, func() {
if ui.Button(c, i18n.Shared(language, "desktop.pluginSettings.actionCancel")).Outline().Clicked() {
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/marketplace_sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func (w *window) repositoriesModal(c ui.C, language i18n.Language) {
w.repositoriesOpen = false
}
}
ui.ModalWith(c.Part("repositories-modal"), &w.repositoriesOpen, title, ui.ModalSpec{Width: 600}, body, footer)
ui.Modal(c.Part("repositories-modal"), &w.repositoriesOpen, title, ui.ModalSpec{Width: 600}, body, footer)
if !w.repositoriesOpen {
w.marketSourceNotice = ""
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/plugin_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (w *window) pluginInstallModal(c ui.C) {
if outcome == pluginInstallFailed {
title = i18n.Shared(language, "desktop.marketplace.installFailed")
}
closed := ui.ModalWith(c, &dialog.open, title,
closed := ui.Modal(c, &dialog.open, title,
ui.ModalSpec{Width: 620, Description: description}, func() {
ui.Column(c).FillWidth().Gap(8).Children(func() {
switch {
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/plugin_region_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ func (s regionSettings) toolPicker(c ui.C, row ui.Box, language i18n.Language, s
title = i18n.Shared(language, "desktop.buildSettings.optionsProject")
}
spec := ui.PopoverSpec{Align: ui.Start, Width: toolPickerWidth, ConsumeOutsidePress: true, Title: title}
ui.PopoverWith(c, row, open, spec, func() {
ui.Popover(c, row, open, spec, func() {
before := scope.wanted(tool.ID)
current := toolchainCurrent(tool)
ui.Scroll(c.Part("choices")).Scrollbars().FillWidth().MaxHeight(toolPickerMaxHeight).Children(func() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func (w *window) pluginSettingActions(c ui.C) {
}
if confirmation := p.actionConfirmation; confirmation != nil {
question := i18n.SharedFormat(language, "desktop.pluginSettings.actionConfirm", map[string]string{"action": confirmation.Title})
ui.Modal(c, &p.confirmOpen, confirmation.Title, func() {
ui.Modal(c, &p.confirmOpen, confirmation.Title, ui.ModalSpec{}, func() {
ui.Wrap(c, question).FontSize(12).Color(w.pal.text)
}, func() {
if ui.Button(c, i18n.Shared(language, "desktop.pluginSettings.actionCancel")).Outline().Disabled(p.running).Clicked() {
Expand Down
30 changes: 1 addition & 29 deletions desktop/internal/settingswindow/plugin_settings_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package settingswindow
import (
"errors"
"strconv"
"strings"

"github.com/1lck/Lithe-IDEA/desktop/internal/configfile"
"github.com/1lck/Lithe-IDEA/desktop/internal/core"
Expand Down Expand Up @@ -197,29 +196,6 @@ func (w *window) pluginSettingsFormRow(c ui.C, item pluginSettingLayout, hasSour
}
}

// readOnlyField shows value as a field that cannot be edited. Box.Disabled does not apply to
// a TextField in pinned Viva, so the field is the text it holds inside a frame, which
// assistive technology and the platform see as a read-only text field that takes no input.
func (w *window) readOnlyField(c ui.C, label, value string) {
ui.Row(c).Grow(1).MinWidth(0).Height(30).PadX(10).Border(1, w.pal.line).Radius(6).Items(ui.Center).
HitWith(ui.ID(c), label, gfx.HitOptions{Role: gfx.RoleTextField, Value: value, ReadOnly: true, Disabled: true}).
Children(func() {
ui.Text(c, value).FontSize(13).Color(w.pal.muted).Ellipsis()
})
}

// readOnlyList shows a list value that cannot be edited one item per line, as the TextArea
// shows it while it can be, so a read-only list is not cut down to its first item.
func (w *window) readOnlyList(c ui.C, label, value string) {
ui.Column(c).FillWidth().MinWidth(0).PadX(10).PadY(6).Gap(2).Border(1, w.pal.line).Radius(6).
HitWith(ui.ID(c), label, gfx.HitOptions{Role: gfx.RoleTextField, Value: value, ReadOnly: true, Disabled: true}).
Children(func() {
for _, line := range strings.Split(value, "\n") {
ui.Text(c, line).FontSize(13).Color(w.pal.muted).FillWidth().Ellipsis()
}
})
}

// pluginSettingRow declares one setting on one line: its title on the leading side, and on
// the trailing side the control for its kind and Reset, so the controls of a page line up
// down its trailing edge. A text, path or list takes most of the line, and moves under the
Expand Down Expand Up @@ -277,11 +253,7 @@ func (w *window) pluginSettingRow(c ui.C, index int, hasSource bool) {
case "multiSelect":
// Its options are listed under the line.
default:
if disabled {
w.readOnlyField(c, declaration.Title, control.text)
} else {
ui.TextField(c, &control.text, declaration.Title, declaration.Placeholder).Grow(1).MinWidth(0).Height(30)
}
ui.TextField(c, &control.text, declaration.Title, declaration.Placeholder).ReadOnly(disabled).Grow(1).MinWidth(0).Height(30)
if declaration.Kind == "file" || declaration.Kind == "directory" {
if ui.Button(c, i18n.Shared(language, "desktop.pluginSettings.browse")).Outline().Small().Shrink(0).Disabled(disabled).Clicked() {
// The native picker blocks, so it runs after the paint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (w *window) stopTimeCard(c ui.C, value ProcessTermination) {
if ui.Button(c.Part("shorter"), i18n.Shared(language, "desktop.settings.processTermination.stopTimeShorter")).Icon(icons.Minus).IconOnly().Ghost().Small().Disabled(!known || seconds <= rule.Min).Clicked() {
w.setStopTime(value, rule, seconds-1)
}
box := ui.TextFieldID(c, stopTimeFieldID, field, title, "").Width(60).Disabled(!known)
box := ui.TextField(c, field, title, "", ui.WithID(stopTimeFieldID)).Width(60).Disabled(!known)
box.OnKey(func(event gfx.KeyEvent) gfx.EventResult {
if event.Key == gfx.KeyEnter && !event.Release {
w.commitStopTime(value, rule)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ func (w *window) sourceEntryChooser(c ui.C, p *sourceSettingsForm) {
kind := field.EntryKinds[chooser.kind]
available := choiceEntries(field, chooser.kind, control.input.Entries)
title := i18n.SharedFormat(language, "desktop.sourceSettings.chooseTitle", map[string]string{"title": kind.Title})
ui.ModalWith(c, &chooser.open, title, ui.ModalSpec{Width: 480, Height: 440}, func() {
ui.Modal(c, &chooser.open, title, ui.ModalSpec{Width: 480, Height: 440}, func() {
if len(available) == 0 {
ui.Wrap(c, i18n.Shared(language, "desktop.sourceSettings.chooseNone")).FontSize(12).Color(w.pal.muted)
return
Expand Down
16 changes: 8 additions & 8 deletions desktop/internal/settingswindow/source_settings_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,9 @@ func (w *window) sourceSettingsControl(c ui.C, p *sourceSettingsForm, source cor
return i18n.SharedFormat(language, "desktop.sourceSettings.inherit", map[string]string{"value": value})
}
if disabled {
w.readOnlyField(c, field.Title, label(control.selected))
// The choice stays readable and can be copied while the source takes no edit.
value := label(control.selected)
ui.TextField(c, &value, field.Title, "").ReadOnly(true).Grow(1).MinWidth(0).Height(30)
return
}
if ui.Select(c, &control.selected, control.choices, label).Width(190).Label(accessibleTitle).Changed() {
Expand All @@ -552,17 +554,15 @@ func (w *window) sourceSettingsControl(c ui.C, p *sourceSettingsForm, source cor
}
default:
list := field.Kind == "stringList" || field.Kind == "fileList"
if disabled && list {
w.readOnlyList(c, field.Title, control.input.Text)
} else if disabled {
w.readOnlyField(c, field.Title, control.input.Text)
} else if list {
if ui.TextArea(c, &control.input.Text, field.Title, "").FillWidth().Height(100).Changed() {
// A source that takes no edit keeps the value in the same field, read-only, so it
// can still be selected and copied.
if list {
if ui.TextArea(c, &control.input.Text, field.Title, "").FillWidth().Height(100).ReadOnly(disabled).Changed() {
control.input.Inherit = false
p.changed(source.ID, field.ID)
}
} else {
if ui.TextField(c, &control.input.Text, field.Title, "").FillWidth().Height(30).Changed() {
if ui.TextField(c, &control.input.Text, field.Title, "").FillWidth().Height(30).ReadOnly(disabled).Changed() {
control.input.Inherit = false
p.changed(source.ID, field.ID)
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/terminal_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ func (w *window) scrollbackCard(c ui.C) {
if ui.Button(c.Part("less"), i18n.Shared(language, "desktop.settings.terminal.scrollbackLess")).Icon(icons.Minus).IconOnly().Ghost().Small().Disabled(value <= MinScrollback).Clicked() {
w.setTerminalScrollback(value-scrollbackStep, false)
}
box := ui.TextFieldID(c, scrollbackFieldID, field, title, "").Width(90)
box := ui.TextField(c, field, title, "", ui.WithID(scrollbackFieldID)).Width(90)
box.OnKey(func(event gfx.KeyEvent) gfx.EventResult {
if event.Key == gfx.KeyEnter && !event.Release {
w.commitScrollback()
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/updates_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (w *window) updateChannelDialog(c ui.C, language i18n.Language, status Upda
})
}
}
closed := ui.ModalWith(c.Part("update-channel"), &open, title, ui.ModalSpec{Description: body, Width: 480}, content, func() {
closed := ui.Modal(c.Part("update-channel"), &open, title, ui.ModalSpec{Description: body, Width: 480}, content, func() {
if ui.Button(c.Part("cancel"), w.text.Settings.Cancel).Outline().Clicked() {
choice = "cancel"
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/settingswindow/window_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func (w *window) sidebar(c ui.C) {
settings := &w.text.Settings
ui.Column(c).Width(sidebarWidth).FillHeight().Shrink(0).Background(p.sidebar).Clip().Children(func() {
ui.Row(c).FillWidth().Shrink(0).PadSides(10, 10, 8, 10).Children(func() {
search := ui.TextFieldID(c, searchID, &w.searchField, settings.Search, settings.Search).Icon(icons.Search).FillWidth().Height(searchHeight)
search := ui.TextField(c, &w.searchField, settings.Search, settings.Search, ui.WithID(searchID)).Icon(icons.Search).FillWidth().Height(searchHeight)
if w.searchField.Text() != "" {
search = search.Action(icons.X, i18n.Shared(w.marketLanguage(), "desktop.logs.clearSearch"))
if search.ActionClicked() {
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/workbench/aicommit_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (a *App) drawGeneratedMessageConfirm(c ui.C, p *project) {
}
t := a.text.AI.Commit
open := true
closed := ui.ModalWith(c, &open, t.ReplaceTitle, ui.ModalSpec{Description: t.ReplaceBody, Width: 420}, func() {
closed := ui.Modal(c, &open, t.ReplaceTitle, ui.ModalSpec{Description: t.ReplaceBody, Width: 420}, func() {
ui.Paragraph(c, firstLine(p.commit.ai.pending), 2)
}, func() {
if ui.Button(c, t.Keep).Outline().Clicked() {
Expand Down
6 changes: 3 additions & 3 deletions desktop/internal/workbench/branch_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func branchInset(depth int) float32 { return chromeEdge + float32(depth)*branchI
func (a *App) drawBranchPopup(c ui.C, p *project, anchor ui.Box) {
b, t := &a.branch, a.text.Branch
spec := ui.PopoverSpec{Align: ui.Start, Offset: chromeMenuOffset, Width: branchPopupWidth, ConsumeOutsidePress: true}
ui.PopoverWith(c, anchor, &b.open, spec, func() {
ui.Popover(c, anchor, &b.open, spec, func() {
ui.Column(c).FillWidth().MaxHeight(branchPopupMaxHeight).Gap(chromeMenuItems).Children(func() {
a.drawBranchPanel(c, p, t)
})
Expand Down Expand Up @@ -199,7 +199,7 @@ func (a *App) drawWorkspaceBranchRepo(c ui.C, p *project, t i18n.BranchMessages,
// The press that closes the panel goes on to the popup, so a click on another repository opens
// that one's panel at once.
spec := ui.PopoverSpec{Side: components.PopoverRight, Align: ui.Start, Offset: chromeMenuOffset, Width: branchPopupWidth}
ui.PopoverWith(c, row, &b.repoOpen, spec, func() {
ui.Popover(c, row, &b.repoOpen, spec, func() {
ui.Column(c).FillWidth().MaxHeight(branchPopupMaxHeight).Gap(chromeMenuItems).Children(func() {
if a.drawBranchActions(c, p, b.currentReference(), query, false) {
ui.Divider(c)
Expand Down Expand Up @@ -582,7 +582,7 @@ func (a *App) drawBranchDialog(c ui.C, p *project) {
// dismisses it.
func (a *App) branchDialogOf(c ui.C, title, description string, body, footer func()) {
open := true
if ui.ModalWith(c, &open, title, ui.ModalSpec{Description: description, Width: branchDialogWidth}, body, footer) {
if ui.Modal(c, &open, title, ui.ModalSpec{Description: description, Width: branchDialogWidth}, body, footer) {
c.After(a.cancelBranchDialog)
}
}
Expand Down
2 changes: 1 addition & 1 deletion desktop/internal/workbench/build_options.go
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ func (a *App) buildOptionsDialog(c ui.C, p *project) {
if e.instance != "" {
title = i18n.SharedFormat(language, "desktop.build.instanceOptions", map[string]string{"name": e.name})
}
closed := ui.ModalWith(c, &open, title, ui.ModalSpec{Width: 460}, func() {
closed := ui.Modal(c, &open, title, ui.ModalSpec{Width: 460}, func() {
ui.Column(c.Part("build-options")).FillWidth().Gap(10).Children(func() {
a.buildIgnoredPathsSection(c.Part("detection"), p, ready)
if e.instance != "" {
Expand Down
4 changes: 2 additions & 2 deletions desktop/internal/workbench/changelists_view.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (a *App) drawChangeListDialog(c ui.C, p *project) {
label := i18n.Shared(lang, "native.name")
ready := !l.running && l.name.Text() != ""
open, submitted := true, false
closed := ui.ModalWith(c, &open, title, ui.ModalSpec{Width: 380}, func() {
closed := ui.Modal(c, &open, title, ui.ModalSpec{Width: 380}, func() {
ui.Column(c).FillWidth().Gap(8).Children(func() {
submitted = ui.TextField(c, &l.name, label, label).FillWidth().AutoFocus().Submitted()
if l.nameError != "" {
Expand All @@ -178,7 +178,7 @@ func (a *App) drawChangeListDialog(c ui.C, p *project) {
Description: i18n.Shared(lang, "native.filesReturnToTheDefaultChangeListAndMayBeIncludedByStageAllTheirGitStagingStateIsUnchanged"),
Width: 420,
}
closed := ui.ModalWith(c, &open, i18n.Shared(lang, "native.deleteChangeList.variant2"), spec, func() {
closed := ui.Modal(c, &open, i18n.Shared(lang, "native.deleteChangeList.variant2"), spec, func() {
ui.Text(c, a.changeListNameByID(p, l.target)).Weight(gfx.WeightMedium)
}, func() {
if ui.Button(c, cancel).Outline().Clicked() {
Expand Down
Loading
Loading