mirror of
				https://github.com/SimpleMobileTools/Simple-Draw.git
				synced 2025-06-05 21:59:17 +02:00 
			
		
		
		
	updating some default values
This commit is contained in:
		| @@ -448,8 +448,9 @@ class MainActivity : SimpleActivity(), CanvasListener { | ||||
|  | ||||
|     private fun updateBrushSize() { | ||||
|         my_canvas.setBrushSize(brushSize) | ||||
|         stroke_width_preview.scaleX = brushSize / 100f | ||||
|         stroke_width_preview.scaleY = brushSize / 100f | ||||
|         val scale = Math.max(0.03f, brushSize / 100f) | ||||
|         stroke_width_preview.scaleX = scale | ||||
|         stroke_width_preview.scaleY = scale | ||||
|     } | ||||
|  | ||||
|     private fun checkWhatsNewDialog() { | ||||
|   | ||||
| @@ -3,6 +3,7 @@ package com.simplemobiletools.draw.helpers | ||||
| import android.content.Context | ||||
| import android.graphics.Color | ||||
| import com.simplemobiletools.commons.helpers.BaseConfig | ||||
| import com.simplemobiletools.draw.R | ||||
|  | ||||
| class Config(context: Context) : BaseConfig(context) { | ||||
|     companion object { | ||||
| @@ -14,11 +15,11 @@ class Config(context: Context) : BaseConfig(context) { | ||||
|         set(showBrushSize) = prefs.edit().putBoolean(SHOW_BRUSH_SIZE, showBrushSize).apply() | ||||
|  | ||||
|     var brushColor: Int | ||||
|         get() = prefs.getInt(BRUSH_COLOR, Color.BLACK) | ||||
|         get() = prefs.getInt(BRUSH_COLOR, context.resources.getColor(R.color.color_primary)) | ||||
|         set(color) = prefs.edit().putInt(BRUSH_COLOR, color).apply() | ||||
|  | ||||
|     var brushSize: Float | ||||
|         get() = prefs.getFloat(BRUSH_SIZE, 5.0f) | ||||
|         get() = prefs.getFloat(BRUSH_SIZE, 50f) | ||||
|         set(brushSize) = prefs.edit().putFloat(BRUSH_SIZE, brushSize).apply() | ||||
|  | ||||
|     var canvasBackgroundColor: Int | ||||
|   | ||||
| @@ -3,7 +3,7 @@ package com.simplemobiletools.draw.helpers | ||||
| const val BRUSH_COLOR = "brush_color" | ||||
| const val CANVAS_BACKGROUND_COLOR = "canvas_background_color" | ||||
| const val SHOW_BRUSH_SIZE = "show_brush_size" | ||||
| const val BRUSH_SIZE = "brush_size" | ||||
| const val BRUSH_SIZE = "brush_size_2" | ||||
| const val LAST_SAVE_FOLDER = "last_save_folder" | ||||
| const val ALLOW_ZOOMING_CANVAS = "allow_zooming_canvas" | ||||
|  | ||||
|   | ||||
| @@ -1,5 +1,5 @@ | ||||
| <resources> | ||||
|     <dimen name="stroke_bar_size">150dp</dimen> | ||||
|     <dimen name="preview_dot_stroke_size">1dp</dimen> | ||||
|     <dimen name="full_brush_size">30dp</dimen> | ||||
|     <dimen name="full_brush_size">40dp</dimen> | ||||
| </resources> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user