Skip to content

Commit 03f74ff

Browse files
authored
manager: left-align WebUI button and add dedicated webui icon (#1296)
The WebUI button is now positioned on the left beside the module information. Only the WebUI button layout changed; the update and uninstall/action-script buttons remain right-aligned. This is done by moving the WebUI button to the section before the weighted Spacer. The old settings icon previously used for WebUI has been replaced with a new dedicated icon. A new `webui.xml` vector drawable is added to provide this updated WebUI icon. Signed-off-by: Prslc <prslc113@gmail.com>
1 parent 166daa0 commit 03f74ff

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

app/src/main/java/me/bmax/apatch/ui/screen/APM.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,6 @@ private fun ModuleItem(
534534
.fillMaxWidth(),
535535
verticalAlignment = Alignment.CenterVertically
536536
) {
537-
Spacer(modifier = Modifier.weight(1f))
538537
if (updateUrl.isNotEmpty()) {
539538
ModuleUpdateButton(onClick = { onUpdate(module) })
540539

@@ -549,7 +548,7 @@ private fun ModuleItem(
549548
) {
550549
Icon(
551550
modifier = Modifier.size(20.dp),
552-
painter = painterResource(id = R.drawable.settings),
551+
painter = painterResource(id = R.drawable.webui),
553552
contentDescription = null
554553
)
555554

@@ -565,6 +564,8 @@ private fun ModuleItem(
565564
Spacer(modifier = Modifier.width(12.dp))
566565
}
567566

567+
Spacer(modifier = Modifier.weight(1f))
568+
568569
if (module.hasActionScript) {
569570
FilledTonalButton(
570571
onClick = {
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24"
5+
android:viewportHeight="24">
6+
<path
7+
android:pathData="M3,12a9,9 0,1 0,18 0a9,9 0,0 0,-18 0"
8+
android:strokeLineJoin="round"
9+
android:strokeWidth="2"
10+
android:fillColor="#00000000"
11+
android:strokeColor="#ffff"
12+
android:strokeLineCap="round"/>
13+
<path
14+
android:pathData="M3.6,9h16.8"
15+
android:strokeLineJoin="round"
16+
android:strokeWidth="2"
17+
android:fillColor="#00000000"
18+
android:strokeColor="#ffff"
19+
android:strokeLineCap="round"/>
20+
<path
21+
android:pathData="M3.6,15h16.8"
22+
android:strokeLineJoin="round"
23+
android:strokeWidth="2"
24+
android:fillColor="#00000000"
25+
android:strokeColor="#ffff"
26+
android:strokeLineCap="round"/>
27+
<path
28+
android:pathData="M11.5,3a17,17 0,0 0,0 18"
29+
android:strokeLineJoin="round"
30+
android:strokeWidth="2"
31+
android:fillColor="#00000000"
32+
android:strokeColor="#ffff"
33+
android:strokeLineCap="round"/>
34+
<path
35+
android:pathData="M12.5,3a17,17 0,0 1,0 18"
36+
android:strokeLineJoin="round"
37+
android:strokeWidth="2"
38+
android:fillColor="#00000000"
39+
android:strokeColor="#ffff"
40+
android:strokeLineCap="round"/>
41+
</vector>

0 commit comments

Comments
 (0)