From aaff2c8455948aa55b021a026ae41157ead73cb6 Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sat, 16 May 2026 10:02:07 -0700 Subject: [PATCH] NetworkAndServers: rewrite UseSocksProxySwitch via SettingsActionItemWithContent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit UseSocksProxySwitch was a custom Row with hard-coded horizontal padding of DEFAULT_PADDING (20dp) — but its neighbours on the messages card are SettingsActionItem rows that go through SectionItemView with the new CARD_ITEM_PADDING (15dp). 5dp icon misalignment between the SOCKS toggle row and the rest, plus no auto-divider underneath since it wasn't a SectionItemView. Replace the custom Row with SettingsActionItemWithContent — same icon + label + DefaultSwitch shape, now wrapped in SectionItemView so it shares padding and auto-divider with siblings. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../networkAndServers/NetworkAndServers.kt | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/NetworkAndServers.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/NetworkAndServers.kt index 6213a38709..821b43d8f7 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/NetworkAndServers.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/usersettings/networkAndServers/NetworkAndServers.kt @@ -339,23 +339,10 @@ fun UseSocksProxySwitch( networkUseSocksProxy: MutableState, toggleSocksProxy: (Boolean) -> Unit, ) { - Row( - Modifier.fillMaxWidth().padding(end = DEFAULT_PADDING), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.SpaceBetween + SettingsActionItemWithContent( + icon = painterResource(MR.images.ic_settings_ethernet), + text = stringResource(MR.strings.network_socks_toggle_use_socks_proxy), ) { - Row( - Modifier.weight(1f).padding(horizontal = DEFAULT_PADDING), - verticalAlignment = Alignment.CenterVertically - ) { - Icon( - painterResource(MR.images.ic_settings_ethernet), - stringResource(MR.strings.network_socks_toggle_use_socks_proxy), - tint = MaterialTheme.colors.secondary - ) - TextIconSpaced(false) - Text(generalGetString(MR.strings.network_socks_toggle_use_socks_proxy)) - } DefaultSwitch( checked = networkUseSocksProxy.value, onCheckedChange = toggleSocksProxy,