Skip to content

Commit

Permalink
Use DP not SP for widget text size
Browse files Browse the repository at this point in the history
  • Loading branch information
premnirmal committed Aug 10, 2023
1 parent b4b3095 commit 2f84083
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Expand Up @@ -167,16 +167,16 @@ class RemoteStockViewAdapter(private val widgetId: Int) : RemoteViewsService.Rem

val fontSize = getFontSize()
if (stockViewLayout == R.layout.stockview3) {
remoteViews.setTextViewTextSize(R.id.change, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.change, TypedValue.COMPLEX_UNIT_DIP, fontSize)
} else {
remoteViews.setTextViewTextSize(R.id.changePercent, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.changeValue, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.gain_loss, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.gain_loss_percent, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.changePercent, TypedValue.COMPLEX_UNIT_DIP, fontSize)
remoteViews.setTextViewTextSize(R.id.changeValue, TypedValue.COMPLEX_UNIT_DIP, fontSize)
remoteViews.setTextViewTextSize(R.id.gain_loss, TypedValue.COMPLEX_UNIT_DIP, fontSize)
remoteViews.setTextViewTextSize(R.id.gain_loss_percent, TypedValue.COMPLEX_UNIT_DIP, fontSize)
}
remoteViews.setTextViewTextSize(R.id.ticker, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.totalValue, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.holdings, TypedValue.COMPLEX_UNIT_SP, fontSize)
remoteViews.setTextViewTextSize(R.id.ticker, TypedValue.COMPLEX_UNIT_DIP, fontSize)
remoteViews.setTextViewTextSize(R.id.totalValue, TypedValue.COMPLEX_UNIT_DIP, fontSize)
remoteViews.setTextViewTextSize(R.id.holdings, TypedValue.COMPLEX_UNIT_DIP, fontSize)

if (stockViewLayout == R.layout.stockview3) {
val intent = Intent()
Expand Down
4 changes: 2 additions & 2 deletions app/version.properties
@@ -1,3 +1,3 @@
# this file is purely for f-droid because it cannot infer the version name/code from the git tag
versionName=3.9.829
versionCode=300900829
versionName=3.9.830
versionCode=300900830

0 comments on commit 2f84083

Please sign in to comment.