mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-17 03:28:52 +01:00
#1013 - Add option to use system font
This commit is contained in:
@@ -75,7 +75,6 @@ open class QkTextView @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
init {
|
||||
if (!isInEditMode) {
|
||||
appComponent.inject(this)
|
||||
fontProvider.getLato { setTypeface(it, typeface?.style ?: Typeface.NORMAL) }
|
||||
}
|
||||
|
||||
context.obtainStyledAttributes(attrs, R.styleable.QkTextView)?.run {
|
||||
@@ -143,6 +142,10 @@ open class QkTextView @JvmOverloads constructor(context: Context, attrs: Attribu
|
||||
|
||||
updateSubscription()
|
||||
|
||||
fontProvider.typeface
|
||||
.autoDisposable(scope())
|
||||
.subscribe { setTypeface(it.value, typeface?.style ?: Typeface.NORMAL) }
|
||||
|
||||
Observables
|
||||
.combineLatest(prefs.textSize.asObservable(), textSizeAttrSubject, { textSizePref, textSizeAttr ->
|
||||
when (textSizeAttr) {
|
||||
|
||||
Reference in New Issue
Block a user