updating a couple more colors

This commit is contained in:
tibbi
2022-04-02 22:32:59 +02:00
parent 18e4502054
commit 66fbfccd91
7 changed files with 14 additions and 22 deletions

View File

@ -98,7 +98,7 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
val adjustedPrimaryColor = requireActivity().getProperPrimaryColor()
view.checklist_fab.apply {
setColors(
requireActivity().config.textColor,
requireActivity().getProperTextColor(),
adjustedPrimaryColor,
adjustedPrimaryColor.getContrastColor()
)
@ -109,7 +109,7 @@ class ChecklistFragment : NoteFragment(), ChecklistItemsListener {
}
}
view.fragment_placeholder.setTextColor(requireActivity().config.textColor)
view.fragment_placeholder.setTextColor(requireActivity().getProperTextColor())
view.fragment_placeholder_2.apply {
setTextColor(adjustedPrimaryColor)
underlineText()

View File

@ -3,10 +3,7 @@ package com.simplemobiletools.notes.pro.fragments
import android.util.TypedValue
import android.view.ViewGroup
import androidx.fragment.app.Fragment
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getProperPrimaryColor
import com.simplemobiletools.commons.extensions.performSecurityCheck
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.PROTECTION_NONE
import com.simplemobiletools.notes.pro.activities.MainActivity
import com.simplemobiletools.notes.pro.extensions.config
@ -22,9 +19,9 @@ abstract class NoteFragment : Fragment() {
protected fun setupLockedViews(view: ViewGroup, note: Note) {
view.apply {
note_locked_layout.beVisibleIf(note.isLocked() && !shouldShowLockedContent)
note_locked_image.applyColorFilter(config!!.textColor)
note_locked_image.applyColorFilter(requireContext().getProperTextColor())
note_locked_label.setTextColor(requireContext().config.textColor)
note_locked_label.setTextColor(requireContext().getProperTextColor())
note_locked_label.setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getPercentageFontSize())
note_locked_show.setTextColor(requireContext().getProperPrimaryColor())

View File

@ -124,7 +124,7 @@ class TextFragment : NoteFragment() {
}
val adjustedPrimaryColor = context.getProperPrimaryColor()
setColors(config.textColor, adjustedPrimaryColor, config.backgroundColor)
setColors(context.getProperTextColor(), adjustedPrimaryColor, context.getProperBackgroundColor())
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getPercentageFontSize())
highlightColor = adjustedPrimaryColor.adjustAlpha(.4f)
@ -157,7 +157,7 @@ class TextFragment : NoteFragment() {
}
if (config.showWordCount) {
view.notes_counter.setTextColor(config.textColor)
view.notes_counter.setTextColor(context!!.getProperTextColor())
setWordCounter(view.text_note_view.text.toString())
}