Skip to content

Commit 6ee41d4

Browse files
committed
chore: update to v1.1.7, add window control buttons and refresh metadata
- Added close, maximize, and restore buttons for improved window navigation. - Updated application version to 1.1.7 across build files and Flatpak metadata. - Refreshed screenshot URLs and added new application screenshots. - Adjusted branding colors for light and dark modes in `metainfo.xml`.
1 parent 2f1ff85 commit 6ee41d4

13 files changed

Lines changed: 127 additions & 11 deletions

File tree

composeApp/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ compose.desktop {
5050
TargetFormat.Rpm
5151
)
5252
packageName = "pomolin"
53-
packageVersion = "1.1.6"
53+
packageVersion = "1.1.7"
5454
description = "A simple Pomodoro App written in Kotlin. Focus on what matters! "
5555
vendor = "Suyog Tandel"
5656
licenseFile.set(project.file("../LICENSE"))
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 1 addition & 0 deletions
Loading

composeApp/src/desktopMain/kotlin/io/github/redddfoxxyy/pomolin/main.kt

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,13 @@ import androidx.compose.foundation.layout.Column
77
import androidx.compose.foundation.layout.fillMaxWidth
88
import androidx.compose.foundation.layout.height
99
import androidx.compose.foundation.layout.padding
10+
import androidx.compose.foundation.layout.size
11+
import androidx.compose.foundation.shape.CircleShape
1012
import androidx.compose.foundation.shape.RoundedCornerShape
1113
import androidx.compose.foundation.window.WindowDraggableArea
14+
import androidx.compose.material3.Icon
15+
import androidx.compose.material3.IconButton
16+
import androidx.compose.material3.IconButtonDefaults
1217
import androidx.compose.material3.Surface
1318
import androidx.compose.material3.Text
1419
import androidx.compose.ui.Alignment
@@ -18,6 +23,7 @@ import androidx.compose.ui.text.font.FontFamily
1823
import androidx.compose.ui.unit.dp
1924
import androidx.compose.ui.unit.sp
2025
import androidx.compose.ui.window.Window
26+
import androidx.compose.ui.window.WindowPlacement
2127
import androidx.compose.ui.window.application
2228
import androidx.compose.ui.window.rememberWindowState
2329
import io.github.redddfoxxyy.pomolin.data.AppSettings
@@ -27,6 +33,9 @@ import org.jetbrains.compose.resources.painterResource
2733
import pomolin.composeapp.generated.resources.JetBrainsMonoNerdFont_ExtraBold
2834
import pomolin.composeapp.generated.resources.Pomolin
2935
import pomolin.composeapp.generated.resources.Res
36+
import pomolin.composeapp.generated.resources.close
37+
import pomolin.composeapp.generated.resources.maximize
38+
import pomolin.composeapp.generated.resources.restore
3039
import java.awt.Dimension
3140
import javax.swing.SwingUtilities
3241

@@ -81,6 +90,89 @@ fun main() = application {
8190
fontSize = 18.sp,
8291
color = ThemeManager.colors.mauve
8392
)
93+
Box(
94+
modifier = Modifier
95+
.padding(end = 8.dp, top = 2.dp)
96+
.align(Alignment.TopEnd)
97+
.size(22.dp) // This now correctly controls the background circle size
98+
.background(
99+
color = ThemeManager.colors.surface.copy(alpha = 0.8f),
100+
shape = CircleShape
101+
),
102+
contentAlignment = Alignment.Center
103+
) {
104+
IconButton(
105+
onClick = { exitApplication() },
106+
modifier = Modifier
107+
// .padding(end = 10.dp, top = 1.dp)
108+
.size(22.dp) // Smaller size for just the button
109+
.align(Alignment.TopEnd),
110+
// .background(
111+
// color = ThemeManager.colors.surface,
112+
// shape = CircleShape // Explicit circle shape
113+
// ),
114+
colors = IconButtonDefaults.iconButtonColors(
115+
containerColor = Color.Transparent, // Button itself has mauve background
116+
contentColor = ThemeManager.colors.mauve.copy(alpha = 0.8f), // Icon color
117+
),
118+
) {
119+
Icon(
120+
painterResource(Res.drawable.close),
121+
contentDescription = "Close App",
122+
modifier = Modifier.size(16.dp) // Control icon size
123+
)
124+
}
125+
}
126+
Box(
127+
modifier = Modifier
128+
.padding(end = 36.dp, top = 2.dp)
129+
.align(Alignment.TopEnd)
130+
.size(22.dp) // This now correctly controls the background circle size
131+
.background(
132+
color = ThemeManager.colors.surface.copy(alpha = 0.8f),
133+
shape = CircleShape
134+
),
135+
contentAlignment = Alignment.Center
136+
) {
137+
IconButton(
138+
onClick = {
139+
windowState.placement =
140+
if (windowState.placement == WindowPlacement.Maximized) {
141+
WindowPlacement.Floating
142+
} else {
143+
WindowPlacement.Maximized
144+
}
145+
},
146+
modifier = Modifier
147+
// .padding(end = 10.dp, top = 1.dp)
148+
.size(22.dp) // Smaller size for just the button
149+
.align(Alignment.TopEnd),
150+
// .background(
151+
// color = ThemeManager.colors.surface,
152+
// shape = CircleShape // Explicit circle shape
153+
// ),
154+
colors = IconButtonDefaults.iconButtonColors(
155+
containerColor = Color.Transparent, // Button itself has mauve background
156+
contentColor = ThemeManager.colors.mauve.copy(alpha = 0.8f), // Icon color
157+
),
158+
) {
159+
Icon(
160+
painterResource(
161+
if (windowState.placement == WindowPlacement.Maximized) {
162+
Res.drawable.restore // Icon when maximized (shows restore icon)
163+
} else {
164+
Res.drawable.maximize // Icon when not maximized (shows maximize icon)
165+
}
166+
),
167+
contentDescription = if (windowState.placement == WindowPlacement.Maximized) {
168+
"Restore Window"
169+
} else {
170+
"Maximize Window"
171+
},
172+
modifier = Modifier.size(16.dp) // Control icon size
173+
)
174+
}
175+
}
84176
}
85177
}
86178
}
-8.38 KB
Loading
-8.48 KB
Loading
-8.26 KB
Loading
-8.53 KB
Loading
-8.41 KB
Loading

0 commit comments

Comments
 (0)