Add clock widget alignment preference
This commit is contained in:
@@ -585,6 +585,10 @@
|
||||
<string name="preference_clock_widget_color">Color</string>
|
||||
<string name="preference_clock_widget_style">Style</string>
|
||||
<string name="preference_clock_widget_style_summary">Select a clock</string>
|
||||
<string name="preference_clock_widget_alignment">Alignment</string>
|
||||
<string name="preference_clock_widget_alignment_top">Top</string>
|
||||
<string name="preference_clock_widget_alignment_center">Center</string>
|
||||
<string name="preference_clock_widget_alignment_bottom">Bottom</string>
|
||||
<string name="preference_clockwidget_date_part">Date</string>
|
||||
<string name="preference_clockwidget_date_part_summary">Show the current date</string>
|
||||
<string name="preference_clockwidget_favorites_part">Favorites</string>
|
||||
|
||||
@@ -49,6 +49,7 @@ fun createFactorySettings(context: Context): Settings {
|
||||
.setDatePart(true)
|
||||
.setFavoritesPart(false)
|
||||
.setFillHeight(true)
|
||||
.setAlignment(Settings.ClockWidgetSettings.ClockWidgetAlignment.Bottom)
|
||||
.build()
|
||||
)
|
||||
.setFavorites(
|
||||
|
||||
+3
@@ -8,5 +8,8 @@ class Migration_17_18 : VersionedMigration(17, 18) {
|
||||
.setAppearance(builder.appearance.toBuilder()
|
||||
.setBlurWallpaperRadius(32)
|
||||
)
|
||||
.setClockWidget(builder.clockWidget.toBuilder()
|
||||
.setAlignment(Settings.ClockWidgetSettings.ClockWidgetAlignment.Bottom)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -144,6 +144,13 @@ message Settings {
|
||||
Dark = 2;
|
||||
}
|
||||
ClockWidgetColors color = 9;
|
||||
|
||||
enum ClockWidgetAlignment {
|
||||
Bottom = 0;
|
||||
Center = 1;
|
||||
Top = 2;
|
||||
}
|
||||
ClockWidgetAlignment alignment = 10;
|
||||
}
|
||||
ClockWidgetSettings clock_widget = 7;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user