Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc5759fc

Browse files
committed
fix(sketch): improve diff sketch UI styling and borders
Add border to wrapper panel and update toggle button styling by removing border painting, setting content area to transparent, and adjusting size from 20px to 24px with empty insets.
1 parent9f40329 commitc5759fc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/patch/SingleFileDiffSketch.kt‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import com.intellij.ui.components.panels.HorizontalLayout
3535
importcom.intellij.ui.components.panels.VerticalLayout
3636
importcom.intellij.util.LocalTimeCounter
3737
importcom.intellij.util.concurrency.annotations.RequiresWriteLock
38+
importcom.intellij.util.ui.JBUI
39+
importcom.intellij.util.ui.UIUtil
3840
importjava.awt.BorderLayout
3941
importjava.awt.Dimension
4042
importjava.awt.event.MouseAdapter
@@ -212,6 +214,7 @@ class SingleFileDiffSketch(
212214
wrapperPanel.preferredSize=Dimension(wrapperPanel.preferredSize.width, maxOf(200, minHeight))
213215
wrapperPanel.maximumSize=Dimension(Int.MAX_VALUE, maxOf(200, minHeight))
214216

217+
wrapperPanel.border=JBUI.Borders.customLine(UIUtil.getBoundsColor(),1,1,1,1)
215218
return wrapperPanel
216219
}
217220

@@ -268,7 +271,10 @@ class SingleFileDiffSketch(
268271

269272
val toggleButton=JButton().apply {
270273
icon=AllIcons.Actions.Diff
271-
preferredSize=Dimension(20,20)
274+
preferredSize=Dimension(24,24)
275+
margin=JBUI.emptyInsets()
276+
isBorderPainted=false
277+
isContentAreaFilled=false
272278
isOpaque=false
273279
toolTipText=AutoDevBundle.message("sketch.terminal.show.hide")
274280
addActionListener {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp