fix: crop Ollama logo padding, enlarge to 14dp on widget}

This commit is contained in:
WaterRain 2026-07-06 22:48:40 +00:00
parent 262918d9be
commit e3d21e0a8f
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ class OpenCodeGoWidgetProvider : AppWidgetProvider() {
views.setImageViewResource(R.id.widget_logo, widgetLogo(selectedService))
// Ollama logo 是正方形,XML 默认 22x12 是给宽扁 logo 的
if (selectedService == ServiceType.OLLAMA) {
views.setViewLayoutWidth(R.id.widget_logo, 12f, TypedValue.COMPLEX_UNIT_DIP)
views.setViewLayoutHeight(R.id.widget_logo, 12f, TypedValue.COMPLEX_UNIT_DIP)
views.setViewLayoutWidth(R.id.widget_logo, 14f, TypedValue.COMPLEX_UNIT_DIP)
views.setViewLayoutHeight(R.id.widget_logo, 14f, TypedValue.COMPLEX_UNIT_DIP)
} else {
views.setViewLayoutWidth(R.id.widget_logo, 22f, TypedValue.COMPLEX_UNIT_DIP)
views.setViewLayoutHeight(R.id.widget_logo, 12f, TypedValue.COMPLEX_UNIT_DIP)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 23 KiB