Skip to content

Commit 3fa0f05

Browse files
authored
Merge pull request #182 from scala-steward/update/scalafmt-core-3.9.7
Update scalafmt-core to 3.9.7
2 parents 1f3272e + 8f44881 commit 3fa0f05

File tree

12 files changed

+25
-22
lines changed

12 files changed

+25
-22
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ fb28cb61e3b756de7125c1af8e43770cb7cd006f
66

77
# Scala Steward: Reformat with scalafmt 3.8.4
88
6bc4920f71407b36edec65017fa623736c4f6115
9+
10+
# Scala Steward: Reformat with scalafmt 3.9.7
11+
b508ee878ab79d3b64de42e367e2567a20758982

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = 3.9.6
1+
version = 3.9.7
22

33
runner.dialect = "scala3"
44
align.preset = more

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ThisBuild / publishTo := sonatypePublishToBundle.value
55
ThisBuild / scalaVersion := "3.3.6"
66
ThisBuild / licenses := Seq("MIT License" -> url("http://opensource.org/licenses/MIT"))
77
ThisBuild / homepage := Some(url("https://github.com/JD557/interim"))
8-
ThisBuild / scmInfo := Some(
8+
ThisBuild / scmInfo := Some(
99
ScmInfo(
1010
url("https://github.com/JD557/interim"),
1111
"scm:git@github.com:JD557/interim.git"

core/shared/src/main/scala/eu/joaocosta/interim/InputState.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ sealed trait InputState:
1919
def appendKeyboardInput(str: String): String =
2020
if (keyboardInput.isEmpty) str
2121
else
22-
val fullString = str + keyboardInput
22+
val fullString = str + keyboardInput
2323
val processedString =
2424
if (fullString.size >= 2)
2525
fullString.iterator

core/shared/src/main/scala/eu/joaocosta/interim/TextLayout.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ object TextLayout:
7070
if (dy + textOp.font.fontSize > textOp.textArea.h) layout("", dy, textAcc) // Can't fit this line, end here
7171
else
7272
val (thisLine, nextLine) = getNextLine(str, textOp.textArea.w, textOp.font.charWidth)
73-
val ops = cumulativeSum(thisLine)(textOp.font.charWidth).map { case (char, dx) =>
74-
val width = textOp.font.charWidth(char)
73+
val ops = cumulativeSum(thisLine)(textOp.font.charWidth).map { case (char, dx) =>
74+
val width = textOp.font.charWidth(char)
7575
val charArea = Rect(
7676
x = textOp.textArea.x + dx - width,
7777
y = textOp.textArea.y + dy,
@@ -107,13 +107,13 @@ object TextLayout:
107107
areaAcc: Rect
108108
): Rect =
109109
remaining match
110-
case "" => areaAcc
110+
case "" => areaAcc
111111
case str =>
112112
if (dy + font.fontSize > boundingArea.h) layout("", dy, areaAcc) // Can't fit this line, end here
113113
else
114114
val (thisLine, nextLine) = getNextLine(str, boundingArea.w, font.charWidth)
115-
val charAreas = cumulativeSum(thisLine)(font.charWidth).map { case (char, dx) =>
116-
val width = font.charWidth(char)
115+
val charAreas = cumulativeSum(thisLine)(font.charWidth).map { case (char, dx) =>
116+
val width = font.charWidth(char)
117117
val charArea = Rect(
118118
x = boundingArea.x + dx - width,
119119
y = boundingArea.y + dy,

core/shared/src/main/scala/eu/joaocosta/interim/layouts/StaticColumnAllocator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class StaticColumnAllocator(
1515
else
1616
val columnSize = (area.w - (numColumns - 1) * padding) / numColumns.toDouble
1717
val intColumnSize = columnSize.toInt
18-
val baseCells = for
18+
val baseCells = for
1919
column <- (0 until numColumns)
2020
dx = (column * (columnSize + padding)).toInt
2121
yield Rect(area.x + dx, area.y, intColumnSize, area.h)

core/shared/src/main/scala/eu/joaocosta/interim/layouts/StaticRowAllocator.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ final class StaticRowAllocator(
1515
else
1616
val rowSize = (area.h - (numRows - 1) * padding) / numRows.toDouble
1717
val intRowSize = rowSize.toInt
18-
val baseCells = for
18+
val baseCells = for
1919
row <- (0 until numRows)
2020
dy = (row * (rowSize + padding)).toInt
2121
yield Rect(area.x, area.y + dy, area.w, intRowSize)

core/shared/src/main/scala/eu/joaocosta/interim/skins/HandleSkin.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ object HandleSkin extends DefaultSkin:
2727

2828
def renderMoveHandle(area: Rect, itemStatus: UiContext.ItemStatus)(using uiContext: UiContext): Unit =
2929
val handleArea = this.moveHandleArea(area)
30-
val color = itemStatus match
30+
val color = itemStatus match
3131
case UiContext.ItemStatus(false, false, _, _) => colorScheme.icon
3232
case UiContext.ItemStatus(true, false, _, _) => colorScheme.iconHighlight
3333
case UiContext.ItemStatus(_, true, _, _) => colorScheme.primaryHighlight
@@ -41,7 +41,7 @@ object HandleSkin extends DefaultSkin:
4141

4242
def renderCloseHandle(area: Rect, itemStatus: UiContext.ItemStatus)(using uiContext: UiContext): Unit =
4343
val handleArea = this.closeHandleArea(area)
44-
val color = itemStatus match
44+
val color = itemStatus match
4545
case UiContext.ItemStatus(false, false, _, _) => colorScheme.icon
4646
case UiContext.ItemStatus(true, false, _, _) => colorScheme.iconHighlight
4747
case UiContext.ItemStatus(_, true, _, _) => colorScheme.primaryHighlight
@@ -53,7 +53,7 @@ object HandleSkin extends DefaultSkin:
5353

5454
def renderResizeHandle(area: Rect, itemStatus: UiContext.ItemStatus)(using uiContext: UiContext): Unit =
5555
val handleArea = this.resizeHandleArea(area)
56-
val color = itemStatus match
56+
val color = itemStatus match
5757
case UiContext.ItemStatus(false, false, _, _) => colorScheme.icon
5858
case UiContext.ItemStatus(true, false, _, _) => colorScheme.iconHighlight
5959
case UiContext.ItemStatus(_, true, _, _) => colorScheme.primaryHighlight

core/shared/src/main/scala/eu/joaocosta/interim/skins/SliderSkin.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ object SliderSkin extends DefaultSkin:
3232
val sliderRect =
3333
if (area.w > area.h)
3434
val sliderSize = math.max(minSliderSize, sliderArea.w / steps)
35-
val maxX =
35+
val maxX =
3636
(steps + 1) * sliderArea.w / steps - sliderSize // Correction for when the slider hits the min size
3737
val deltaX = delta * maxX / steps
3838
Rect(0, 0, sliderSize, sliderArea.h)
3939
.centerAt(0, sliderArea.centerY)
4040
.copy(x = sliderArea.x + deltaX)
4141
else
4242
val sliderSize = math.max(minSliderSize, sliderArea.h / steps)
43-
val maxY =
43+
val maxY =
4444
(steps + 1) * sliderArea.h / steps - sliderSize // Correction for when the slider hits the min size
4545
val deltaY = delta * maxY / steps
4646
Rect(0, 0, sliderArea.w, sliderSize)

core/shared/src/test/scala/eu/joaocosta/interim/api/LayoutsSpec.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class LayoutsSpec extends munit.FunSuite:
2828
assertEquals(itemStatus.hot, true)
2929

3030
test("grid correctly lays out elements in a grid"):
31-
val areas = Layouts.grid(Rect(10, 10, 100, 100), numRows = 3, numColumns = 2, padding = 8)(identity)
31+
val areas = Layouts.grid(Rect(10, 10, 100, 100), numRows = 3, numColumns = 2, padding = 8)(identity)
3232
val expected =
3333
Vector(
3434
Vector(Rect(10, 10, 46, 28), Rect(64, 10, 46, 28)),
@@ -51,7 +51,7 @@ class LayoutsSpec extends munit.FunSuite:
5151
assertEquals(areas, expected)
5252

5353
test("rows correctly lays out elements in rows"):
54-
val areas = Layouts.rows(Rect(10, 10, 100, 100), numRows = 3, padding = 8)(alloc ?=> alloc.toVector)
54+
val areas = Layouts.rows(Rect(10, 10, 100, 100), numRows = 3, padding = 8)(alloc ?=> alloc.toVector)
5555
val expected =
5656
Vector(Rect(10, 10, 100, 28), Rect(10, 46, 100, 28), Rect(10, 82, 100, 28))
5757
assertEquals(areas, expected)
@@ -62,7 +62,7 @@ class LayoutsSpec extends munit.FunSuite:
6262
assertEquals(areas, expected)
6363

6464
test("columns correctly lays out elements in columns"):
65-
val areas = Layouts.columns(Rect(10, 10, 100, 100), numColumns = 3, padding = 8)(alloc ?=> alloc.toVector)
65+
val areas = Layouts.columns(Rect(10, 10, 100, 100), numColumns = 3, padding = 8)(alloc ?=> alloc.toVector)
6666
val expected =
6767
Vector(Rect(10, 10, 28, 100), Rect(46, 10, 28, 100), Rect(82, 10, 28, 100))
6868
assertEquals(areas, expected)

0 commit comments

Comments
 (0)