コード整形

This commit is contained in:
tateisu 2023-01-13 03:49:05 +09:00
parent f182d2438c
commit 485a20a722
1 changed files with 6 additions and 5 deletions

View File

@ -106,7 +106,7 @@ internal class StatusButtonsPopup(
val anchorTop = location[1]
val anchorWidth = anchor.width
// popupsize
// popupの大きさ
viewRoot.measure(
View.MeasureSpec.makeMeasureSpec(listView.width, View.MeasureSpec.AT_MOST),
View.MeasureSpec.makeMeasureSpec(listView.height, View.MeasureSpec.AT_MOST)
@ -114,9 +114,10 @@ internal class StatusButtonsPopup(
val popupWidth = viewRoot.measuredWidth
val popupHeight = viewRoot.measuredHeight
val clipTop = listviewTop+ dip(8f)
val clipBottom = listviewTop+ listView.height - dip(8f)
// ポップアップウィンドウの上端。listViewベース
val clipTop = listviewTop + dip(8f)
val clipBottom = listviewTop + listView.height - dip(8f)
// ポップアップウィンドウの上端
var popupY = anchorTop + anchor.height / 2
if (popupY < clipTop) {
// 画面外のは画面内にする
@ -138,6 +139,6 @@ internal class StatusButtonsPopup(
log.i("show listView=${listviewTop},${listviewLeft},${listView.width}, anchor=${anchorTop},${anchorLeft},popup=${popupY},${popupX}")
window.showAtLocation(listView, Gravity.LEFT or Gravity.TOP, popupX, popupY )
window.showAtLocation(listView, Gravity.LEFT or Gravity.TOP, popupX, popupY)
}
}