mirror of
https://github.com/SimpleMobileTools/Simple-Notes.git
synced 2025-03-22 11:30:10 +01:00
updating a couple more colors
This commit is contained in:
parent
18e4502054
commit
66fbfccd91
@ -48,7 +48,6 @@ import java.io.FileOutputStream
|
||||
import java.io.OutputStream
|
||||
import java.nio.charset.Charset
|
||||
import java.util.*
|
||||
import kotlin.collections.ArrayList
|
||||
|
||||
class MainActivity : SimpleActivity() {
|
||||
private val EXPORT_FILE_SYNC = 1
|
||||
@ -122,14 +121,14 @@ class MainActivity : SimpleActivity() {
|
||||
setTextSize(TypedValue.COMPLEX_UNIT_PX, getPercentageFontSize())
|
||||
setGravity(Gravity.CENTER_VERTICAL)
|
||||
setNonPrimaryAlpha(0.4f)
|
||||
setTextColor(config.textColor)
|
||||
setTextColor(getProperTextColor())
|
||||
}
|
||||
updateTextColors(view_pager)
|
||||
|
||||
checkShortcuts()
|
||||
|
||||
search_wrapper.setBackgroundColor(config.primaryColor)
|
||||
val contrastColor = config.primaryColor.getContrastColor()
|
||||
search_wrapper.setBackgroundColor(getProperPrimaryColor())
|
||||
val contrastColor = getProperPrimaryColor().getContrastColor()
|
||||
arrayListOf(searchPrevBtn, searchNextBtn, searchClearBtn).forEach {
|
||||
it.applyColorFilter(contrastColor)
|
||||
}
|
||||
|
@ -59,7 +59,7 @@ class WidgetConfigureActivity : SimpleActivity() {
|
||||
config_bg_color.setOnClickListener { pickBackgroundColor() }
|
||||
config_text_color.setOnClickListener { pickTextColor() }
|
||||
notes_picker_value.setOnClickListener { showNoteSelector() }
|
||||
notes_picker_holder.background = ColorDrawable(config.backgroundColor)
|
||||
notes_picker_holder.background = ColorDrawable(getProperBackgroundColor())
|
||||
show_note_title_holder.setOnClickListener {
|
||||
show_note_title.toggle()
|
||||
handleNoteTitleDisplay()
|
||||
|
@ -10,13 +10,12 @@ import android.widget.EditText
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.notes.pro.R
|
||||
import com.simplemobiletools.notes.pro.extensions.config
|
||||
import kotlinx.android.synthetic.main.dialog_new_checklist_item.view.*
|
||||
import kotlinx.android.synthetic.main.item_add_checklist.view.*
|
||||
|
||||
class NewChecklistItemDialog(val activity: Activity, callback: (titles: ArrayList<String>) -> Unit) {
|
||||
private val titles = mutableListOf<EditText>()
|
||||
private val textColor = activity.config.textColor
|
||||
private val textColor = activity.getProperTextColor()
|
||||
private val view: ViewGroup = activity.layoutInflater.inflate(R.layout.dialog_new_checklist_item, null) as ViewGroup
|
||||
|
||||
init {
|
||||
|
@ -5,10 +5,7 @@ import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import android.widget.RadioGroup
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.notes.pro.R
|
||||
import com.simplemobiletools.notes.pro.extensions.config
|
||||
import com.simplemobiletools.notes.pro.helpers.NotesHelper
|
||||
@ -35,7 +32,7 @@ class OpenNoteDialog(val activity: Activity, val callback: (checkedId: Long, new
|
||||
}
|
||||
|
||||
private fun initDialog(notes: ArrayList<Note>, view: View) {
|
||||
val textColor = activity.config.textColor
|
||||
val textColor = activity.getProperTextColor()
|
||||
notes.forEach {
|
||||
activity.layoutInflater.inflate(R.layout.open_note_item, null).apply {
|
||||
val note = it
|
||||
|
@ -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()
|
||||
|
@ -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())
|
||||
|
@ -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())
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user