Skip to content

Commit 975fe7f

Browse files
committed
use rounded background at the monthly view widget
1 parent 4093e7f commit 975fe7f

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

app/src/main/kotlin/com/simplemobiletools/calendar/pro/helpers/MyWidgetMonthlyProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,9 @@ class MyWidgetMonthlyProvider : AppWidgetProvider() {
149149
setText(R.id.day_monthly_event_id, it.title.replace(" ", "\u00A0"))
150150
setTextColor(R.id.day_monthly_event_id, eventTextColor)
151151
setTextSize(R.id.day_monthly_event_id, smallerFontSize - 3f)
152-
setBackgroundColor(R.id.day_monthly_event_holder, backgroundColor)
153152
setVisibleIf(R.id.day_monthly_task_image, it.isTask())
154153
applyColorFilter(R.id.day_monthly_task_image, eventTextColor)
154+
setInt(R.id.day_monthly_event_background, "setColorFilter", backgroundColor)
155155

156156
if (it.isTaskCompleted()) {
157157
setInt(R.id.day_monthly_event_id, "setPaintFlags", Paint.ANTI_ALIAS_FLAG or Paint.STRIKE_THRU_TEXT_FLAG)

app/src/main/res/layout/day_monthly_event_view_widget.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55
android:layout_width="match_parent"
66
android:layout_height="wrap_content">
77

8+
<ImageView
9+
android:id="@+id/day_monthly_event_background"
10+
android:layout_width="match_parent"
11+
android:layout_height="match_parent"
12+
android:layout_alignBottom="@+id/day_monthly_event_id"
13+
android:layout_margin="@dimen/one_dp"
14+
android:contentDescription="@null"
15+
android:src="@drawable/day_monthly_event_background_widget" />
16+
817
<!-- widgets cannot contain ConstraintLayout and image scaling doesn't work well, so set its size -->
918
<ImageView
1019
android:id="@+id/day_monthly_task_image"

0 commit comments

Comments
 (0)