Merge branch 'main' of github.com:MM2-0/Kvaesitso

This commit is contained in:
MM20 2025-02-28 13:36:06 +01:00
commit e28c6aa463
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
4 changed files with 34 additions and 43 deletions

View File

@ -1,6 +1,5 @@
package de.mm20.launcher2.ui.settings.icons
import android.graphics.drawable.ColorDrawable
import androidx.appcompat.app.AppCompatActivity
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.foundation.BorderStroke
@ -17,9 +16,7 @@ import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.grid.GridCells
import androidx.compose.foundation.lazy.grid.LazyVerticalGrid
import androidx.compose.foundation.lazy.grid.items
import androidx.compose.foundation.shape.CircleShape
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.FormatPaint
import androidx.compose.material.icons.rounded.Palette
import androidx.compose.material3.HorizontalDivider
import androidx.compose.material3.Icon
@ -42,13 +39,10 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.style.TextAlign
import androidx.compose.ui.unit.dp
import androidx.compose.ui.window.Dialog
import androidx.core.content.ContextCompat
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import androidx.lifecycle.viewmodel.compose.viewModel
import de.mm20.launcher2.icons.IconPack
import de.mm20.launcher2.icons.LauncherIcon
import de.mm20.launcher2.icons.StaticIconLayer
import de.mm20.launcher2.icons.StaticLauncherIcon
import de.mm20.launcher2.preferences.IconShape
import de.mm20.launcher2.preferences.ui.GridSettings
import de.mm20.launcher2.ui.R
@ -430,30 +424,14 @@ fun IconShapePreference(
.padding(8.dp),
horizontalAlignment = Alignment.CenterHorizontally
) {
val context = LocalContext.current
ShapedLauncherIcon(
size = 48.dp,
icon = {
StaticLauncherIcon(
foregroundLayer = StaticIconLayer(
icon = ContextCompat.getDrawable(
context,
R.mipmap.ic_launcher_foreground
)!!,
scale = 1.5f,
),
backgroundLayer = StaticIconLayer(
icon = ColorDrawable(
context.getColor(R.color.ic_launcher_background)
)
)
)
},
modifier = Modifier.clickable {
onValueChanged(it)
showDialog = false
},
shape = getShape(it)
Box(
modifier = Modifier.clip(getShape(it))
.size(48.dp)
.background(MaterialTheme.colorScheme.primary)
.clickable {
onValueChanged(it)
showDialog = false
}
)
Text(
getShapeName(it) ?: "",

View File

@ -827,4 +827,8 @@
<string name="weather_forecast_humidity">Vlhkost</string>
<string name="tag_empty_name">Štítek nemůže existovat bez názvu. Pokud budete pokračovat, bude štítek odstraněn.</string>
<string name="widget_removed">Widget odstraněn</string>
<string name="preference_clock_widget_time_format">Formát času</string>
<string name="preference_clock_widget_time_format_24h">24hodinový</string>
<string name="preference_clock_widget_time_format_12h">12hodinový</string>
<string name="preference_clock_widget_time_format_system">Podle systému</string>
</resources>

View File

@ -818,4 +818,8 @@
<string name="weather_forecast_humidity">Páratartalom</string>
<string name="tag_empty_name">Egy címke nem létezhet név nélkül. Ha folytatja, a címke törlődik.</string>
<string name="widget_removed">Modul törölve</string>
<string name="preference_clock_widget_time_format_system">Rendszer alapértelmezett</string>
<string name="preference_clock_widget_time_format">Időformátum</string>
<string name="preference_clock_widget_time_format_24h">24 órás</string>
<string name="preference_clock_widget_time_format_12h">12 órás</string>
</resources>

View File

@ -107,9 +107,9 @@
<string name="alert_delete_shortcut">捷徑 %1$s 將被永久移除。繼續?</string>
<string name="default_websearch_2_name">YouTube</string>
<string name="default_websearch_2_url">https://www.youtube.com/results\?search_query=${1}</string>
<string name="default_websearch_3_name">Google Play商店</string>
<string name="default_websearch_3_name">Google Play</string>
<string name="default_websearch_3_url">https://play.google.com/store/search\?q=${1}</string>
<string name="websearch_dialog_url_error">此 URL 中缺少預留位置${1}</string>
<string name="websearch_dialog_url_error">此 URL 中缺少預留位置『${1}』</string>
<string name="websearch_dialog_replace_icon">替換圖示</string>
<string name="websearch_dialog_delete_icon">刪除圖示</string>
<string name="websearch_dialog_custom_icon">自訂圖示</string>
@ -145,7 +145,7 @@
<string name="edit_favorites_dialog_tag_section_empty">被釘選的標籤將出現在這裡</string>
<string name="edit_favorites_dialog_new_tag">建立標籤…</string>
<string name="nextcloud_server_url">Nextcloud 伺服器 URL</string>
<string name="nextcloud_server_url_empty">伺服器URL禁止為空</string>
<string name="nextcloud_server_url_empty">伺服器 URL 禁止為空</string>
<string name="nextcloud_server_invalid_url">此 URL 不能指向一個有效的 Nextcloud 安裝器</string>
<string name="owncloud_server_url">Owncloud 伺服器 URL</string>
<string name="owncloud_server_invalid_url">此 URL 不能指向一個有效的 Owncloud 安裝器</string>
@ -376,12 +376,12 @@
<string name="preference_search_localfiles">本機檔案</string>
<string name="preference_search_localfiles_summary">搜尋儲存在此裝置上的文件、照片與其它檔案</string>
<string name="preference_search_gdrive">Google Drive</string>
<string name="preference_search_gdrive_summary">在Google Drive上搜尋 %1$s</string>
<string name="preference_search_gdrive_summary"> Google Drive 上搜尋 %1$s</string>
<string name="preference_search_nextcloud">Nextcloud</string>
<string name="preference_search_cloud_summary">搜尋%1$s的檔案</string>
<string name="preference_search_owncloud">Owncloud</string>
<string name="preference_google_signin">使用 Google 登入</string>
<string name="preference_google_signin_summary">登入以查詢 Google Drive</string>
<string name="preference_google_signin_summary">登入以搜尋 Google Drive</string>
<string name="preference_calendar_calendars">日曆</string>
<string name="preference_calendar_hide_allday">隱藏全天事件</string>
<string name="preference_screen_buildinfo_summary">有關此版本應用程式的更多資訊</string>
@ -478,10 +478,10 @@
<string name="login_flow_login">登入</string>
<string name="icon_picker_no_packs_installed">未安裝任何圖示包</string>
<plurals name="calendar_widget_running_events">
<item quantity="other">從過去%1$d天運行的事件</item>
<item quantity="other">從過去 %1$d 天運行的事件</item>
</plurals>
<plurals name="debug_cleanup_database_result">
<item quantity="other">已刪除%1$d條目。</item>
<item quantity="other">已刪除 %1$d條目。</item>
</plurals>
<string name="preference_search_bar_launch_on_enter">輸入時啟動</string>
<string name="preference_search_bar_launch_on_enter_summary">在點擊「前往」後啟動突顯顯示的匹配項或快速操作</string>
@ -489,7 +489,7 @@
<item quantity="other">%1$s 分鐘內完成</item>
</plurals>
<plurals name="tag_selected_items">
<item quantity="other">已選擇 %1$d 項目</item>
<item quantity="other">已選擇 %1$d 項目</item>
</plurals>
<string name="gesture_action_launch_app">啟動應用程式</string>
<string name="icon_picker_filter_all_packs">所有圖示包</string>
@ -576,7 +576,7 @@
<string name="length_unit">長度單位</string>
<string name="preference_search_location_custom_overpass_url">Overpass URL</string>
<plurals name="app_info_notifications">
<item quantity="other">%1$s 通知</item>
<item quantity="other">%1$s 通知</item>
</plurals>
<string name="weather_widget_no_provider">沒有天氣服務商被選擇或者選擇的服務商不可用</string>
<string name="preference_screen_plugins_summary">管理已安裝的擴充套件</string>
@ -748,7 +748,7 @@
<string name="profile_private_profile_state_locked">私人空間被鎖定。</string>
<string name="profile_work_profile_action_lock">暫停工作應用程式</string>
<plurals name="contact_phone_numbers">
<item quantity="other">%1$s電話號碼</item>
<item quantity="other">%1$s電話號碼</item>
</plurals>
<string name="poi_category_handball">手球場</string>
<string name="apps_profile_private">私人</string>
@ -782,10 +782,10 @@
<string name="item_visibility_app_default">應用程式網格 &amp; 搜尋結果</string>
<string name="calendar_widget_open_calendar">開啟日曆應用程式</string>
<plurals name="contact_email_addresses">
<item quantity="other">%1$s電子郵件位址</item>
<item quantity="other">%1$s電子郵件位址</item>
</plurals>
<plurals name="contact_postal_addresses">
<item quantity="other">%1$s郵政地址</item>
<item quantity="other">%1$s郵政地址</item>
</plurals>
<string name="poi_category_gymnastics">體操場</string>
<string name="poi_category_monument">紀念碑</string>
@ -804,6 +804,11 @@
<string name="music_widget_previous_track">上一首</string>
<string name="music_widget_next_track">下一首</string>
<plurals name="calendar_search_enabled_lists">
<item quantity="other">已選擇 %1$s 列表</item>
<item quantity="other">已選擇 %1$s 列表</item>
</plurals>
<string name="preference_clock_widget_time_format_24h">24 小時制</string>
<string name="preference_clock_widget_time_format_12h">12 小時制</string>
<string name="preference_clock_widget_time_format_system">系統預設</string>
<string name="preference_clock_widget_time_format">時間格式</string>
<string name="widget_removed">小工具已移除</string>
</resources>