Skip to content

Commit

Permalink
refactor(ui): update action panel and rollback button
Browse files Browse the repository at this point in the history
- Replace `UIUtil.DEFAULT_HGAP` with a fixed value `4` in `actionPanel`.
- Set `isOpaque` to `true` for `actionPanel`.
- Rename "Rollback" button to "Undo" for clarity
  • Loading branch information
phodal committed Jan 19, 2025
1 parent 777480b commit 21eea18
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ class SingleFileDiffView(
})
}

val actionPanel = JPanel(HorizontalLayout(UIUtil.DEFAULT_HGAP)).apply {
val actionPanel = JPanel(HorizontalLayout(4)).apply {
isOpaque = true
actions.forEach { button ->
add(button)
}
Expand Down Expand Up @@ -151,7 +152,7 @@ class SingleFileDiffView(
val undoManager = UndoManager.getInstance(myProject)
val fileEditor = FileEditorManager.getInstance(myProject).getSelectedEditor(currentFile)

val rollback = JButton("Rollback").apply {
val rollback = JButton("Undo").apply {
icon = AllIcons.Actions.Rollback
toolTipText = AutoDevBundle.message("sketch.patch.action.rollback.tooltip")
isEnabled = undoManager.isUndoAvailable(fileEditor)
Expand Down

0 comments on commit 21eea18

Please sign in to comment.